/* Design System */
:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-bg: #f5f5f5;
    --text-main: #121212;
    --text-muted: #6c757d;
    --border-color: #e5e5e5;
    --sale-color: #d10000;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --container-width: 1400px;
    --header-height: 80px;

    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);

    /* Ecomus Specific Colors */
    --ecomus-gradient: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
    --star-color: #ffb400;
    --layout-active: #000;
    --layout-inactive: #ccc;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.heading {
    font-family: var(--font-heading);
    font-weight: 500;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
}

/* Page Layouts */
.page-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

@media (max-width: 991px) {
    .page-layout {
        grid-template-columns: 1fr;
    }
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.breadcrumbs a:hover {
    color: var(--primary-color);
}

.breadcrumbs span::before {
    content: "/";
    margin-right: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.btn-primary:hover {
    background: #333;
}

.btn-outline {
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
}

/* Header */
body > header {
    height: var(--header-height);
    background: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.nav-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    height: 100%;
}

.logo {
    text-align: left;
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.nav-links a:hover {
    color: var(--text-muted);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-icons {
    display: flex;
    gap: 1.5rem;
    font-size: 1.2rem;
    justify-content: flex-end;
}

/* Footer */
footer {
    background: #fff;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
    color: var(--text-muted);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

/* Responsive Header */
@media (max-width: 991px) {
    .nav-container {
        grid-template-columns: auto 1fr auto;
        gap: 1rem;
    }

    .logo {
        text-align: center;
    }

    .nav-links {
        display: none !important;
    }

    .menu-toggle {
        display: block !important;
    }

    /* Hide specific icons on mobile */
    .nav-icons .fa-user,
    .nav-icons .fa-heart {
        display: none;
    }

    header {
        height: 60px;
    }

    h1 {
        font-size: 2rem !important;
        /* Prevent mobile overlap */
    }
}

/* Overlays Base Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 2000;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.overlay.active {
    visibility: visible;
    opacity: 1;
}

.overlay-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 10;
    color: #000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}
.overlay-close:hover { opacity: 0.5; }

/* === New Search Overlay Design === */
.search-overlay-header {
    padding: 3rem 3rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.search-overlay-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.search-input-wrap {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrap i {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 1rem;
}

.search-input {
    width: 100%;
    border: 1.5px solid var(--border-color);
    border-radius: 30px;
    padding: 0.85rem 1.5rem 0.85rem 3rem;
    font-size: 1rem;
    outline: none;
    font-family: var(--font-body);
    transition: border-color 0.2s;
    background: #fff;
}

.search-input:focus {
    border-color: #000;
}

/* Search Body: sidebar + results */
.search-overlay-body {
    display: flex;
    flex: 1;
    padding: 2rem 2rem 2rem 3rem;
    gap: 3rem;
    position: relative;
}

.search-sidebar {
    width: 130px;
    flex-shrink: 0;
    padding-top: 0.5rem;
}

.search-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-sidebar ul li {
    margin-bottom: 1.2rem;
}

.search-sidebar ul li a {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.2s;
    font-weight: 500;
}

.search-sidebar ul li.active a,
.search-sidebar ul li a:hover {
    color: var(--text-main);
}

.search-results-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.search-results-track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    transition: transform 0.4s ease;
}

.search-nav-btn {
    position: absolute;
    top: 35%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    font-size: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s;
}
.search-nav-btn:hover { background: #000; color: #fff; border-color: #000; }
.search-nav-prev { left: -18px; }
.search-nav-next { right: -18px; }


/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 400px;
    max-width: 90%;
    height: 100%;
    background: var(--secondary-color);
    z-index: 2000;
    transition: 0.4s ease-out;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1999;
    visibility: hidden;
    opacity: 0;
    transition: var(--transition);
}

.cart-overlay-bg.active {
    visibility: visible;
    opacity: 1;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

/* Sidebar & Filters */
.sidebar h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-group {
    margin-bottom: 2.5rem;
}

.filter-group h4 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.filter-list li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.filter-list li:hover {
    color: var(--primary-color);
}

/* Blog Components (Modern Redesign) */
.blog-hero {
    padding: 4rem 0 3rem;
    text-align: center;
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 0.5rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem 2.5rem;
    padding-bottom: 5rem;
}

.blog-card {
    display: flex;
    flex-direction: column;
}

.blog-card-image {
    position: relative;
    border-radius: 15px; /* Premium rounded look */
    overflow: hidden;
    margin-bottom: 1.5rem;
    aspect-ratio: 1 / 1;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-card-tag {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 3px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.5;
    color: var(--text-main);
}

.blog-card-link {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1.5px solid transparent;
    padding-bottom: 2px;
    width: fit-content;
    transition: var(--transition);
}

.blog-card-link:hover {
    border-bottom-color: var(--primary-color);
}

.blog-card-link i {
    font-size: 0.75rem;
}

@media (max-width: 1200px) {
    .blog-grid {
        gap: 3rem 2rem;
    }
}

@media (max-width: 991px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-hero {
        padding: 3rem 0;
    }
}

.article-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: #444;
}

.article-content img {
    margin: 2rem 0;
    width: 100%;
}

/* Cart Page */
.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    text-align: left;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.cart-item {
    border-bottom: 1px solid var(--border-color);
}

.cart-item td {
    padding: 2rem 0;
}

.cart-product {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.cart-product img {
    width: 80px;
}

/* Product Card - base (overridden by Enhanced below) */

/* New Ecomus Badges */
.card-badge-top {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #eb2f06;
    color: white;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    z-index: 2;
}

.flash-sale-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #000;
    color: #ffb800; /* Gold text */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.flash-sale-banner i {
    font-size: 0.8rem;
}

.flash-sale-banner .sale-off {
    background: #eb2f06;
    color: white;
    padding: 2px 6px;
    border-radius: 2px;
    margin-left: 5px;
}

.badge-soldout-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}

.badge-soldout-overlay .soldout-text {
    background: white;
    padding: 10px 25px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* =========================================
   Ecomus Design System Components
   ========================================= */

/* /* Hero Banner */
.ecomus-hero {
    background: var(--ecomus-gradient);
    padding: 6rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ecomus-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: var(--font-heading);
}

.ecomus-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
}

/* Filter & Layout Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.filter-left, .filter-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.filter-trigger {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.layout-switches {
    display: flex;
    gap: 1.2rem;
    color: #ccc;
}

.layout-switches i {
    cursor: pointer;
    font-size: 1.3rem;
    transition: var(--transition);
}

.layout-switches i.active, .layout-switches i:hover {
    color: #000;
}

/* Enhanced Product Card */
.product-card {
    position: relative;
    background: #fff;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-image {
    position: relative;
    aspect-ratio: 4/5;
    background: #f9f9f9;
    overflow: hidden;
    margin-bottom: 1.2rem;
    display: block;
    width: 100%;
}

.product-image a {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.product-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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







.card-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.badge-sale {
    background: #eb2f06;
    color: white;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 2px;
}

.badge-soldout {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 0.8rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 3;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.product-meta {
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-rating {
    display: flex;
    gap: 2px;
    color: #ffb800;
    font-size: 0.75rem;
    margin-bottom: 0.6rem;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    transition: var(--transition);
}

.product-card:hover .product-title {
    color: var(--text-muted);
}

.product-price {
    display: flex;
    gap: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.price-old {
    text-decoration: line-through;
    color: #999;
    font-weight: 400;
}

.price-new {
    color: #eb2f06;
}

.product-swatches {
    display: flex;
    gap: 0.6rem;
    margin-top: 1rem;
}

.swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #eee;
    transition: var(--transition);
    position: relative;
}

.swatch:hover {
    transform: scale(1.2);
}

.swatch.active {
    outline: 1px solid #000;
    outline-offset: 3px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 5rem 0;
}

.page-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 0.9rem;
    transition: var(--transition);
}

.page-link:hover, .page-link.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Respomsive overrides */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4rem 2rem;
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .filter-bar {
        flex-direction: column;
        gap: 1.5rem;
    }
}
.product-price { margin-top: auto; }

.product-image img { transition: transform 0.6s ease; }
.product-card:hover .product-image img { transform: scale(1.05); }

.product-image a { display: block; width: 100%; height: 100%; }

.article-content header {
    display: block;
    height: auto;
    position: static;
    border-bottom: none;
    background: transparent;
    padding-bottom: 1rem;
}
.article-content h1 {
    font-size: 2.5rem;
    margin: 1rem 0;
    line-height: 1.2;
}
