:root {
    --primary: #2f7d4f;
    --primary-dark: #245f3d;
    --accent: #f5a623;
    --danger: #e5484d;
    --bg: #fafaf8;
    --card-bg: #ffffff;
    --text: #212529;
    --muted: #6b7280;
    --border: #e5e7eb;
    --radius: 10px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.2rem; }
.section { padding: 2.2rem 0; }
.muted { color: var(--muted); }
.empty-state { text-align: center; padding: 3rem 0; color: var(--muted); }

/* ---- Buttons ---- */
.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 0.7rem 1.4rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }
.btn-outline {
    display: inline-block;
    background: #fff;
    color: var(--primary);
    padding: 0.65rem 1.3rem;
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    margin-top: 0.6rem;
}
.link-danger { background: none; border: none; color: var(--danger); cursor: pointer; font-size: 0.85rem; padding: 0; font-family: inherit; }
.link-more { color: var(--primary); text-decoration: none; font-weight: 500; }

/* ---- Header ---- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.topbar-strip { background: var(--primary); color: #fff; text-align: center; font-size: 0.78rem; padding: 0.4rem; }
.header-main { display: flex; align-items: center; gap: 1.2rem; padding: 0.9rem 1.2rem; }
.logo { font-size: 1.4rem; font-weight: 800; color: var(--primary); text-decoration: none; white-space: nowrap; }
.header-search { flex: 1; display: flex; max-width: 480px; }
.header-search input { flex: 1; padding: 0.55rem 0.8rem; border: 1px solid var(--border); border-radius: 8px 0 0 8px; font-size: 0.9rem; }
.header-search button { border: 1px solid var(--border); border-left: none; background: #f3f4f6; border-radius: 0 8px 8px 0; padding: 0 0.9rem; cursor: pointer; }
.header-actions { display: flex; align-items: center; gap: 1.1rem; margin-left: auto; }
.icon-link { text-decoration: none; color: var(--text); font-size: 0.85rem; display: flex; align-items: center; gap: 0.3rem; position: relative; white-space: nowrap; }
.icon-label { font-size: 0.8rem; }
.cart-link { position: relative; }
.cart-badge { position: absolute; top: -8px; right: -10px; background: var(--accent); color: #fff; font-size: 0.65rem; font-weight: 700; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.account-dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; right: 0; top: 130%; background: #fff; border: 1px solid var(--border); border-radius: 8px; min-width: 160px; box-shadow: 0 6px 20px rgba(0,0,0,0.08); z-index: 10; }
.account-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 0.6rem 1rem; text-decoration: none; color: var(--text); font-size: 0.85rem; }
.dropdown-menu a:hover { background: #f3f4f6; }

.hamburger { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 0.4rem; }
.hamburger span { width: 22px; height: 2px; background: var(--text); }

.main-nav { display: flex; gap: 1.3rem; padding: 0.6rem 1.2rem; overflow-x: auto; border-top: 1px solid var(--border); }
.main-nav a { text-decoration: none; color: var(--text); font-size: 0.88rem; white-space: nowrap; }
.main-nav a:hover { color: var(--primary); }
.nav-offer { color: var(--danger) !important; font-weight: 600; }

/* ---- Hero ---- */
.hero { background: linear-gradient(135deg, #e7f4ec, #fdf6e6); padding: 3.5rem 0; text-align: center; }
.hero-inner h1 { font-size: 2.2rem; margin-bottom: 0.6rem; }
.hero-inner p { color: var(--muted); margin-bottom: 1.4rem; }

/* ---- Section headers ---- */
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.section-header h2 { margin: 0; font-size: 1.3rem; }

/* ---- Product grid / card ---- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.1rem; }
.product-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); position: relative; transition: box-shadow 0.15s, transform 0.15s; display: block; }
.product-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.07); transform: translateY(-2px); }
.product-img { aspect-ratio: 1 / 1; background: #f3f4f6; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 0.8rem; }
.product-name { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-price { font-size: 0.92rem; }
.price-final { font-weight: 700; color: var(--primary); }
.price-original { text-decoration: line-through; color: var(--muted); font-size: 0.8rem; margin-left: 0.4rem; }
.discount-tag { position: absolute; top: 0.6rem; left: 0.6rem; background: var(--danger); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 5px; }
.discount-tag-inline { background: var(--danger); color: #fff; font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 5px; margin-left: 0.5rem; }
.out-of-stock { color: var(--danger); font-size: 0.75rem; font-weight: 600; }

/* ---- Categories ---- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1rem; }
.category-tile { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text); font-size: 0.85rem; text-align: center; }
.category-tile-icon { width: 60px; height: 60px; border-radius: 50%; background: #e7f4ec; color: var(--primary); font-size: 1.6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ---- Shop layout ---- */
.shop-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.6rem; align-items: start; }
.shop-filters h3 { font-size: 0.95rem; margin: 1.2rem 0 0.6rem; }
.shop-filters h3:first-child { margin-top: 0; }
.filter-list { list-style: none; padding: 0; margin: 0; }
.filter-list li a { display: block; padding: 0.4rem 0; text-decoration: none; color: var(--text); font-size: 0.88rem; }
.filter-list li a.active { color: var(--primary); font-weight: 700; }
.price-filter { display: flex; flex-direction: column; gap: 0.5rem; }
.price-filter input { padding: 0.5rem; border: 1px solid var(--border); border-radius: 6px; }
.price-filter button { padding: 0.5rem; border: none; background: var(--primary); color: #fff; border-radius: 6px; cursor: pointer; }
.offer-filter-link { display: inline-block; margin-top: 1rem; color: var(--danger); text-decoration: none; font-weight: 600; font-size: 0.88rem; }

.shop-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.1rem; flex-wrap: wrap; gap: 0.6rem; }
.result-count { font-size: 0.85rem; color: var(--muted); }
.sort-form select { padding: 0.4rem 0.6rem; border: 1px solid var(--border); border-radius: 6px; }

.pagination { display: flex; gap: 0.4rem; justify-content: center; margin-top: 1.6rem; }
.pagination a { padding: 0.45rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; color: var(--text); font-size: 0.85rem; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Product detail ---- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.main-image { aspect-ratio: 1/1; background: #f3f4f6; border-radius: var(--radius); overflow: hidden; }
.main-image img { width: 100%; height: 100%; object-fit: cover; }
.thumb-strip { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.thumb-option { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 1px solid var(--border); }
.rating-line { color: var(--accent); font-weight: 600; margin: 0.4rem 0; }
.product-price-large { font-size: 1.6rem; font-weight: 700; color: var(--primary); margin: 0.8rem 0; }
.product-price-large .price-original { font-size: 1rem; }
.product-description { color: var(--text); line-height: 1.6; margin-bottom: 1rem; }
.stock-note { font-size: 0.85rem; font-weight: 600; }
.in-stock { color: var(--primary); }
.out-stock { color: var(--danger); }
.add-to-cart-form { display: flex; gap: 0.8rem; align-items: end; margin: 1.1rem 0 0.6rem; }
.add-to-cart-form label { font-size: 0.8rem; color: var(--muted); }
.add-to-cart-form input { display: block; width: 70px; padding: 0.5rem; margin-top: 0.3rem; border: 1px solid var(--border); border-radius: 6px; }

/* ---- Reviews ---- */
.review-item { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.review-stars { color: var(--accent); }
.review-author { font-size: 0.85rem; margin: 0.2rem 0 0.4rem; font-weight: 600; }
.review-form { max-width: 420px; margin-top: 1.4rem; }
.review-form label { display: block; margin-bottom: 0.8rem; font-size: 0.85rem; color: var(--muted); }
.review-form select, .review-form textarea { width: 100%; padding: 0.5rem; margin-top: 0.3rem; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; }

/* ---- Cart ---- */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 1.6rem; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
.cart-table th, .cart-table td { text-align: left; padding: 0.7rem; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.cart-thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 6px; }
.qty-input { width: 60px; padding: 0.35rem; border: 1px solid var(--border); border-radius: 5px; }
.cart-summary { padding: 1.2rem; }
.summary-row { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 0.4rem 0; }
.discount-row { color: var(--primary); }
.total-row { font-weight: 700; font-size: 1.05rem; border-top: 1px solid var(--border); margin-top: 0.4rem; padding-top: 0.7rem; }
.coupon-form { display: flex; gap: 0.5rem; margin: 1rem 0; }
.coupon-form input { flex: 1; padding: 0.5rem; border: 1px solid var(--border); border-radius: 6px; }
.coupon-form button { padding: 0.5rem 0.9rem; border: none; background: var(--primary); color: #fff; border-radius: 6px; cursor: pointer; }
.checkout-btn { display: block; text-align: center; margin-top: 0.8rem; }

/* ---- Alerts ---- */
.alert { padding: 0.6rem 0.9rem; border-radius: 8px; font-size: 0.85rem; margin: 0.8rem 0; }
.alert-error { background: #fdecea; color: var(--danger); }
.alert-success { background: #e6f9ee; color: #1b9e5a; }
.alert-info { background: #eef1fb; color: #3a4bd6; }

/* ---- Auth forms (login/register) ---- */
.auth-card { max-width: 380px; margin: 3rem auto; background: #fff; padding: 2rem; border-radius: var(--radius); border: 1px solid var(--border); }
.auth-card h1 { font-size: 1.3rem; margin-bottom: 1.2rem; }
.auth-card label { display: block; margin-bottom: 1rem; font-size: 0.85rem; color: var(--muted); }
.auth-card input { width: 100%; padding: 0.6rem 0.75rem; margin-top: 0.3rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95rem; }
.auth-card button { width: 100%; }
.auth-switch { text-align: center; margin-top: 1rem; font-size: 0.85rem; color: var(--muted); }

/* ---- Footer ---- */
.site-footer { background: #171b17; color: #cbd5c9; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.6rem; padding: 2.4rem 1.2rem; }
.footer-grid h4 { color: #fff; margin: 0 0 0.7rem; font-size: 0.95rem; }
.footer-grid a { display: block; text-decoration: none; color: #a9b8a7; font-size: 0.85rem; padding: 0.25rem 0; }
.footer-bottom { text-align: center; padding: 1rem; font-size: 0.78rem; border-top: 1px solid #2a2f2a; color: #7f8c7d; }

/* ---- Addresses / checkout / order tracking ---- */
.two-col-store { display: grid; grid-template-columns: 1fr 340px; gap: 1.4rem; align-items: start; }
.address-list .address-card { border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem; margin-bottom: 0.8rem; font-size: 0.88rem; position: relative; }
.badge-default { position: absolute; top: 0.6rem; right: 0.6rem; background: var(--primary); color: #fff; font-size: 0.68rem; padding: 0.15rem 0.5rem; border-radius: 999px; }
.address-form label { display: block; margin-bottom: 0.8rem; font-size: 0.85rem; color: var(--muted); }
.address-form input { width: 100%; padding: 0.55rem 0.7rem; margin-top: 0.3rem; border: 1px solid var(--border); border-radius: 6px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.checkbox-label-store { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-label-store input { width: auto; }

.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.4rem; align-items: start; }
.address-radio { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.address-radio:last-of-type { border-bottom: none; }
.address-radio input { margin-top: 0.3rem; }

.track-bar { display: flex; justify-content: space-between; margin: 1.5rem 0; }
.track-step { flex: 1; text-align: center; position: relative; font-size: 0.8rem; color: var(--muted); }
.track-step::before { content: ''; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.track-step:first-child::before { display: none; }
.track-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--border); margin: 0 auto 0.4rem; position: relative; z-index: 1; }
.track-step.done { color: var(--primary); font-weight: 600; }
.track-step.done .track-dot { background: var(--primary); }
.track-step.done::before { background: var(--primary); }

/* ---- Cards / tables (used on account, checkout, order pages) ---- */
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; }
.table-card table { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-top: 0.5rem; }
.table-card th, .table-card td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); }
.table-card th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    background: #eef1fb;
    color: var(--primary);
}
.badge-delivered { background: #e6f9ee; color: #1b9e5a; }
.badge-cancelled, .badge-refunded { background: #fdecea; color: var(--danger); }
.badge-pending { background: #fff6e5; color: #b5820a; }
.badge-processing { background: #eef1fb; color: var(--primary); }
.badge-shipped { background: #e9f3ff; color: #2b7de9; }

/* ---- Small layout utilities ---- */
.inline-form { display: inline; margin: 0; }
.row-actions { display: flex; gap: 0.7rem; align-items: center; }
.row-actions a { color: var(--primary); text-decoration: none; font-size: 0.85rem; }
.cart-table-wrap { min-width: 0; }

/* ---- Trust strip ---- */
.trust-strip { background: #fff; border-bottom: 1px solid var(--border); }
.trust-strip-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1rem 1.2rem; }
.trust-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 600; color: var(--text); }

/* ---- Why choose us ---- */
.why-us-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; }
.why-us-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; text-align: center; }
.why-us-icon { font-size: 2rem; margin-bottom: 0.6rem; }
.why-us-card h4 { margin: 0 0 0.4rem; font-size: 1rem; }
.why-us-card p { font-size: 0.85rem; margin: 0; }

/* ---- Promo banner ---- */
.promo-banner { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; padding: 3rem 0; margin: 1rem 0; }
.promo-banner-inner { text-align: center; max-width: 560px; margin: 0 auto; }
.promo-eyebrow { display: inline-block; background: rgba(255,255,255,0.18); padding: 0.25rem 0.8rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em; margin-bottom: 0.8rem; }
.promo-banner h2 { margin: 0 0 0.5rem; font-size: 1.6rem; }
.promo-banner p { opacity: 0.9; margin-bottom: 1.2rem; }
.promo-banner .btn-primary { background: #fff; color: var(--primary-dark); }
.promo-banner .btn-primary:hover { background: #f0f0f0; }

/* ---- Testimonials ---- */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.2rem; }
.testimonial-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; }
.testimonial-stars { color: var(--accent); margin-bottom: 0.5rem; }
.testimonial-card p { font-style: italic; font-size: 0.9rem; line-height: 1.5; margin: 0 0 0.8rem; }
.testimonial-author { font-size: 0.82rem; color: var(--muted); font-weight: 600; }

/* ---- Newsletter ---- */
.newsletter-section { background: #171b17; color: #fff; padding: 2.5rem 0; }
.newsletter-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.2rem; }
.newsletter-inner h2 { margin: 0 0 0.3rem; font-size: 1.3rem; }
.newsletter-inner p { margin: 0; color: #a9b8a7; font-size: 0.88rem; }
.newsletter-form { display: flex; gap: 0.6rem; }
.newsletter-form input { padding: 0.65rem 0.9rem; border: none; border-radius: 6px; min-width: 220px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .shop-layout { grid-template-columns: 1fr; }
    .product-detail { grid-template-columns: 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .two-col-store, .checkout-layout, .form-row-2 { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .hamburger { display: flex; }
    .header-search { order: 3; max-width: 100%; width: 100%; margin-top: 0.6rem; }
    .newsletter-inner { flex-direction: column; text-align: center; }
    .newsletter-form { width: 100%; }
    .newsletter-form input { flex: 1; min-width: 0; }
    .trust-strip-inner { justify-content: center; }
    .header-main { flex-wrap: wrap; }
    .icon-label { display: none; }
    .main-nav { display: none; flex-direction: column; gap: 0; }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
    .hero-inner h1 { font-size: 1.6rem; }
    .add-to-cart-form { flex-wrap: wrap; }
}


