/* Hot Duck Farm shop - light theme */
:root {
    --bg: #fff8f0;
    --surface: #ffffff;
    --text: #2b2118;
    --muted: #7a6a5c;
    --accent: #e8622c;
    --accent-dark: #c94d1b;
    --heading: #6b1d1d;
    --border: #eadfd3;
    --header: #2b2118;
    --ok: #3c8d2f;
    --shadow: 0 2px 10px rgba(43, 33, 24, 0.08);
    --radius: 12px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.55;
}
a { color: var(--accent-dark); }
img { max-width: 100%; display: block; }
h1, h2 { color: var(--heading); line-height: 1.2; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.big-emoji { font-size: 3rem; }

/* Header: dark strip keeps the current logo readable */
.site-header { background: var(--header); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand img { height: 48px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 1.25rem; }
.main-nav a { color: #f5e9dc; text-decoration: none; font-weight: 500; }
.main-nav a:hover { color: #fff; text-decoration: underline; }
.cart-button {
    background: var(--accent); color: #fff; border: 0; border-radius: 999px;
    padding: 0.45rem 0.9rem; font-size: 1rem; cursor: pointer; font-weight: 600;
}
.cart-button:hover { background: var(--accent-dark); }

/* Hero */
.hero { padding: 2.5rem 0 1.5rem; }
.hero h1 { margin: 0 0 0.4rem; font-size: 2rem; }
.hero p { margin: 0; color: var(--muted); font-size: 1.1rem; }

/* Product grid */
.product-grid {
    display: grid; gap: 1.25rem; padding-bottom: 3rem;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.product-card {
    background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
    overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.product-card:hover, .product-card:focus-visible { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(43, 33, 24, 0.14); }
.product-card.is-out { opacity: 0.7; }
.card-image { position: relative; aspect-ratio: 1 / 1; background: #f6ece2; }
.card-image img, .card-image .placeholder { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 0.9rem 1rem 1.1rem; }
.card-body h2 { font-size: 1.1rem; margin: 0 0 0.15rem; }
.species { font-style: italic; color: var(--muted); margin: 0 0 0.4rem; font-size: 0.9rem; }
.price { font-weight: 700; font-size: 1.15rem; margin: 0.4rem 0 0; color: var(--text); }
.price.big { font-size: 1.8rem; margin: 1.25rem 0; }

.placeholder { display: flex; align-items: center; justify-content: center; font-size: 4rem; background: #f6ece2; }

.badge {
    position: absolute; top: 0.75rem; left: 0.75rem; padding: 0.25rem 0.7rem;
    border-radius: 999px; font-size: 0.8rem; font-weight: 600; color: #fff;
}
.badge.in-stock { background: var(--ok); }
.badge.out-of-stock { background: #8a7d72; }

.heat { display: inline-flex; gap: 1px; font-size: 1rem; }
.heat .chili.off { filter: grayscale(1); opacity: 0.3; }

/* Product page */
.breadcrumb { margin: 1.25rem 0; color: var(--muted); font-size: 0.9rem; }
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.gallery .main-image { position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; aspect-ratio: 1 / 1; }
.gallery-main { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 0.6rem; margin-top: 0.75rem; flex-wrap: wrap; }
.thumb { width: 84px; height: 84px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; }
.thumb.active { border-color: var(--accent); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.info h1 { margin: 0; font-size: 2rem; }
.attributes { display: grid; grid-template-columns: max-content 1fr; gap: 0.55rem 1.25rem; margin: 1.25rem 0 0; }
.attributes dt { font-weight: 600; }
.attributes dd { margin: 0; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.colors .arrow { color: var(--muted); }
.color-dot { width: 18px; height: 18px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0, 0, 0, 0.15); }
.color-green { background: #3c8d2f; } .color-red { background: #d32f2f; } .color-orange { background: #f57c00; }
.color-yellow { background: #f9c22e; } .color-purple { background: #7b3fa0; } .color-brown { background: #6d4c41; }
.color-black { background: #222; } .color-white { background: #f5f5f5; }
.buy { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.qty { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.qty button { width: 36px; height: 40px; border: 0; background: none; font-size: 1.2rem; cursor: pointer; }
.qty input { width: 44px; border: 0; text-align: center; font-size: 1rem; background: none; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.out-note { color: var(--muted); font-weight: 600; }
.pack-note { color: var(--muted); font-size: 0.85rem; margin-top: 1.5rem; }
.description { max-width: 760px; padding: 2rem 0 3rem; }
.not-found { padding: 4rem 1.25rem; }

/* Buttons */
.btn {
    display: inline-block; border: 0; border-radius: 999px; padding: 0.75rem 1.4rem;
    font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn-outline { background: var(--surface); color: var(--text); border: 2px solid var(--accent); }
.btn-ghost { background: none; color: var(--muted); border: 1px solid var(--border); }
.btn-block { display: block; width: 100%; }
.icon-button { background: none; border: 0; font-size: 1.2rem; cursor: pointer; color: var(--muted); }

/* Cart sidebar */
.backdrop { position: fixed; inset: 0; background: rgba(43, 33, 24, 0.4); opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 90; }
.backdrop.open { opacity: 1; pointer-events: auto; }
#cart-sidebar {
    position: fixed; top: 0; right: 0; height: 100%; width: min(380px, 92vw); background: var(--surface);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15); transform: translateX(100%); transition: transform 0.25s ease;
    z-index: 100; display: flex; flex-direction: column;
}
#cart-sidebar.open { transform: translateX(0); }
.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.cart-header h2 { margin: 0; font-size: 1.2rem; }
#cart-items { flex: 1; overflow-y: auto; padding: 0.5rem 1.25rem; }
.cart-empty { padding: 1rem 0; }
.cart-item { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 0.75rem; padding: 0.8rem 0; border-bottom: 1px solid var(--border); }
.cart-item-name { color: var(--text); font-weight: 600; text-decoration: none; grid-column: 1 / -1; }
.cart-item-controls { display: flex; align-items: center; gap: 0.5rem; }
.cart-item-controls button { width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); cursor: pointer; }
.cart-item-controls button.remove { border: 0; color: var(--muted); }
.cart-item-price { font-weight: 600; align-self: center; }
.cart-footer { padding: 1rem 1.25rem; border-top: 1px solid var(--border); }
.cart-total { font-size: 1.1rem; margin: 0 0 0.25rem; }
.cart-note { color: var(--muted); font-size: 0.85rem; margin: 0 0 0.75rem; }

/* Modals */
.modal { position: fixed; inset: 0; background: rgba(43, 33, 24, 0.55); display: none; align-items: center; justify-content: center; z-index: 200; padding: 1rem; }
.modal.open { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--radius); padding: 1.75rem; width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; }
.modal-box h2 { margin-top: 0; }
.modal-box label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.9rem; }
.modal-box input[type="text"], .modal-box input[type="email"], .modal-box input[type="tel"] {
    display: block; width: 100%; margin-top: 0.3rem; padding: 0.65rem 0.75rem;
    border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; background: #fffdfb;
}
.modal-box input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.label { font-weight: 600; font-size: 0.9rem; }
.pay-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 0.75rem; }
.order-number { font-size: 1.3rem; font-weight: 700; color: var(--text); }

/* Footer */
.site-footer { background: var(--header); color: #cbbcae; padding: 1.5rem 0; text-align: center; font-size: 0.9rem; }
.site-footer a { color: #f5e9dc; }

@media (max-width: 760px) {
    .product-detail { grid-template-columns: 1fr; gap: 1.5rem; }
    .hero h1, .info h1 { font-size: 1.6rem; }
    .pay-buttons { grid-template-columns: 1fr; }
    .main-nav { gap: 0.8rem; }
    .brand img { height: 40px; }
}
