/* PhytoStore — base styles shared by all themes */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body, 'Inter', sans-serif);
    background: var(--bg);
    color: var(--tx);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* ── LAYOUT ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section    { padding: 40px 0; }

/* ── NAV ── */
.nav {
    position: sticky; top: 0; z-index: 200;
    background: var(--sf); border-bottom: 1px solid var(--bd);
    height: 58px; display: flex; align-items: center;
    padding: 0 24px; gap: 18px; box-shadow: var(--sh);
}
.nav-brand {
    font-family: var(--font-head); font-weight: 700; font-size: 17px;
    display: flex; align-items: center; gap: 8px;
}
.nav-brand em { color: var(--ac); font-style: normal; }
.nav-brand img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.nav-links { display: flex; gap: 20px; margin-left: auto; }
.nav-links a { font-size: 13px; font-weight: 500; color: var(--mu); transition: color .15s; }
.nav-links a:hover { color: var(--tx); }
.nav-right { display: flex; align-items: center; gap: 10px; margin-left: 12px; }
.icon-btn {
    width: 38px; height: 38px; border-radius: var(--r);
    border: 1.5px solid var(--bd); display: flex; align-items: center;
    justify-content: center; position: relative; transition: all .15s;
}
.icon-btn:hover { border-color: var(--ac); color: var(--ac); }
.cart-badge {
    position: absolute; top: -6px; right: -6px;
    background: var(--cta); color: var(--ct);
    font-size: 10px; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%;
    display: none; align-items: center; justify-content: center;
}
.cart-badge.on { display: flex; }

/* ── HERO ── */
.hero {
    position: relative; color: #fff; overflow: hidden;
    min-height: 360px; display: flex; align-items: center; justify-content: center; text-align: center;
}
.hero-bg { position: absolute; inset: 0; background: var(--ac); }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.55) 100%); }
.hero-inner { position: relative; z-index: 2; padding: 52px 24px 44px; max-width: 600px; margin: 0 auto; }
.hero-badge {
    display: inline-block; padding: 4px 14px; border-radius: 999px;
    border: 1px solid rgba(255,255,255,.4); font-size: 11px; font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; color: rgba(255,255,255,.9);
}
.hero h1 {
    font-family: var(--font-head); font-weight: 700;
    font-size: clamp(24px, 5vw, 42px); line-height: 1.18;
    margin-bottom: 12px; text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.hero p { font-size: 15px; opacity: .85; margin-bottom: 26px; line-height: 1.6; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── BUTTONS ── */
.btn { padding: 11px 24px; border-radius: var(--r); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; transition: all .18s; }
.btn-primary  { background: var(--cta); color: var(--ct); border: 2px solid transparent; }
.btn-primary:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn-outline  { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-ac       { background: var(--ac); color: #fff; border: 2px solid transparent; }
.btn-ac:hover { filter: brightness(1.1); }

/* ── PRODUCT GRID ── */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.prod-card {
    background: var(--sf); border-radius: var(--r); border: 1px solid var(--bd);
    overflow: hidden; box-shadow: var(--sh); transition: transform .18s, box-shadow .18s; cursor: pointer;
}
.prod-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.13); }
.prod-card-img  { aspect-ratio: 1; position: relative; overflow: hidden; background: #e8e8e0; }
.prod-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.prod-card:hover .prod-card-img img { transform: scale(1.04); }
.prod-card-body { padding: 13px 15px; }
.prod-cat   { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mu); margin-bottom: 4px; }
.prod-name  { font-size: 14px; font-weight: 600; line-height: 1.35; margin-bottom: 8px; }
.prod-name em { font-style: italic; font-weight: 400; }
.prod-foot  { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.prod-price { font-size: 16px; font-weight: 700; }
.prod-cmp   { font-size: 12px; color: var(--mu); text-decoration: line-through; margin-left: 4px; }
.prod-add   { width: 32px; height: 32px; border-radius: var(--r); background: var(--ac); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 19px; transition: all .15s; }
.prod-add:hover { filter: brightness(1.12); transform: scale(1.07); }
.prod-add.oos { background: var(--bd); color: var(--mu); cursor: not-allowed; }

/* ── BADGES ── */
.badge-pill { position: absolute; top: 9px; left: 9px; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; z-index: 2; }
.badge-sale { background: #e53e3e; color: #fff; }
.badge-low  { background: var(--cta); color: var(--ct); }
.badge-new  { background: var(--ac); color: #fff; }
.badge-bo   { background: #6b46c1; color: #fff; }

/* ── WATERMARK ── */
.wm-overlay {
    position: absolute; bottom: 7px; right: 8px;
    background: rgba(0,0,0,.46); color: rgba(255,255,255,.8);
    font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 3px;
    pointer-events: none; user-select: none; letter-spacing: .05em; z-index: 3;
}

/* ── FILTERS ── */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-pill { padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 500; border: 1.5px solid var(--bd); background: var(--sf); color: var(--mu); cursor: pointer; transition: all .15s; }
.filter-pill.on, .filter-pill:hover { border-color: var(--ac); color: var(--ac); }

/* ── TRUST BAR ── */
.trust-bar { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; padding: 12px 24px; background: var(--sf); border-bottom: 1px solid var(--bd); }
.trust-item { font-size: 12px; font-weight: 500; color: var(--mu); display: flex; align-items: center; gap: 5px; }

/* ── CART DRAWER ── */
.cart-overlay { position: fixed; inset: 0; z-index: 600; background: rgba(0,0,0,.4); display: none; }
.cart-overlay.on { display: block; }
.cart-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(390px, 100vw);
    background: var(--sf); z-index: 601;
    display: flex; flex-direction: column;
    box-shadow: -4px 0 30px rgba(0,0,0,.15);
    transform: translateX(100%); transition: transform .28s ease;
}
.cart-overlay.on .cart-drawer { transform: translateX(0); }
.cart-hd { padding: 18px 20px 14px; border-bottom: 1px solid var(--bd); display: flex; align-items: center; justify-content: space-between; }
.cart-hd h3 { font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.cart-body { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; }
.cart-empty { text-align: center; padding: 40px 20px; color: var(--mu); font-size: 14px; }
.cart-foot { padding: 14px 18px; border-top: 1px solid var(--bd); display: flex; flex-direction: column; gap: 10px; }
.cart-item { display: flex; gap: 12px; align-items: flex-start; }
.cart-item-img { width: 58px; height: 58px; border-radius: var(--r); overflow: hidden; background: #e8e8e0; border: 1px solid var(--bd); flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }

/* ── FORM ELEMENTS ── */
.fg { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.fg label { font-size: 11px; font-weight: 600; color: var(--mu); text-transform: uppercase; letter-spacing: .06em; }
.fg input, .fg select, .fg textarea {
    padding: 9px 12px; border: 1.5px solid var(--bd); border-radius: var(--r);
    font-size: 14px; color: var(--tx); background: var(--bg); outline: none;
    transition: border-color .15s; width: 100%;
}
.fg input:focus, .fg select:focus, .fg textarea:focus { border-color: var(--ac); }

/* ── FOOTER ── */
footer { background: var(--tx); color: rgba(255,255,255,.7); padding: 34px 20px 20px; margin-top: 60px; }
.ft-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.ft-brand { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 7px; display: flex; align-items: center; gap: 8px; }
.ft-brand img { width: 28px; height: 28px; border-radius: 50%; }
.ft-tag { font-size: 13px; line-height: 1.6; margin-bottom: 10px; }
.ft-pow { font-size: 11px; opacity: .38; }
.ft-col h4 { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 10px; }
.ft-col ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ft-col ul li a { font-size: 13px; transition: color .15s; cursor: pointer; }
.ft-col ul li a:hover { color: #fff; }
.ft-bot { max-width: 1100px; margin: 20px auto 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); font-size: 11px; opacity: .36; text-align: center; }

/* ── NO RIGHT CLICK ── */
img { -webkit-user-drag: none; }

/* ── RESPONSIVE ── */

/* Tablet: 2-col products */
@media (max-width: 900px) {
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
    .ft-inner { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 700px) {
    /* NAV */
    .hamburger { display: flex !important; }
    .nav-links {
        display: none;
        position: fixed; inset: 0; top: 58px; z-index: 500;
        flex-direction: column; gap: 0;
        background: var(--sf); border-top: 1px solid var(--bd);
        padding: 16px 0; box-shadow: 0 8px 30px rgba(0,0,0,.15);
    }
    .nav-links.nav-open { display: flex; }
    .nav-links a {
        padding: 14px 24px; font-size: 15px; font-weight: 500;
        color: var(--tx); border-bottom: 1px solid var(--bd);
    }
    .nav-links a:last-child { border-bottom: none; }

    /* Products */
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .prod-card-body { padding: 10px 11px; }
    .prod-name { font-size: 13px; }
    .prod-price { font-size: 14px; }

    /* Hero */
    .hero { min-height: 260px; }
    .hero h1 { font-size: 22px; }
    .hero p { font-size: 13px; }
    .hero-inner { padding: 36px 18px 30px; }

    /* Container */
    .container { padding: 0 14px; }
    .section { padding: 28px 0; }

    /* Footer */
    .ft-inner { grid-template-columns: 1fr; gap: 20px; }

    /* Buttons — touch target 44px min */
    .btn { padding: 13px 22px; }
    .icon-btn { width: 42px; height: 42px; }

    /* Cart drawer fills screen on mobile */
    .cart-drawer { width: 100vw !important; }

    /* Trust bar */
    .trust-bar { gap: 14px; padding: 10px 14px; }
    .trust-item { font-size: 11px; }
}

/* Hamburger hidden on desktop */
.hamburger { display: none; }

/* PWA safe-area insets */
@supports (padding: env(safe-area-inset-bottom)) {
    .nav { padding-left: calc(24px + env(safe-area-inset-left)); padding-right: calc(24px + env(safe-area-inset-right)); }
    footer { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* PWA standalone — hide browser chrome hints */
@media (display-mode: standalone) {
    .nav { padding-top: env(safe-area-inset-top, 0); height: calc(58px + env(safe-area-inset-top, 0)); }
}
