/**
 * Packbox Theme Override
 * Warm cream + deep forest green + mustard yellow
 */

:root {
    --primary: #1a3a2a;
    --primary-dark: #0e2418;
    --primary-light: #2d5a40;
    --accent: #f5d657;
    --accent-soft: #fbe89a;

    --bg: #f5f1ea;
    --bg-alt: #ece6d9;
    --bg-card: #eae4d6;
    --bg-card-dark: #1a3a2a;

    --text-dark: #14201b;
    --text-medium: #4a5c52;
    --text-light: #8a8a7e;
    --border: #e2dccf;
    --border-light: #ede7db;

    --shadow-sm: 0 1px 2px rgba(20,32,27,.05);
    --shadow-md: 0 2px 8px rgba(20,32,27,.06);
    --shadow-lg: 0 4px 16px rgba(20,32,27,.08);

    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --radius-pill: 999px;
}

html, body {
    background: var(--bg);
    color: var(--text-dark);
    font-family: 'Prompt', 'Inter', 'Segoe UI', sans-serif;
    letter-spacing: -0.01em;
}

a { color: var(--text-dark); }
a:hover { color: var(--primary); }

.container { max-width: 1240px; padding: 0 20px; }

/* Header */
.main-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    box-shadow: none;
}
.header-inner { padding: 18px 0; gap: 20px; }
.logo { color: var(--primary); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.logo img { height: 36px; width: auto; border-radius: 0; }
.logo-text span { font-size: 20px; font-weight: 800; }
.logo-text small { color: var(--text-light); font-size: 11px; }

.search-bar {
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg);
    box-shadow: none;
    padding: 4px 4px 4px 20px;
    max-width: 520px;
}
.search-bar:hover, .search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: none;
}
.search-bar input { padding: 8px 12px; font-size: 14px; background: transparent; }
.search-bar .search-btn { background: var(--primary); width: 36px; height: 36px; border-radius: 50%; }
.search-bar .search-btn:hover { background: var(--primary-dark); }

.header-btn {
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    font-weight: 500;
    color: var(--text-dark);
}
.header-btn:hover { background: var(--bg-alt); }
.header-btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 10px 22px;
    font-weight: 600;
}
.header-btn-primary:hover { background: var(--primary-dark); color: #fff; }

.cart-badge { background: var(--primary); }

.user-menu-toggle { border-color: var(--border); background: var(--bg); border-radius: var(--radius-pill); }
.user-menu-toggle:hover { box-shadow: none; border-color: var(--primary); }
.user-menu-toggle .avatar { background: var(--primary); }

/* Categories nav — minimal text row */
.categories-nav {
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    padding: 0;
}
.categories-scroll { gap: 36px; padding: 14px 0; display: flex; overflow-x: auto; }
.category-item {
    display: inline-flex;
    align-items: center;
    flex-direction: row;
    gap: 6px;
    padding: 6px 2px;
    border-radius: 0;
    min-width: 0;
    background: transparent;
    color: var(--text-medium);
    font-weight: 500;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.category-item i { font-size: 14px; color: var(--text-light); }
.category-item:hover { background: transparent; color: var(--primary); }
.category-item:hover i { color: var(--primary); }
.category-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}
.category-item.active i { color: var(--primary); }

/* Hero */
.hero {
    background: var(--bg);
    padding: 60px 20px 80px;
    min-height: auto;
}
.hero::before, .hero::after { display: none; }
.hero-content {
    max-width: 780px;
    text-align: center;
    margin: 0 auto;
}
.hero h1 {
    color: var(--text-dark);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 18px;
}
.hero p {
    color: var(--text-medium);
    font-size: 17px;
    margin-bottom: 32px;
    line-height: 1.6;
}
.hero-cta {
    background: var(--primary);
    color: #fff;
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    box-shadow: none;
    text-decoration: none;
}
.hero-cta:hover { background: var(--primary-dark); color: #fff; }

/* Banner slider */
.banner-slider { aspect-ratio: 21/8; max-height: 440px; border-radius: 0; }
.banner-overlay h1 { font-weight: 800; letter-spacing: -0.02em; }

/* Section */
.section { padding: 60px 0; }
.section-title {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 8px;
}
.section-subtitle {
    color: var(--text-medium);
    text-align: center;
    font-size: 16px;
    margin-bottom: 40px;
}
.section-header { margin-bottom: 36px; }
.section-header-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

/* Product grid — Packbox cream tiles */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: none;
    border: 0;
    transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.product-card > a { display: block; color: inherit; }

.product-image {
    background: var(--bg-card);
    aspect-ratio: 1;
    padding: 18px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image img {
    mix-blend-mode: multiply;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: var(--text-dark);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    letter-spacing: 0.02em;
}
.product-badge.sale { background: var(--primary); color: #fff; }

.product-wishlist {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    border: 0;
    cursor: pointer;
    color: var(--text-medium);
    font-size: 14px;
}
.product-wishlist.active { color: #e11d48; }

.product-info {
    padding: 14px 18px 20px;
    background: var(--bg);
}
.product-category {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
    font-weight: 500;
}
.product-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-dark);
    margin-bottom: 6px;
    min-height: auto;
}
.product-rating { font-size: 13px; color: var(--text-medium); }
.product-rating .stars { color: var(--accent); }
.product-price { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.price-current {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
}
.price-old {
    font-size: 13px;
    color: var(--text-light);
    text-decoration: line-through;
}

.price-section { padding: 20px 0; border-bottom: 1px solid var(--border-light); }
.price-section .price-current { font-size: 32px; color: var(--text-dark); font-weight: 800; }

/* Buttons */
.btn {
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all .15s;
    border: 1px solid transparent;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline {
    background: transparent;
    border-color: var(--text-dark);
    color: var(--text-dark);
}
.btn-outline:hover { background: var(--text-dark); color: #fff; }
.btn-accent { background: var(--accent); color: var(--text-dark); }
.btn-accent:hover { background: #ebc847; color: var(--text-dark); }
.btn-lg { padding: 14px 30px; font-size: 15px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: #c62828; color: #fff; }

/* Forms */
.form-control, .form-select,
input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="url"],
input[type="date"], textarea, select {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    width: 100%;
    font-family: inherit;
    color: var(--text-dark);
    transition: border-color .15s;
}
.form-control:focus, .form-select:focus, textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,58,42,.08);
}
.form-label { font-size: 13px; font-weight: 600; color: var(--text-dark); margin-bottom: 6px; display: block; }
.form-help { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }

/* White panel blocks get cream bg instead */
[style*="background:white"], [style*="background: white"] {
    background: var(--bg) !important;
    border: 1px solid var(--border-light);
}

/* Feature blocks */
.stat-card, .feature-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 0;
}

/* Footer dark */
.main-footer {
    background: var(--primary);
    color: var(--bg-alt);
    padding: 60px 0 24px;
    margin-top: 80px;
}
.main-footer h4 { color: #fff; font-weight: 700; margin-bottom: 14px; font-size: 14px; }
.main-footer a, .main-footer p, .main-footer li { color: rgba(255,255,255,.72); font-size: 14px; }
.main-footer a:hover { color: var(--accent); }
.main-footer ul { list-style: none; padding: 0; }
.main-footer ul li { margin-bottom: 8px; }
.footer-about p { line-height: 1.7; }
.social-links a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}
.social-links a:hover { background: var(--accent); color: var(--primary); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 40px;
    padding-top: 24px;
    text-align: center;
    color: rgba(255,255,255,.5);
    font-size: 13px;
}
.main-footer #newsletterForm input {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    color: #fff;
}
.main-footer #newsletterForm input::placeholder { color: rgba(255,255,255,.5); }
.main-footer #newsletterForm .btn { background: var(--accent); color: var(--primary); }

/* Breadcrumb */
.breadcrumb {
    font-size: 13px;
    color: var(--text-light);
    padding: 16px 0;
    margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-medium); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-separator { margin: 0 6px; color: var(--text-light); }
.breadcrumb-current { color: var(--text-dark); font-weight: 500; }

/* Alerts */
.alert {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 14px;
    border-left: 3px solid var(--primary);
    margin-bottom: 12px;
}
.alert-success { background: #e7f3ec; border-color: #c9e4d4; border-left-color: var(--primary); color: #0f3d2a; }
.alert-error   { background: #fdecec; border-color: #fad4d4; border-left-color: #c62828; color: #8b1f1f; }
.alert-warning { background: #fdf5e0; border-color: #f9e6b2; border-left-color: #c49a00; color: #6b4e00; }
.alert-info    { background: #e7f0f8; border-color: #cfdff0; border-left-color: #3b82f6; color: #1e3a5f; }

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.badge-success { background: #dbead0; color: var(--primary); }
.badge-warning { background: #fbe89a; color: #6b4e00; }
.badge-danger  { background: #fad4d4; color: #8b1f1f; }
.badge-info    { background: #d8e7f5; color: #1e3a5f; }
.badge-secondary { background: var(--bg-card); color: var(--text-medium); }
.badge-primary { background: var(--primary); color: #fff; }

/* Cart summary */
.cart-summary {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.cart-summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; }
.cart-summary-row.total { font-size: 18px; font-weight: 700; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 8px; }

.cart-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.cart-table th { background: var(--bg-alt); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-medium); padding: 14px 16px; text-align: left; font-weight: 600; }
.cart-table td { padding: 16px; border-bottom: 1px solid var(--border-light); }
.cart-item-info { display: flex; gap: 14px; align-items: center; }
.cart-item-img { width: 70px; height: 70px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-alt); flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }

/* Auth pages */
.auth-wrapper {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.auth-box {
    background: #fff;
    max-width: 420px;
    width: 100%;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo img { margin: 0 auto 12px; height: 48px; }
.auth-logo h1 { font-size: 22px; font-weight: 800; color: var(--text-dark); }
.auth-logo p { color: var(--text-light); font-size: 14px; margin-top: 4px; }
.auth-divider { text-align: center; color: var(--text-light); font-size: 12px; margin: 20px 0; text-transform: uppercase; letter-spacing: .1em; }

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
}
.tab-link {
    padding: 12px 20px;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--text-medium);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}
.tab-link:hover { color: var(--primary); }
.tab-link.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Quantity selector */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    overflow: hidden;
    background: var(--bg);
}
.quantity-selector button {
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-dark);
}
.quantity-selector button:hover { background: var(--bg-alt); }
.quantity-selector input {
    width: 48px;
    border: 0;
    background: transparent;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

/* Lang switcher */
.lang-switcher { border-color: var(--border); background: var(--bg); border-radius: var(--radius-pill); overflow: hidden; }
.lang-switcher .lang-opt { color: var(--text-medium); padding: 6px 12px; }
.lang-switcher .lang-opt.active { background: var(--primary); color: #fff; }

/* Chat float */
.chat-float a { border-radius: var(--radius-pill); }

/* Product page */
.gallery-main {
    background: var(--bg-card);
    border-radius: var(--radius);
    aspect-ratio: 1;
    overflow: hidden;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumb {
    width: 72px; height: 72px;
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding: 6px;
    cursor: pointer;
    overflow: hidden;
}
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

/* Pagination */
.pagination { display: flex; list-style: none; gap: 4px; padding: 0; margin: 20px 0; justify-content: center; }
.pagination li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-size: 14px;
    background: var(--bg);
    text-decoration: none;
}
.pagination li a:hover { border-color: var(--primary); color: var(--primary); }
.pagination li.active a { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Mobile */
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; }
    .search-bar { order: 3; width: 100%; max-width: none; }
    .hero { padding: 40px 20px 60px; }
    .section { padding: 40px 0; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .product-info { padding: 12px 14px 16px; }
    .product-title { font-size: 14px; }
}
