/* =====================================================
   SUPER ECOMMERCE — MAIN REDESIGN CSS
   Modern Daraz/Amazon Style — Orange + White
   Replace: public/frontEnd/css/main.css
   ===================================================== */

/* ─── CSS Variables ─── */
:root {
    --primary: #ff4800;
    --primary-dark: #ea580c;
    --primary-light: #fff7ed;
    --text-dark: #111827;
    --text-mid: #374151;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg-page: #f3f4f6;
    --bg-white: #ffffff;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.10);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.13);
    --transition: 0.22s ease;
}

/* ─── Base ─── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background: var(--bg-page);
    color: var(--text-dark);
    overflow-x: hidden;
    line-height: 1.55;
    margin: 0;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
h1,h2,h3,h4,h5,h6 { margin: 0; font-family: 'Roboto', sans-serif; }

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =====================================================
   HERO SECTION — Slider + Side Ad (Daraz Style)
   ===================================================== */
.hero-section {
    background: var(--bg-page);
    padding: 12px 0 0;
}

.hero-layout {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.hero-slider {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    position: relative;
}

.hero-side-ad {
    flex: 0 0 280px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.hero-side-ad a {
    display: block;
    height: 100%;
}

.hero-side-ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
}

.hero-side-ad a:hover img {
    transform: scale(1.02);
}

section.slider-section {
    margin: 0;
    padding: 0;
    background: var(--bg-white);
}

.slider-full-wrap {
    width: 100%;
    overflow: hidden;
    border-radius: 0;
}

.main_slider .slider-item {
    width: 100%;
    overflow: hidden;
}

.main_slider .slider-item img {
    width: 100%;
    height: auto !important;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.main_slider .owl-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.92) !important;
    color: var(--primary) !important;
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    box-shadow: var(--shadow-md);
    transition: background var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border: none;
    font-size: 18px;
}
.main_slider .owl-nav button:hover {
    background: var(--primary) !important;
    color: #fff !important;
}
.main_slider .owl-prev { left: 10px; }
.main_slider .owl-next { right: 10px; }
.main_slider .owl-dots {
    position: absolute;
    bottom: 10px;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}
.main_slider .owl-dot span {
    width: 8px; height: 8px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    display: block;
    transition: background var(--transition), transform var(--transition);
}
.main_slider .owl-dot.active span {
    background: var(--primary);
    transform: scale(1.3);
}

/* =====================================================
   THREE PROMO IMAGES ROW
   ===================================================== */
.three-img-section {
    background: var(--bg-page);
    padding: 12px 0 14px;
}

.three-img-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.three-img-item a {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.three-img-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.three-img-item a:hover img {
    transform: scale(1.04);
}

/* =====================================================
   FEATURE BOXES (3-col grid, full-width under banner)
   ===================================================== */
.feature-boxes-section {
    background: var(--bg-page);
    padding: 14px 0 16px;
}

.feature-boxes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.feature-box {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: box-shadow var(--transition);
}

.feature-box:hover {
    box-shadow: var(--shadow-sm);
}

.feature-box-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
}

.feature-box-icon.orange { background: #fff7ed; color: var(--primary); }
.feature-box-icon.green  { background: #f0fdf4; color: #16a34a; }
.feature-box-icon.blue   { background: #eff6ff; color: #2563eb; }

.feature-box-text strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.feature-box-text span {
    font-size: 12px;
    color: var(--text-muted);
}

/* =====================================================
   SECTION TITLE HEADER (shared)
   ===================================================== */
.section-title-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 12px;
    border-bottom: none;
    margin-bottom: 14px;
}

.section-title-header .section-title-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.section-title-header .trending-icon svg {
    vertical-align: middle;
}

.view_more_btn {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    transition: color var(--transition);
    white-space: nowrap;
}

.view_more_btn::after {
    content: ' \2192';
}

.view_more_btn:hover {
    color: var(--primary-dark);
    background: transparent;
}

/* =====================================================
   CATEGORIES SECTION
   ===================================================== */
.home-categories-section {
    background: #fff;
    padding: 24px 0 28px;
    margin-bottom: 8px;
}

.home-categories-section .section-heading {
    text-align: left;
    font-size: 22px;
    font-weight: 800;
    color: #111;
    margin-bottom: 22px;
    letter-spacing: -0.3px;
    padding: 0;
    border: none;
    display: block;
}

.home-categories-section .section-heading::before {
    display: none;
}

.home-cat-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 20px 16px;
    padding: 0;
}

.home-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: none;
    text-decoration: none;
    width: auto;
    transition: transform 0.2s;
    cursor: pointer;
}

.home-cat-card:hover {
    transform: translateY(-3px);
}

.home-cat-icon {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    margin-bottom: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.home-cat-card:hover .home-cat-icon {
    border-color: #ff4800;
    box-shadow: 0 4px 12px rgba(249,115,22,0.15);
}

.home-cat-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 0;
}

.home-cat-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.3;
}

.home-cat-card:hover .home-cat-label {
    color: #ff4800;
}

/* =====================================================
   HOME PRODUCT SECTIONS (Trending, New Arrival, Category)
   ===================================================== */
.homeproduct {
    background: var(--bg-white);
    padding: 6px 0 16px;
    margin-bottom: 8px;
}

/* =====================================================
   PRODUCT CARDS
   ===================================================== */
.product-grid {
    row-gap: 10px;
}

.product_item {
    padding: 4px;
}

.product_item_inner {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    transition: box-shadow var(--transition), transform var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product_item_inner:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    border-color: #ddd;
}

/* Badge (HOT / NEW) */
.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    z-index: 2;
    line-height: 1;
}
.product-badge.badge-hot {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}
.product-badge.badge-new {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

/* Discount pill */
.discount-pill {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 20px;
    z-index: 2;
    line-height: 1.4;
}

/* Product image */
.pro_img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pro_img a {
    display: block;
    width: 100%;
    height: 100%;
}

.pro_img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product_item_inner:hover .pro_img img {
    transform: scale(1.07);
}

/* Price */
.pro_price_top {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px 2px;
    flex-wrap: wrap;
}

.new-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.old-price {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Product name */
.pro_name_bottom {
    padding: 2px 10px 8px;
    flex: 1;
}

.pro_name_bottom a {
    font-size: 12.5px;
    color: var(--text-mid);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}

.pro_name_bottom a:hover { color: var(--primary); }

/* Add to Cart area */
.add-cart-area {
    padding: 0 8px 10px;
    margin-top: auto;
}


/* =====================================================
   SEARCH PAGE - PRODUCT LISTING GRID
   ===================================================== */
.main_product_inner {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.product-section {
    background: var(--bg-page);
    padding: 20px 0 40px;
}

.sorting-section {
    background: #fff;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.category-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.category-breadcrumb a { color: var(--text-muted); }
.category-breadcrumb a:hover { color: var(--primary); }
.category-breadcrumb strong { color: var(--text-dark); }

.showing-data { font-size: 13px; color: var(--text-muted); line-height: 38px; }

.page-sort select {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: 13px;
    color: var(--text-mid);
    background: #fff;
    width: 100%;
}

/* Search product card (search.blade.php) */
.category-product.main_product_inner .product_item_inner {
    border-radius: var(--radius-md);
}

/* Empty state */
.empty-search {
    padding: 80px 0;
    text-align: center;
    grid-column: 1 / -1;
}
.empty-search i { font-size: 48px; color: #d1d5db; margin-bottom: 16px; }
.empty-search h4 { color: var(--text-muted); margin-bottom: 8px; }
.empty-search p { color: #9ca3af; font-size: 14px; }

/* =====================================================
   CUSTOMER REVIEWS CAROUSEL
   ===================================================== */
.customer-review .owl-item img {
    border-radius: var(--radius-md);
}

/* =====================================================
   HOMEPAGE ADS
   ===================================================== */
.footertop_ads_inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.footertop_ads_item a {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.footertop_ads_item img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.footertop_ads_item a:hover img { transform: scale(1.02); }

/* =====================================================
   FLOATING CART
   ===================================================== */
.floating-cart-btn {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(249,115,22,0.4);
    z-index: 1000;
    transition: transform var(--transition), box-shadow var(--transition);
}
.floating-cart-btn:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(249,115,22,0.55); }
.floating-cart-btn svg { width: 22px; height: 22px; }
.floating-cart-count {
    position: absolute;
    top: -4px; right: -4px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

.floating-cart-panel {
    position: fixed;
    bottom: 96px;
    right: 20px;
    width: 320px;
    max-height: 480px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
}
.floating-cart-panel.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.fcp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
}
.fcp-header svg { color: var(--primary); }
.fcp-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    padding: 0;
}

.fcp-items {
    overflow-y: auto;
    flex: 1;
    padding: 10px 14px;
}

.fcp-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}
.fcp-item img {
    width: 48px; height: 48px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.fcp-item-name {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-dark);
    line-height: 1.4;
}
.fcp-item-price { font-size: 13px; font-weight: 700; color: var(--primary); margin-top: 2px; }
.fcp-item-qty   { font-size: 11px; color: var(--text-muted); }
.fcp-empty { text-align: center; color: var(--text-muted); padding: 24px 0; font-size: 13px; }

.fcp-footer {
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    background: #fafafa;
}
.fcp-total {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}
.fcp-checkout-btn {
    display: block;
    text-align: center;
    background: var(--primary);
    color: #fff;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: background var(--transition);
}
.fcp-checkout-btn:hover { background: var(--primary-dark); color: #fff; }

/* =====================================================
   WHATSAPP FLOAT
   ===================================================== */
.float-whatsapp {
    position: fixed;
    bottom: 96px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37,211,102,0.4);
    z-index: 999;
    transition: transform var(--transition);
}
.float-whatsapp:hover { transform: scale(1.1); color: #fff; }
.float-whatsapp svg { width: 26px; height: 26px; }

/* =====================================================
   PAGINATION
   ===================================================== */
.custom_paginate { margin-top: 30px; }
.custom_paginate .pagination { justify-content: center; gap: 4px; }
.custom_paginate .page-link {
    border-radius: var(--radius-sm) !important;
    color: var(--text-mid);
    border: 1px solid var(--border);
    padding: 6px 12px;
    font-size: 13px;
}
.custom_paginate .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.custom_paginate .page-link:hover {
    color: var(--primary);
    background: var(--primary-light);
    border-color: var(--primary);
}

/* =====================================================
   SCROLLTOP BUTTON
   ===================================================== */
.scrolltop {
    display: none;
    position: fixed;
    bottom: 96px;
    right: 84px;
    width: 40px; height: 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 998;
    box-shadow: var(--shadow-md);
    font-size: 16px;
    transition: background var(--transition);
}
.scrolltop:hover { background: var(--primary-dark); }

/* =====================================================
   TOASTR OVERRIDES
   ===================================================== */
#toast-container > div {
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-md) !important;
    opacity: 1 !important;
}
#toast-container > .toast-success { background-color: #16a34a !important; }
#toast-container > .toast-error   { background-color: #dc2626 !important; }

/* =====================================================
   RATING STARS
   ===================================================== */
.pro_rating { padding: 2px 10px 4px; }
.pro_rating i { font-size: 11px; }

.pro_price {
    padding: 2px 10px 6px;
}
.pro_price p {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}
.pro_price p del {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 12px;
    margin-right: 4px;
}

/* =====================================================
   CART / CHECKOUT UTILS
   ===================================================== */
.go_cart {
    display: block;
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    transition: background var(--transition);
}
.go_cart:hover { background: var(--primary-dark); color: #fff; }

/* =====================================================
   RESPONSIVE
   ===================================================== */

/* Tablet */
@media (max-width: 1199px) {
    .home-cat-grid { grid-template-columns: repeat(6, 1fr); }
    .main_product_inner { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1199px) {
    .hero-side-ad { flex: 0 0 220px; }
}

@media (max-width: 991px) {
    .main_slider .slider-item img { max-height: 320px; }
    .feature-boxes-grid { gap: 10px; }
    .feature-box { padding: 14px 16px; }
    .home-cat-grid { grid-template-columns: repeat(5, 1fr); }
    .main_product_inner { grid-template-columns: repeat(3, 1fr); }
    .hero-side-ad { display: none; }
}

/* Mobile */
@media (max-width: 767px) {
    .hero-section { padding: 8px 0 0; }
    .hero-slider { border-radius: 8px; }
    .slider-section .slider-item { height: auto !important; }
    .main_slider .slider-item img { max-height: 220px; height: auto !important; }
    .feature-boxes-section { padding: 8px 0 10px; }
    .feature-boxes-grid {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        padding-bottom: 2px;
    }
    .feature-boxes-grid::-webkit-scrollbar { display: none; }
    .feature-box {
        min-width: 210px;
        padding: 12px 14px;
        gap: 10px;
        border-radius: 8px;
        scroll-snap-align: start;
    }
    .feature-box-icon { width: 38px; height: 38px; border-radius: 10px; font-size: 17px; }
    .feature-box-text strong { font-size: 12px; }
    .feature-box-text span { font-size: 10.5px; }

    .home-categories-section { padding: 16px 0 20px; }
    .home-categories-section .section-heading { font-size: 20px; margin-bottom: 18px; }
    .home-cat-grid { grid-template-columns: repeat(4, 1fr); gap: 14px 10px; }
    .home-cat-icon { width: 68px; height: 68px; border-radius: 14px; }
    .home-cat-icon img { width: 46px; height: 46px; }
    .home-cat-label { font-size: 11px; }

    .section-title-header .section-title-name { font-size: 20px; }
    .view_more_btn { font-size: 14px; }

    .main_product_inner { grid-template-columns: 1fr 1fr; }

    .floating-cart-btn { bottom: 16px; right: 14px; width: 50px; height: 50px; }
    .floating-cart-panel { right: 14px; width: calc(100vw - 28px); bottom: 78px; }
    .float-whatsapp { bottom: 78px; left: 14px; width: 44px; height: 44px; }

    .footertop_ads_inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .home-cat-grid { grid-template-columns: repeat(3, 1fr); }
    .three-img-item img { height: 70px; }
    .product_item { padding: 2px; }
}
