/* ============================================================
   StoreFluenceAI – Main Stylesheet
   Aesthetic: Luxury Editorial / Dark Cream / Serif+Sans Duo
   ============================================================ */

:root {
    --cream: #FAF7F2;
    --ink: #1A1714;
    --muted: #6B6560;
    --border: #E5DDD5;
    --accent: #C8945A;
    --accent-dark: #A57A45;
    --success-green: #2D7A4F;
    --danger-red: #B03A2E;
    --nav-h: 70px;
    --topbar-h: 36px;
    --radius: 4px;
    --shadow: 0 2px 20px rgba(26,23,20,0.08);
    --shadow-hover: 0 8px 40px rgba(26,23,20,0.15);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    color: var(--ink);
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-dark); }

img { max-width: 100%; }

/* ── Top Bar ── */
.topbar {
    background: var(--ink);
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    letter-spacing: 0.03em;
}
.topbar a { color: rgba(255,255,255,0.75); }
.topbar a:hover { color: var(--accent); }

/* ── Navbar ── */
.main-nav {
    background: #fff;
    height: var(--nav-h);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 8px rgba(26,23,20,0.05);
    z-index: 1000;
}
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.brand-icon { font-size: 1.6rem; color: var(--accent); }
.brand-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.brand-ai { color: var(--accent); }

.main-nav .nav-link {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted) !important;
    padding: 0 16px !important;
    transition: color .2s;
}
.main-nav .nav-link:hover, .main-nav .nav-link.active { color: var(--ink) !important; }

.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px 0;
}
.dropdown-item { font-size: 13px; padding: 8px 20px; color: var(--ink); }
.dropdown-item:hover { background: var(--cream); color: var(--accent); }

.nav-cart {
    position: relative;
    font-size: 1.35rem;
    color: var(--ink);
    transition: color .2s;
}
.nav-cart:hover { color: var(--accent); }
.cart-badge {
    position: absolute;
    top: -6px; right: -8px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600;
}
.nav-icon { font-size: 1.2rem; color: var(--muted); }
.nav-icon:hover { color: var(--accent); }

/* ── Buttons ── */
.btn {
    border-radius: var(--radius);
    font-weight: 500;
    letter-spacing: 0.04em;
    font-size: 13px;
    padding: 10px 24px;
    transition: all .25s;
}
.btn-primary {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}
.btn-primary:hover { background: #2c2825; border-color: #2c2825; transform: translateY(-1px); }
.btn-accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.btn-outline-dark { border-color: var(--ink); color: var(--ink); }
.btn-outline-dark:hover { background: var(--ink); color: #fff; }
.btn-outline-accent { border: 1px solid var(--accent); color: var(--accent); background: transparent; }
.btn-outline-accent:hover { background: var(--accent); color: #fff; }

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, #1A1714 0%, #2C2319 50%, #3D2E1E 100%);
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C8945A' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; }
.hero-eyebrow {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 16px;
    display: block;
}
.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    color: #fff;
    line-height: 1.1;
    margin-bottom: 20px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p { color: rgba(255,255,255,0.65); font-size: 16px; max-width: 420px; margin-bottom: 32px; }

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 48px;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-family: 'Playfair Display', serif; font-size: 2rem; color: #fff; font-weight: 700; display: block; }
.hero-stat .label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.5); }

/* ── Section Titles ── */
.section-label {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
}
.section-title { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 8px; }
.section-divider {
    width: 40px; height: 2px;
    background: var(--accent);
    margin: 16px 0 40px;
}

/* ── Product Cards ── */
.product-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .3s ease;
    position: relative;
    height: 100%;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}
.product-card-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: var(--cream);
}
.product-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }

.product-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 2px;
}
.product-badge.new { background: var(--ink); }

.product-card-actions {
    position: absolute;
    bottom: 12px; right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all .25s;
}
.product-card:hover .product-card-actions { opacity: 1; transform: translateX(0); }
.card-action-btn {
    width: 36px; height: 36px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink);
    font-size: 14px;
    transition: all .2s;
    cursor: pointer;
    text-decoration: none;
}
.card-action-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.product-card-body { padding: 16px; }
.product-category { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 4px; }
.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.product-price { font-size: 16px; font-weight: 600; color: var(--accent); }
.product-price .original { text-decoration: line-through; color: var(--muted); font-size: 13px; font-weight: 400; margin-left: 6px; }

/* ── Category Tiles ── */
.cat-tile {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--ink);
    aspect-ratio: 1;
    display: flex; align-items: flex-end;
    padding: 20px;
    transition: transform .3s;
    cursor: pointer;
}
.cat-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
}
.cat-tile:hover { transform: translateY(-3px); }
.cat-tile-content { position: relative; z-index: 1; }
.cat-tile-icon { font-size: 2rem; color: var(--accent); display: block; margin-bottom: 4px; }
.cat-tile-name { font-family: 'Playfair Display', serif; color: #fff; font-size: 1.1rem; display: block; }
.cat-tile-count { font-size: 11px; color: rgba(255,255,255,0.6); letter-spacing: 0.06em; }

/* ── Product Detail ── */
.product-detail-img {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--cream);
    border: 1px solid var(--border);
}
.product-detail-img img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-detail-video { margin-top: 12px; border-radius: var(--radius); overflow: hidden; background: #000; }
.product-detail-video video { width: 100%; display: block; }

.product-detail-title { font-size: 2rem; margin-bottom: 8px; }
.product-detail-price { font-size: 2rem; color: var(--accent); font-weight: 600; font-family: 'Playfair Display', serif; }
.product-detail-cat { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.qty-control { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; width: fit-content; }
.qty-btn { width: 38px; height: 42px; background: var(--cream); border: none; cursor: pointer; font-size: 16px; transition: background .2s; }
.qty-btn:hover { background: var(--border); }
.qty-input { width: 56px; height: 42px; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); text-align: center; font-weight: 600; outline: none; background: #fff; }

/* ── Cart ── */
.cart-table { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cart-table th { background: var(--ink); color: #fff; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; padding: 14px 20px; }
.cart-table td { padding: 16px 20px; vertical-align: middle; border-bottom: 1px solid var(--border); }
.cart-product-img { width: 70px; height: 85px; object-fit: cover; border-radius: 2px; }
.cart-product-name { font-family: 'Playfair Display', serif; font-size: 15px; }

.order-summary-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.order-summary-title { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 14px; }
.summary-total { font-weight: 700; font-size: 18px; color: var(--accent); margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--border); }

/* ── Forms ── */
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; }
.form-label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 14px;
    background: var(--cream);
    color: var(--ink);
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200,148,90,0.12);
    background: #fff;
}

/* ── Alert ── */
.alert { border-radius: var(--radius); font-size: 14px; }
.alert-success { background: #f0faf5; border-color: #a8d5b5; color: var(--success-green); }
.alert-danger { background: #fdf3f2; border-color: #e8b4b0; color: var(--danger-red); }
.alert-info { background: #f0f6ff; border-color: #b3cff5; color: #1a4a8a; }

/* ── Page Header ── */
.page-header {
    background: linear-gradient(135deg, var(--ink) 0%, #2c2319 100%);
    padding: 60px 0 50px;
    position: relative;
    overflow: hidden;
}
.page-header::after {
    content: '';
    position: absolute; top: 0; right: 0;
    width: 300px; height: 100%;
    background: linear-gradient(to left, rgba(200,148,90,0.1), transparent);
}
.page-header h1 { color: #fff; font-size: 2.2rem; margin-bottom: 8px; }
.page-header .breadcrumb { background: none; padding: 0; margin: 0; }
.page-header .breadcrumb-item { font-size: 13px; color: rgba(255,255,255,0.5); }
.page-header .breadcrumb-item a { color: rgba(255,255,255,0.6); }
.page-header .breadcrumb-item.active { color: var(--accent); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.3); }

/* ── Shop Filters ── */
.filter-sidebar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.filter-title { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.filter-item label { font-size: 14px; cursor: pointer; }
.price-range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ── Footer ── */
.site-footer {
    background: var(--ink);
    color: rgba(255,255,255,0.65);
    padding: 64px 0 0;
}
.footer-brand { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: #fff; }
.footer-desc { font-size: 13px; max-width: 280px; }
.footer-heading { font-family: 'DM Sans', sans-serif; font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 16px; font-weight: 600; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; font-size: 13px; }
.footer-links a { color: rgba(255,255,255,0.6); transition: color .2s; }
.footer-links a:hover { color: var(--accent); }
.social-links { display: flex; gap: 12px; }
.social-links a { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,0.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.6); transition: all .2s; }
.social-links a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer-divider { border-color: rgba(255,255,255,0.1); margin: 48px 0 20px; }
.footer-bottom { padding-bottom: 24px; font-size: 12px; color: rgba(255,255,255,0.4); }
.payment-icons { font-size: 13px; color: rgba(255,255,255,0.5); }

/* ── Feature Strip ── */
.feature-strip { background: var(--accent); padding: 20px 0; }
.feature-item { display: flex; align-items: center; gap: 12px; }
.feature-item i { font-size: 1.5rem; color: #fff; }
.feature-item .feat-title { font-weight: 600; font-size: 14px; color: #fff; display: block; line-height: 1.2; }
.feature-item .feat-sub { font-size: 11px; color: rgba(255,255,255,0.75); display: block; }

/* ── Badges/Tags ── */
.cat-badge { display: inline-block; font-size: 11px; padding: 3px 10px; border-radius: 30px; background: var(--cream); border: 1px solid var(--border); color: var(--muted); margin-right: 6px; margin-bottom: 6px; cursor: pointer; transition: all .2s; }
.cat-badge:hover, .cat-badge.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ── Flash Messages ── */
.flash-message { position: fixed; bottom: 24px; right: 24px; z-index: 9999; min-width: 280px; border-radius: var(--radius); box-shadow: var(--shadow-hover); animation: slideIn .3s ease; }
@keyframes slideIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Checkout Steps ── */
.checkout-steps { display: flex; justify-content: center; gap: 0; margin-bottom: 40px; }
.step { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.step-num { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.step.active .step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.active { color: var(--ink); }
.step-line { width: 60px; height: 2px; background: var(--border); margin: 0 10px; }

/* ── Admin Panel ── */
.admin-sidebar { width: 240px; min-height: 100vh; background: var(--ink); position: fixed; left: 0; top: 0; z-index: 100; }
.admin-sidebar .brand { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.admin-sidebar .brand-text { font-family: 'Playfair Display', serif; color: #fff; font-size: 1.1rem; }
.admin-nav { padding: 16px 0; }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 24px; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.6); text-decoration: none; letter-spacing: 0.03em; transition: all .2s; }
.admin-nav a:hover, .admin-nav a.active { background: rgba(200,148,90,0.12); color: var(--accent); }
.admin-nav a i { font-size: 1rem; width: 18px; }
.admin-content { margin-left: 240px; min-height: 100vh; background: #F5F2EE; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--border); padding: 0 28px; height: 64px; display: flex; align-items: center; justify-content: space-between; }
.admin-topbar h2 { font-size: 1.2rem; margin: 0; }
.admin-inner { padding: 28px; }
.admin-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.admin-card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.admin-card-header h5 { margin: 0; font-size: 1rem; }
.admin-stat-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.admin-stat-card .stat-num { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 700; }
.admin-stat-card .stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

/* ── Table ── */
.table-custom { border-collapse: separate; border-spacing: 0; width: 100%; }
.table-custom th { background: #F5F2EE; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; font-weight: 600; }
.table-custom td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 14px; }
.table-custom tr:last-child td { border-bottom: none; }
.table-custom tr:hover td { background: #faf8f6; }

/* ── Responsive ── */
@media (max-width: 991px) {
    .admin-sidebar { width: 100%; min-height: auto; position: relative; }
    .admin-content { margin-left: 0; }
    .hero { min-height: 400px; }
    .hero-stats { gap: 20px; }
}
@media (max-width: 767px) {
    .hero h1 { font-size: 2rem; }
    .cart-table td, .cart-table th { padding: 12px; }
    .form-card { padding: 24px 16px; }
}

/* ── Animations ── */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity .5s, transform .5s; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ── Misc ── */
.divider-fancy { display: flex; align-items: center; gap: 16px; margin: 12px 0; }
.divider-fancy::before, .divider-fancy::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider-fancy span { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }

.stock-indicator { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.stock-dot { width: 8px; height: 8px; border-radius: 50%; }
.in-stock .stock-dot { background: #2D7A4F; }
.out-stock .stock-dot { background: var(--danger-red); }

.no-products { text-align: center; padding: 80px 20px; color: var(--muted); }
.no-products i { font-size: 4rem; display: block; margin-bottom: 20px; }
