/* =============================================================
   CheapestGenrric — site.css
   Forest-leaf green on warm cream, with terracotta accents.
   ============================================================= */

:root {
    --leaf:        #2D4A2B;
    --leaf-deep:   #1F3520;
    --clay:        #C66B3D;
    --clay-deep:   #A8552A;
    --cream:       #FAF6EE;
    --cream-soft:  #F2EBDC;
    --paper:       #FFFFFF;
    --bark:        #3A332B;
    --smoke:       #6B6358;
    --rule:        rgba(45, 74, 43, 0.16);
    --rule-strong: rgba(45, 74, 43, 0.32);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--cream);
    color: var(--bark);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5 { font-family: 'Fraunces', Georgia, serif; color: var(--leaf); letter-spacing: -0.01em; font-weight: 600; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream-soft); }
::-webkit-scrollbar-thumb { background: rgba(45,74,43,0.3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(45,74,43,0.55); }
::selection { background: var(--leaf); color: var(--cream); }

/* ----- Buttons ----- */
.btn-leaf {
    background: var(--leaf);
    color: var(--cream);
    padding: 13px 30px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    border: 1.5px solid var(--leaf);
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}
.btn-leaf:hover { background: var(--leaf-deep); transform: translateY(-1px); }
.btn-leaf:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-clay {
    background: var(--clay);
    color: var(--cream);
    padding: 13px 30px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    border: 1.5px solid var(--clay);
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}
.btn-clay:hover { background: var(--clay-deep); transform: translateY(-1px); }

.btn-ghost {
    background: transparent;
    color: var(--leaf);
    padding: 13px 30px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    border: 1.5px solid var(--leaf);
    border-radius: 999px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}
.btn-ghost:hover { background: var(--leaf); color: var(--cream); }

/* ----- Eyebrow / kicker ----- */
.eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-weight: 700;
    color: var(--clay);
}
.eyebrow-cream { color: rgba(250, 246, 238, 0.85); }

/* ----- Top bar ----- */
.top-bar {
    background: rgba(250, 246, 238, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--rule);
}

/* ----- Nav links ----- */
.link-top {
    position: relative;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.20em;
    font-weight: 600;
    color: var(--smoke);
    transition: color 0.2s ease;
    padding-bottom: 5px;
}
.link-top.on, .link-top:hover { color: var(--leaf); }
.link-top.on::after, .link-top:hover::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -2px;
    height: 2px;
    background: var(--clay);
    border-radius: 2px;
}

/* ----- Hero overlay ----- */
.hero-veil {
    background: linear-gradient(115deg,
        rgba(45,74,43,0.78) 0%,
        rgba(45,74,43,0.55) 45%,
        rgba(45,74,43,0.30) 80%,
        rgba(250,246,238,0.05) 100%);
}

/* ----- Item card ----- */
.item-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 14px;
    transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: block;
}
.item-card:hover {
    border-color: var(--leaf);
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(45, 74, 43, 0.10);
}
.item-card .pic {
    aspect-ratio: 4/5;
    background: var(--cream-soft);
    overflow: hidden;
}
.item-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.item-card:hover img { transform: scale(1.04); }

/* ----- Inputs ----- */
.field, .field-area {
    width: 100%;
    background: var(--paper);
    border: 1.5px solid var(--rule);
    color: var(--bark);
    padding: 12px 16px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease;
    outline: none;
    border-radius: 10px;
}
.field::placeholder, .field-area::placeholder { color: rgba(107, 99, 88, 0.6); }
.field:focus, .field-area:focus { border-color: var(--leaf); }
.field-area { resize: vertical; min-height: 120px; }

label.tag {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
    color: var(--leaf);
    margin-bottom: 8px;
}

/* ----- Spinner ----- */
.spin {
    border: 2px solid rgba(45, 74, 43, 0.2);
    border-top: 2px solid var(--leaf);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: rotate 0.8s linear infinite;
    display: inline-block;
}
@keyframes rotate { to { transform: rotate(360deg); } }

/* ----- Toast ----- */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: var(--paper);
    border-left: 4px solid var(--leaf);
    color: var(--bark);
    padding: 14px 20px;
    font-size: 13px;
    min-width: 280px;
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(45, 74, 43, 0.18);
    animation: pop 0.3s ease-out;
}
.toast.success { border-color: var(--clay); }
.toast.error { border-color: #b91c1c; color: #b91c1c; }
@keyframes pop {
    from { transform: translateX(110%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

/* ----- Bag pane ----- */
.bag-pane {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 100%;
    max-width: 420px;
    background: var(--paper);
    border-left: 1px solid var(--rule);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(45, 74, 43, 0.10);
}
.bag-pane.show { transform: translateX(0); }
.bag-veil {
    position: fixed; inset: 0;
    background: rgba(45, 74, 43, 0.45);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.bag-veil.show { opacity: 1; pointer-events: auto; }

/* ----- Animations ----- */
@keyframes drop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.reveal { animation: drop 0.6s ease-out forwards; }
.delay-1 { animation-delay: 0.08s; opacity: 0; }
.delay-2 { animation-delay: 0.16s; opacity: 0; }
.delay-3 { animation-delay: 0.24s; opacity: 0; }
.delay-4 { animation-delay: 0.32s; opacity: 0; }

.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rule-top { border-top: 1px solid var(--rule); }

/* ----- Pay tabs ----- */
.pay-tab {
    padding: 14px 22px;
    font-family: 'Fraunces', serif;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    background: var(--cream-soft);
    color: var(--smoke);
    border: none;
    transition: all 0.2s ease;
    font-weight: 600;
}
.pay-tab:hover { color: var(--leaf); }
.pay-tab.active { background: var(--leaf); color: var(--cream); }

/* ----- Department chip ----- */
.chip {
    padding: 9px 18px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    border: 1.5px solid var(--rule);
    color: var(--smoke);
    background: var(--paper);
    border-radius: 999px;
    transition: all 0.2s ease;
    font-weight: 600;
}
.chip:hover { border-color: var(--leaf); color: var(--leaf); }
.chip.on { background: var(--leaf); color: var(--cream); border-color: var(--leaf); }

/* ----- Rating ----- */
.rating-row { display: inline-flex; gap: 2px; }
.star { width: 16px; height: 16px; }
.star-on  { color: var(--clay); }
.star-off { color: rgba(198, 107, 61, 0.22); }

/* ----- Leaf divider ----- */
.leaf-divider {
    text-align: center;
    margin: 1rem auto;
    color: var(--clay);
    letter-spacing: 0.28em;
    font-size: 11px;
}
.leaf-divider::before, .leaf-divider::after {
    content: '';
    display: inline-block;
    width: 60px;
    height: 1px;
    background: var(--rule-strong);
    vertical-align: middle;
    margin: 0 12px;
}

/* ----- Promo strip ----- */
.promo-strip {
    background: var(--clay);
    color: var(--cream);
    text-align: center;
    padding: 9px 16px;
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 600;
}

@media (max-width: 767px) {
    .bag-pane { max-width: 100%; }
    h1 { letter-spacing: 0; }
}
