/* =====================
   1. VARIABLES & RESET
===================== */
:root {
    /* Colors */
    --primary-color: #2c2c2c;
    --secondary-color: #5a5a5a;
    --accent-color: #c5a059;
    /* Gold */
    --accent-light: #e6cfa3;
    --bg-color: #fdfbf7;
    /* Soft Cream */
    --surface-color: #ffffff;
    --text-color: #333333;
    --text-light: #777777;
    --border-color: #eee4d5;
    --error-color: #d32f2f;
    --success-color: #2e7d32;

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #c5a059 0%, #e6cfa3 100%);
    --gradient-soft: linear-gradient(135deg, #fdfbf7 0%, #f4e9d6 100%);
    --gradient-dark: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 15px rgba(197, 160, 89, 0.3);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 16px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 1rem; }

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

ul {
    list-style: none;
}

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

/* =====================
   2. UTILITIES
===================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.section-padding {
    padding: 80px 0;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    font-weight: 600;
}

.badge-new {
    background-color: var(--primary-color);
    color: var(--surface-color);
}

.badge-sale {
    background-color: var(--error-color);
    color: var(--surface-color);
}

/* =====================
   3. BUTTONS
===================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 35px;
    background-color: var(--primary-color);
    color: var(--surface-color);
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    border-radius: 50px;
    /* Pill shape */
    border: 1px solid var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--accent-color);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover {
    border-color: var(--accent-color);
    color: var(--surface-color);
    box-shadow: var(--shadow-glow);
}

.btn:hover::before {
    width: 100%;
}

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

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

.btn-sm {
    padding: 10px 20px;
    font-size: 11px;
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 16px;
}

/* =====================
   4. HEADER & NAVIGATION
===================== */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    text-align: center;
}

.brand-logo h1 {
    font-size: 28px;
    letter-spacing: 3px;
    margin: 0;
    color: var(--primary-color);
}

.brand-logo span {
    font-family: var(--font-body);
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent-color);
    display: block;
    margin-top: -5px;
}

.header-nav {
    display: flex;
    gap: 35px;
    align-items: center;
}

.header-nav a {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    position: relative;
}

.header-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.header-nav a:hover::after,
.header-nav a.active::after {
    width: 100%;
}

.header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-icons a {
    font-size: 18px;
    color: var(--primary-color);
}

.header-icons a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
}

/* =====================
   5. HERO SLIDER
===================== */
.slider {
    position: relative;
    width: 100%;
    height: 85vh;
    /* Taller hero */
    min-height: 500px;
    overflow: hidden;
    margin-top: -85px;
    /* Pull up behind header if header is transparent */
}

/* If we want the header to be transparent initially, we'd need JS to toggle class */
/* For now, let's keep it clean sticky */
.slider {
    margin-top: 0;
    height: 70vh;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 1s ease-in-out, transform 6s ease;
    visibility: hidden;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    z-index: 2;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    /* Darken slightly */
    z-index: 3;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--surface-color);
    z-index: 4;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

.slide-content h2 {
    font-size: 4rem;
    color: var(--surface-color);
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease 0.3s;
}

.slide-content p {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 30px;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease 0.5s;
}

.slide.active .slide-content h2,
.slide.active .slide-content p {
    opacity: 1;
    transform: translateY(0);
}

.slider-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    color: var(--surface-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-nav button:hover {
    background: var(--surface-color);
    color: var(--primary-color);
}

.slider-nav .prev {
    left: 30px;
}

.slider-nav .next {
    right: 30px;
}

/* =====================
   6. SECTIONS
===================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.section-header .divider {
    width: 60px;
    height: 3px;
    background: var(--accent-color);
    margin: 15px auto 0;
}

/* =====================
   7. PRODUCT CARDS
===================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

.product-card {
    background: var(--surface-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    group: 'card';
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 133%;
    /* 3:4 Aspect Ratio */
}

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

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

.product-actions {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 2;
}

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

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.action-btn:hover {
    background: var(--primary-color);
    color: var(--surface-color);
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-category {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.product-price {
    font-family: var(--font-body);
    color: var(--accent-color);
    font-weight: 700;
    font-size: 16px;
}

/* =====================
   8. SHOP PAGE
===================== */
.shop-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    padding: 40px 0;
}

.filter-sidebar {
    background: var(--surface-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h4 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.filter-list li {
    margin-bottom: 10px;
}

.filter-list a {
    color: var(--text-light);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-list a:hover,
.filter-list a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* =====================
   9. PRODUCT DETAILS
===================== */
.product-detail-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: 60px 0;
    align-items: start;
}

.product-gallery {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.product-meta h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.product-meta .price {
    font-size: 2rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 25px;
}

.product-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 30px;
}

.product-options {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* =====================
   10. CART & TABLES
===================== */
.table-responsive {
    overflow-x: auto;
    background: var(--surface-color);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

th {
    background-color: #f8f8f8;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

td {
    vertical-align: middle;
}

.cart-summary {
    background: var(--surface-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-top: 30px;
    text-align: right;
}

/* =====================
   11. FOOTER
===================== */
footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 80px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-about h3 {
    color: #fff;
    margin-bottom: 20px;
}

.footer-about p {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 20px;
}

.footer-links h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
    font-family: var(--font-body);
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #aaa;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #666;
    font-size: 13px;
}

/* =====================
   12. RESPONSIVE
===================== */
@media (max-width: 992px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .product-detail-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 10px 0;
    }

    .menu-toggle {
        display: block;
    }

    .header-nav {
        position: fixed;
        top: 60px;
        /* Header height */
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--surface-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        transition: 0.4s ease;
        border-top: 1px solid var(--border-color);
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
    }

    .header-nav.active {
        left: 0;
    }

    .header-nav a {
        font-size: 18px;
    }

    .slide-content h2 {
        font-size: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-about,
    .footer-links {
        margin-bottom: 30px;
    }

    .social-links {
        justify-content: center;
    }

    /* Table responsive card view */
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: var(--surface-color);
        padding: 15px;
    }

    td {
        border: none;
        position: relative;
        padding-left: 50%;
        text-align: right;
        padding: 10px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    td:last-child {
        border-bottom: none;
    }

    td:before {
        position: absolute;
        top: 10px;
        left: 0;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 600;
        color: var(--primary-color);
        content: attr(data-label);
    }
}

/* =====================
   13. ADMIN PANEL
===================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: #f4f7f6;
}

.admin-sidebar {
    width: 280px;
    background: var(--primary-color);
    color: var(--surface-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    color: var(--surface-color);
    font-size: 24px;
    margin: 0;
    letter-spacing: 2px;
}

.sidebar-header span {
    color: var(--accent-color);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 3px;
    display: block;
    margin-top: 5px;
}

.sidebar-menu {
    padding: 20px 0;
    flex: 1;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.sidebar-menu a i {
    width: 25px;
    margin-right: 10px;
    font-size: 16px;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--surface-color);
    border-left-color: var(--accent-color);
}

.sidebar-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    display: flex;
    align-items: center;
}

.sidebar-footer a:hover {
    color: var(--error-color);
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    width: calc(100% - 280px);
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    background: var(--surface-color);
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.admin-breadcrumb h4 {
    margin: 0;
    font-size: 20px;
    color: var(--primary-color);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--surface-color);
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-gold);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-info h3 {
    font-size: 32px;
    margin: 5px 0;
    color: var(--primary-color);
}

.stat-info p {
    color: var(--text-light);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent-color);
}

.recent-orders {
    background: var(--surface-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.section-title h3 {
    font-size: 18px;
    margin: 0;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-paid {
    background: #e3f2fd;
    color: #1976d2;
}

.status-shipped {
    background: #e8f5e9;
    color: #388e3c;
}

.status-completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

/* Responsive Admin */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 0;
        overflow: hidden;
    }

    .admin-sidebar.active {
        width: 280px;
    }

    .admin-main {
        margin-left: 0;
        width: 100%;
    }
}

/* =====================
   14. ALERTS
===================== */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}