/* Commercefoxx - Premium Marketplace UI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@400;600;700;800&display=swap');

:root {
    --primary: #0F172A;
    --secondary: #2563EB;
    --accent: #F97316;
    --bg-light: #F8FAFC;
    --success: #10B981;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 14px; /* Slightly smaller for mobile */
    line-height: 1.6;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    body { font-size: 15px; }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
}

h1 { font-size: 2rem; }
@media (min-width: 992px) { h1 { font-size: 3rem; } }

/* Layout */
.container-custom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Nav */
.top-bar {
    background: var(--primary);
    color: white;
    padding: 8px 0;
    font-size: 13px;
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: white;
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
}

@media (min-width: 992px) {
    .sticky-header { padding: 15px 0; }
}

.search-bar-container {
    position: relative;
    width: 100%;
}

.search-bar-container input {
    border-radius: 50px;
    padding: 10px 20px;
    padding-right: 45px;
    border: 1px solid var(--border-color);
    background: #F1F5F9;
    transition: all 0.3s ease;
    font-size: 14px;
}

@media (min-width: 992px) {
    .search-bar-container input { padding: 12px 25px; padding-right: 50px; }
}

.search-bar-container input:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
    border-color: var(--secondary);
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Buttons */
.btn-primary-custom {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background: #1D4ED8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background: #EA580C;
    transform: translateY(-2px);
}

/* Cards */
.card-product {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #eef2f6;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.02), 0 2px 4px -2px rgb(0 0 0 / 0.02);
}

.card-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
    border-color: #f57224; /* Signature Daraz accent hover border */
}

/* Perfect Square 1:1 Aspect Ratio Container */
.card-product .image-container {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Perfect Square */
    background: #f8fafc;
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
}

.card-product .image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    background-color: #ffffff;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-product:hover .image-container img {
    transform: scale(1.06);
}

/* Accent Discount Badges */
.card-product .badge-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f57224; /* Signature orange */
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    z-index: 5;
    box-shadow: 0 4px 6px -1px rgba(245, 114, 36, 0.3);
}

/* Quick Add to Cart Button overlay */
.card-product .add-to-cart-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #f57224;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    transition: all 0.2s ease;
    z-index: 5;
}

.card-product .add-to-cart-btn:hover {
    background: #f57224;
    color: white;
    transform: scale(1.1);
}

/* Secondary product action panel */
.product-actions {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
    z-index: 10;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-product:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
}

.btn-white {
    background: rgba(255, 255, 255, 0.95);
    color: #475569;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    transition: all 0.2s ease;
    font-size: 11px;
}

.btn-white:hover {
    background: #f57224;
    color: white;
}

/* Content block styles */
.card-product .content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: white;
}

.card-product .category-badge {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    display: block;
}

.card-product .title {
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 38px;
}

.card-product .title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.15s ease;
}

.card-product .title a:hover {
    color: #f57224;
}

/* Star ratings row */
.card-product .ratings-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
    font-size: 11px;
}

.card-product .ratings-wrapper .stars {
    color: #f1c40f;
}

.card-product .ratings-wrapper .count {
    color: #94a3b8;
}

/* Pricing box */
.card-product .price-box {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}

.card-product .price {
    font-size: 15.5px;
    font-weight: 700;
    color: #f57224; /* Signature Daraz Color */
    letter-spacing: -0.01em;
}

.card-product .old-price {
    font-size: 11px;
    text-decoration: line-through;
    color: #94a3b8;
    font-weight: 400;
}

.card-product .discount-percentage {
    font-size: 11px;
    color: #f57224;
    font-weight: 700;
    margin-left: 2px;
}

.currency-symbol {
    font-size: 0.8em;
    margin-right: 2px;
    color: var(--secondary);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Footer */
footer {
    background: var(--primary);
    color: #CBD5E1;
    padding: 80px 0 30px;
}

footer h5 {
    color: white;
    margin-bottom: 25px;
}

footer a {
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 12px;
}

footer a:hover {
    color: var(--accent);
}

.social-icons a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-right: 10px;
}

/* Mobile Bottom Nav Tweaks */
.mobile-nav {
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav a {
    flex: 1;
    padding: 10px 0;
    color: var(--text-muted) !important;
    transition: color 0.3s;
}

.mobile-nav a.active {
    color: var(--secondary) !important;
}

.mobile-nav i {
    margin-bottom: 4px;
}

/* Off-canvas sidebar for mobile categories */
.mobile-sidebar {
    width: 300px;
    max-width: 80%;
}

/* Premium Hero Styles */
.hero-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
    transition: all 0.3s ease;
}

.hero-slider-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    height: 480px; /* High fidelity desktop height */
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.25) !important;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.8) 0%, rgba(15, 23, 42, 0.35) 60%, rgba(15, 23, 42, 0.1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.glass-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    display: inline-block;
}

.glass-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
}

.hero-title {
    font-size: 2.5rem;
    line-height: 1.1;
    color: white !important;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (min-width: 992px) {
    .hero-title { font-size: 3.5rem; }
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Custom Swiper Bullets for Sleek Aesthetics */
.hero-slider-container .swiper-pagination-bullet {
    background: #ffffff;
    opacity: 0.5;
    width: 8px;
    height: 8px;
    transition: all 0.3s ease;
}

.hero-slider-container .swiper-pagination-bullet-active {
    background: var(--accent);
    opacity: 1;
    width: 24px;
    border-radius: 4px;
}

/* Responsive Scaling: Daraz-like compact banners for Tablet & Mobile */
@media (max-width: 991px) {
    .hero-section {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    .hero-slider-container {
        height: 280px;
        border-radius: 16px;
    }
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.2rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }
    
    /* Strict Daraz-style Mobile Banner Spec */
    .hero-slider-container {
        height: 165px; /* Compact height */
        border-radius: 12px;
        margin: 0;
    }
    
    .hero-overlay {
        background: linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 65%, rgba(15, 23, 42, 0.1) 100%);
    }
    
    .hero-content {
        padding: 0.8rem 1.2rem !important;
        max-width: 75%;
    }
    
    .glass-badge {
        font-size: 9px;
        padding: 4px 10px;
        margin-bottom: 0.4rem !important;
    }
    
    .hero-title {
        font-size: 1.15rem !important;
        line-height: 1.2;
        margin-bottom: 0.2rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.75rem !important;
        margin-bottom: 0.6rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .hero-content .btn-primary-custom, 
    .hero-content .btn-accent {
        padding: 4px 14px !important;
        font-size: 0.75rem !important;
        font-weight: 500;
        border-radius: 20px;
    }
}

/* Scrollbar Tweaks */
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Premium Daraz-Style Product Details Page UI */
.product-details-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px -10px rgba(148, 163, 184, 0.08);
    padding: 30px;
    border: 1px solid #f1f5f9;
}

.details-main-img-wrapper {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    aspect-ratio: 1 / 1;
}

.details-main-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.details-main-img-wrapper:hover img {
    transform: scale(1.05);
}

.details-thumb-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border: 2px solid #eef2f6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #f8fafc;
}

.details-thumb-img:hover,
.details-thumb-img.active {
    border-color: #f57224;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(245, 114, 36, 0.15);
}

.details-title {
    font-size: 24px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.details-brand-link {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.details-brand-link:hover {
    color: #f57224;
}

.details-price-strip {
    background: #fff8f5;
    border-radius: 12px;
    padding: 20px 24px;
    border: 1px dashed rgba(245, 114, 36, 0.2);
}

.details-price-strip .price-large {
    font-size: 36px;
    font-weight: 800;
    color: #f57224; /* Signature Coral Orange */
    letter-spacing: -0.02em;
    display: block;
    line-height: 1.1;
}

.details-price-strip .old-price-line {
    font-size: 14px;
    text-decoration: line-through;
    color: #94a3b8;
    margin-right: 8px;
}

.details-price-strip .discount-badge-large {
    background: #f57224;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    box-shadow: 0 4px 6px -1px rgba(245, 114, 36, 0.2);
}

.sidebar-info-card {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 25px -10px rgba(15, 23, 42, 0.04);
}

.sidebar-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.sidebar-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #f1f5f9;
}

.sidebar-metric-row:last-child {
    border-bottom: none;
}

.sidebar-metric-label {
    font-size: 13px;
    color: #64748b;
}

.sidebar-metric-value {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.action-buy-now {
    background: #f57224 !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
    padding: 14px 28px !important;
    border-radius: 10px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 14px rgba(245, 114, 36, 0.3) !important;
}

.action-buy-now:hover {
    background: #e05e1b !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(245, 114, 36, 0.4) !important;
}

.action-add-to-cart {
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
    padding: 14px 28px !important;
    border-radius: 10px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25) !important;
}

.action-add-to-cart:hover {
    background: #1d4ed8 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35) !important;
}

@media (max-width: 991px) {
    .product-details-container {
        padding: 20px;
        border-radius: 12px;
    }
    .details-title {
        font-size: 20px;
    }
    .details-price-strip .price-large {
        font-size: 28px;
    }
}

/* Daraz-Style Categories Homepage Grid */
.category-circle-card {
    transition: all 0.2s ease-in-out;
}

.category-circle-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0,0,0,0.02);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-circle-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-circle-label {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.25;
    margin-top: 8px;
    display: block;
    transition: color 0.15s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hover States */
.category-circle-card:hover .category-circle-wrapper {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(245, 114, 36, 0.2);
}

.category-circle-card:hover .category-circle-img {
    transform: scale(1.08);
}

.category-circle-card:hover .category-circle-label {
    color: #f57224 !important; /* Signature orange hover label */
}

@media (max-width: 576px) {
    .category-circle-wrapper {
        width: 70px;
        height: 70px;
    }
    .category-circle-label {
        font-size: 11.5px;
    }
}

/* Premium Stitch UI Elements & Banners Helpers */
.bg-soft-primary {
    background-color: rgba(37, 99, 235, 0.04) !important;
    border: 1px solid rgba(37, 99, 235, 0.1) !important;
}

.bg-soft-accent {
    background-color: rgba(249, 115, 22, 0.04) !important;
    border: 1px solid rgba(249, 115, 22, 0.1) !important;
}

/* Ambient Shadows / Glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
}

.details-price-strip {
    box-shadow: 0 4px 15px rgba(245, 114, 36, 0.04);
}

/* Custom visual micro-animations */
.btn-primary-custom, .btn-accent, .action-buy-now, .action-add-to-cart {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-primary-custom:hover {
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3) !important;
}

.btn-accent:hover {
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3) !important;
}
