:root {
    --primary: #1a4d2e;
    --primary-light: #4f7a62;
    --primary-dark: #143d24;
    --cream: #fdfcf8;
    --bg: #f7f6f1;
    --white: #ffffff;
    --text: #2c2c2c;
    --muted: #7a7a7a;
    --border: #e8e6df;
    --accent: #e8b86d;
    --danger: #c0392b;
    --success: #27ae60;
    --radius: 16px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Be Vietnam Pro', 'Inter', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 15px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 600; margin: 0 0 .5em; color: var(--primary-dark); }
.container { width: 92%; max-width: 1320px; margin: 0 auto; }
.page-main { min-height: 55vh; background: var(--cream); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 26px; border-radius: 50px; border: none; cursor: pointer;
    font-family: var(--font-body); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .5px;
    transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-light { background: var(--white); color: var(--primary); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-sm { padding: 8px 18px; font-size: 13px; }

/* Announcement bar */
.announcement-bar { background: var(--primary); color: var(--white); font-size: 13px; padding: 10px 0; }
.announcement-inner { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; }
.announcement-inner span { opacity: .95; }
.announcement-inner i { margin-right: 6px; }

/* Header */
.site-header { background: var(--white); position: sticky; top: 0; z-index: 100; border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; }
.logo { display: flex; align-items: center; font-family: var(--font-heading); font-size: 26px; font-weight: 700; color: var(--primary); }
.logo img { height: 42px; width: auto; }
.logo-text { white-space: nowrap; }

.main-nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; align-items: center; }
.main-nav a { color: var(--text); font-weight: 500; font-size: 14px; position: relative; }
.main-nav a:hover { color: var(--primary); }
.main-nav .has-dropdown { position: relative; }
.main-nav .dropdown {
    position: absolute; top: 100%; left: 0; background: var(--white); min-width: 220px;
    box-shadow: var(--shadow-lg); border-radius: var(--radius-sm); padding: 12px 0; opacity: 0; visibility: hidden;
    transform: translateY(10px); transition: all .25s; list-style: none; margin: 0;
}
.main-nav .has-dropdown:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav .dropdown li { padding: 0; }
.main-nav .dropdown a { display: block; padding: 10px 22px; font-weight: 400; }
.main-nav .dropdown a:hover { background: var(--cream); }
.main-nav .divider { border-top: 1px solid var(--border); margin: 8px 0; }

.header-actions { display: flex; align-items: center; gap: 18px; }
.search-form { display: flex; align-items: center; background: var(--cream); border-radius: 50px; padding: 4px 8px; border: 1px solid var(--border); }
.search-form input { border: none; background: transparent; padding: 6px 10px; font-family: var(--font-body); width: 160px; outline: none; }
.search-form button { background: transparent; border: none; color: var(--primary); cursor: pointer; padding: 6px; }
.action-link { position: relative; color: var(--text); font-size: 18px; }
.action-link:hover { color: var(--primary); }
.action-link .count {
    position: absolute; top: -8px; right: -8px; background: var(--primary); color: var(--white);
    font-size: 10px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
}
.lang-switcher select { border: 1px solid var(--border); border-radius: 20px; padding: 4px 8px; font-family: var(--font-body); background: var(--cream); cursor: pointer; }
.mobile-toggle { display: none; background: none; border: none; font-size: 22px; color: var(--primary); cursor: pointer; }

/* Hero / Banner */
.hero { position: relative; height: 520px; display: flex; align-items: center; background: var(--primary-dark); color: var(--white); overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero-content { position: relative; z-index: 2; max-width: 620px; }
.hero h1 { color: var(--white); font-size: 52px; line-height: 1.15; margin-bottom: 18px; }
.hero p { font-size: 18px; margin-bottom: 30px; opacity: .9; }

/* Sections */
.section { padding: 64px 0; }
.section-title { font-size: 32px; text-align: center; margin-bottom: 40px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.section-header h2 { margin: 0; font-size: 28px; }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 768px) { .product-grid { grid-template-columns: repeat(2,1fr); gap: 18px; } }
@media (max-width: 480px) { .product-grid { grid-template-columns: 1fr 1fr; } }

.product-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s; position: relative;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-image { position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--cream); }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s; }
.product-image .img-hover { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.product-card:hover .img-hover { opacity: 1; }
.product-card:hover .img-default { opacity: 1; }
.badge {
    position: absolute; top: 12px; left: 12px; padding: 5px 12px; border-radius: 50px; font-size: 11px;
    font-weight: 700; text-transform: uppercase; color: var(--white); z-index: 2;
}
.badge-sale { background: var(--danger); }
.badge-new { background: var(--success); }
.badge-bestseller { background: var(--accent); color: var(--text); }
.badge-outofstock { background: var(--muted); }
.wishlist-btn {
    position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
    background: var(--white); border: none; display: grid; place-items: center; color: var(--text); cursor: pointer;
    box-shadow: var(--shadow); transition: background .2s, color .2s;
}
.wishlist-btn:hover, .wishlist-btn.active { background: var(--primary); color: var(--white); }
.quick-add {
    position: absolute; bottom: 12px; left: 12px; right: 12px; opacity: 0; transform: translateY(10px); transition: all .25s;
}
.product-card:hover .quick-add { opacity: 1; transform: translateY(0); }
.quick-add form button { width: 100%; }
.product-info { padding: 18px; }
.product-brand { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .5px; margin-bottom: 4px; }
.product-name { font-family: var(--font-heading); font-size: 17px; margin-bottom: 8px; display: block; color: var(--text); }
.product-name:hover { color: var(--primary); }
.product-price { font-weight: 700; color: var(--primary); font-size: 16px; }
.product-price .old { text-decoration: line-through; color: var(--muted); font-weight: 400; margin-left: 8px; }
.product-price .save { color: var(--danger); font-weight: 600; margin-left: 8px; font-size: 13px; }

/* Categories */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.category-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; display: block; }
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.category-card:hover img { transform: scale(1.06); }
.category-title { position: absolute; inset: auto 0 0 0; padding: 20px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: var(--white); font-family: var(--font-heading); font-size: 20px; margin: 0; }

/* Filters */
.layout-sidebar { display: grid; grid-template-columns: 260px 1fr; gap: 32px; }
@media (max-width: 992px) { .layout-sidebar { grid-template-columns: 1fr; } }
.sidebar { background: var(--white); padding: 22px; border-radius: var(--radius); box-shadow: var(--shadow); height: fit-content; }
.filter-group { margin-bottom: 24px; }
.filter-group h4 { font-size: 16px; margin-bottom: 12px; }
.filter-group label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; cursor: pointer; }
.filter-group input[type="checkbox"], .filter-group input[type="radio"] { accent-color: var(--primary); }
.price-inputs { display: flex; gap: 10px; }
.price-inputs input { width: 50%; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); }

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; }
.pagination a, .pagination span { padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text); }
.pagination a:hover, .pagination .current { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px 0; }
.product-detail > .product-meta { min-width: 0; }
@media (max-width: 900px) { .product-detail { grid-template-columns: 1fr; } }
.gallery { position: relative; min-width: 0; }
.main-image { border-radius: var(--radius); overflow: hidden; background: var(--white); aspect-ratio: 4/5; margin-bottom: 16px; }
.main-image img { width: 100%; height: 100%; object-fit: cover; }
.thumbnails { display: flex; gap: 12px; overflow-x: auto; max-width: calc(80px * 4 + 12px * 3); scroll-snap-type: x mandatory; scroll-behavior: smooth; }
.thumb { width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; cursor: pointer; flex-shrink: 0; scroll-snap-align: start; }
.thumb.active, .thumb:hover { border-color: var(--primary); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-meta .brand { color: var(--muted); text-transform: uppercase; letter-spacing: .8px; font-size: 13px; margin-bottom: 8px; }
.product-meta h1 { font-size: 36px; margin-bottom: 10px; }
.product-meta .sku { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.price-block { font-size: 26px; font-weight: 700; margin-bottom: 20px; color: var(--primary); }
.price-block .old { text-decoration: line-through; color: var(--muted); font-size: 18px; margin-left: 12px; }
.price-block .discount { color: var(--danger); font-size: 15px; margin-left: 12px; }
.options { margin: 20px 0; }
.option-row { margin-bottom: 16px; }
.option-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.option-row select { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 180px; background: var(--white); }
.qty-control { display: inline-flex; border: 1px solid var(--border); border-radius: 50px; overflow: hidden; align-items: center; }
.qty-control button { width: 38px; height: 38px; border: none; background: var(--cream); cursor: pointer; font-size: 16px; }
.qty-control input { width: 50px; text-align: center; border: none; font-weight: 600; }
.detail-actions { display: flex; gap: 14px; margin: 26px 0; flex-wrap: wrap; }
.accordion { border-top: 1px solid var(--border); margin-top: 26px; }
.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-title { padding: 16px 0; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height .25s; padding: 0 0 0 0; color: var(--muted); }
.accordion-item.open .accordion-body { max-height: 500px; padding-bottom: 18px; }

/* Cart */
.cart-table { width: 100%; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cart-table th, .cart-table td { padding: 16px; text-align: left; border-bottom: 1px solid var(--border); }
.cart-table th { background: var(--cream); font-weight: 600; }
.cart-product { display: flex; align-items: center; gap: 14px; }
.cart-product img { width: 70px; height: 90px; object-fit: cover; border-radius: var(--radius-sm); }
.cart-summary { background: var(--white); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); height: fit-content; }
.cart-summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; }
.cart-summary-row.total { font-size: 20px; font-weight: 700; color: var(--primary); border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-group input, .form-group select, .form-group textarea, .form-control {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 14px; background: var(--white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: 2px solid var(--primary-light); border-color: var(--primary); }
textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.alert-success { background: #e9f7ef; color: var(--success); border: 1px solid #b7e4c7; }
.alert-warning { background: #fef9e7; color: #b7950b; border: 1px solid #f9e79f; }
.alert-danger { background: #fdedec; color: var(--danger); border: 1px solid #f5b7b1; }

/* Footer */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,.8); padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-title { color: var(--white); font-size: 18px; margin-bottom: 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,.8); }
.footer-col a:hover { color: var(--white); }
.newsletter-form { display: flex; gap: 8px; margin-top: 12px; }
.newsletter-form input { flex: 1; padding: 10px 12px; border: none; border-radius: var(--radius-sm); }
.newsletter-form button { background: var(--primary-light); color: var(--white); border: none; border-radius: var(--radius-sm); padding: 0 16px; cursor: pointer; }
.social-links { display: flex; gap: 14px; margin-top: 16px; }
.social-links a { color: var(--white); font-size: 18px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding-top: 20px; text-align: center; font-size: 13px; }

/* Admin */
.admin-body { background: #f4f6f9; }
.admin-header { background: var(--primary); color: var(--white); padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; }
.admin-wrap { display: flex; min-height: calc(100vh - 60px); }
.admin-sidebar { width: 260px; background: var(--white); border-right: 1px solid var(--border); padding: 24px 0; }
.admin-sidebar ul { list-style: none; padding: 0; margin: 0; }
.admin-sidebar a { display: block; padding: 12px 24px; color: var(--text); font-weight: 500; border-left: 4px solid transparent; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--cream); border-color: var(--primary); color: var(--primary); }
.admin-main { flex: 1; padding: 30px; }
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-card { background: var(--white); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card .number { font-size: 28px; font-weight: 700; color: var(--primary); margin-top: 6px; }
.admin-table { width: 100%; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { padding: 14px; border-bottom: 1px solid var(--border); text-align: left; }
.admin-table th { background: var(--cream); font-weight: 600; }
.admin-table tr:last-child td { border-bottom: none; }

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 10px; } .mt-2 { margin-top: 20px; } .mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; } .mb-2 { margin-bottom: 20px; } .mb-3 { margin-bottom: 30px; }
.d-flex { display: flex; } .justify-between { justify-content: space-between; } .align-center { align-items: center; }
.gap-2 { gap: 16px; }

@media (max-width: 992px) {
    .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 16px 0; }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; align-items: flex-start; padding: 0 4%; gap: 8px; }
    .main-nav .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: 14px; }
    .mobile-toggle { display: block; }
    .search-form { display: none; }
    .header-actions { gap: 14px; }
    .category-grid { grid-template-columns: repeat(2,1fr); }
    .hero h1 { font-size: 34px; }
    .admin-grid { grid-template-columns: repeat(2,1fr); }
    .admin-wrap { flex-direction: column; }
    .admin-sidebar { width: 100%; }
}
