/* Get Right Soap — Spa & Boutique Palette (carried over from the original static site) */
:root {
    --bg-color: #FAF4F2;
    --text-color: #4A403A;
    --text-muted: #6B5D55; /* darkened slightly for WCAG contrast */
    --card-bg: rgba(255, 255, 255, 0.65);
    --primary: #6F8769;     /* darkened for white-text contrast on buttons */
    --primary-hover: #5C7257;
    --accent: #D7A9A3;
    --border-color: #E8DCD8;
    --input-bg: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    font-family: 'Poppins', sans-serif;
    padding-bottom: 60px;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" style="font-size:24px"><text y="24">🧼</text></svg>'), auto;
    overflow-x: hidden;
    background-image: radial-gradient(circle at top right, #FFFFFF 0%, transparent 40%),
                      radial-gradient(circle at bottom left, #F2E3E0 0%, transparent 40%);
    background-attachment: fixed;
}

button, select, input, textarea, a {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" style="font-size:24px"><text y="24">🫧</text></svg>'), pointer;
}

h1, h2, h3, .price { font-family: 'Playfair Display', serif; }

a { color: var(--primary); }

.skip-link {
    position: absolute; left: -999px; top: 0; background: var(--text-color);
    color: #fff; padding: 10px 16px; z-index: 10000; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Floating bubbles */
.bubble-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: -1; overflow: hidden;
}
.soap-bubble {
    position: absolute; bottom: -50px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1) 60%, rgba(215, 169, 163, 0.2));
    box-shadow: inset 0 0 15px rgba(255, 255, 255, 0.5), 0 0 10px rgba(215, 169, 163, 0.1);
    opacity: 0; animation: floatUp linear infinite;
}
@keyframes floatUp {
    0%   { transform: translateY(0) scale(0.5); opacity: 0; }
    20%  { opacity: 0.6; }
    80%  { opacity: 0.6; }
    100% { transform: translateY(-100vh) scale(1.2); opacity: 0; }
}

/* Header */
header {
    background-color: rgba(250, 244, 242, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    box-shadow: 0 4px 30px rgba(140, 160, 134, 0.05);
}
header h1 {
    font-size: 2.8rem; margin-bottom: 0.2rem;
    color: var(--text-color); font-weight: 600; font-style: italic;
}
.local-vibe {
    font-size: 0.95rem; font-weight: 500; color: var(--primary);
    margin-bottom: 1rem; letter-spacing: 2px; text-transform: uppercase;
}
.contact-info {
    background: rgba(255, 255, 255, 0.6); border: 1px solid var(--border-color);
    display: inline-flex; align-items: center; justify-content: center; gap: 20px;
    padding: 8px 20px; border-radius: 50px; font-weight: 400; font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}
.contact-info a { color: var(--text-color); text-decoration: none; }
.contact-info a:hover { color: var(--primary); text-decoration: underline; }

.header-desc {
    margin-top: 15px; max-width: 650px; margin-left: auto; margin-right: auto;
    padding: 0 15px; color: var(--text-muted); font-size: 0.9rem;
}

/* Layout */
.container { max-width: 1050px; margin: 0 auto; padding: 20px; }
.section-title {
    margin: 2rem 0; color: var(--text-color); font-size: 2.2rem; font-weight: 400;
    text-align: center; font-style: italic;
}
.section-title::after {
    content: ""; display: block; width: 60px; height: 2px;
    background: var(--accent); margin: 15px auto 0; border-radius: 2px;
}

/* Local intro / service area */
.local-intro { max-width: 760px; margin: 1rem auto 0; text-align: center; color: var(--text-muted); }
.local-intro p + p { margin-top: 12px; }

.service-area {
    max-width: 800px; margin: 0 auto 3rem; text-align: center;
    background: var(--card-bg); border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px; padding: 30px 25px;
    box-shadow: 0 10px 30px rgba(122, 107, 99, 0.04);
}
.service-area h2 { font-size: 1.6rem; font-style: italic; font-weight: 400; margin-bottom: 10px; }
.service-area p { color: var(--text-muted); font-size: 0.95rem; }
.service-area ul {
    list-style: none; display: flex; flex-wrap: wrap; gap: 10px;
    justify-content: center; margin: 15px 0;
}
.service-area li {
    background: #fff; border: 1px solid var(--border-color);
    padding: 6px 16px; border-radius: 50px; font-size: 0.9rem;
}

/* Product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-bottom: 4rem; }
.card {
    background: var(--card-bg); padding: 35px 25px; border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex; flex-direction: column; align-items: center; text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative; overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(122, 107, 99, 0.04);
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(122, 107, 99, 0.08);
    border-color: var(--accent);
}
.card h3 { color: var(--text-color); margin-bottom: 5px; font-size: 1.5rem; font-weight: 600; }
.card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 15px; font-weight: 300; }
.price { font-weight: 600; font-size: 1.4rem; margin-bottom: 25px; color: var(--primary); }
.card-spacer { flex-grow: 1; }

/* Form controls */
label {
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); margin-bottom: 5px; display: block; font-weight: 500;
    text-align: left; width: 100%;
}
select, input[type="number"], input[type="text"], input[type="tel"], input[type="email"] {
    width: 100%; padding: 12px 15px; margin-bottom: 20px;
    background-color: var(--input-bg); color: var(--text-color);
    border: 1px solid var(--border-color); border-radius: 8px; font-size: 1rem;
    font-family: 'Poppins', sans-serif; transition: all 0.3s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}
select:focus, input:focus, textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(215, 169, 163, 0.2);
}

button.add-btn {
    background-color: transparent; color: var(--text-color);
    border: 1px solid var(--text-color); padding: 12px 20px; width: 100%;
    font-size: 0.95rem; font-weight: 500; border-radius: 50px; transition: all 0.3s;
    margin-top: auto; letter-spacing: 1px; text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
}
button.add-btn:hover, button.add-btn:focus-visible {
    background-color: var(--accent); color: #3a2f2a; border-color: var(--accent);
    box-shadow: 0 5px 15px rgba(215, 169, 163, 0.4);
}

textarea {
    width: 100%; padding: 20px; margin-bottom: 20px;
    background-color: var(--input-bg); color: var(--text-color);
    border: 1px solid var(--border-color); border-radius: 12px; font-size: 0.95rem;
    font-family: 'Poppins', sans-serif; resize: vertical; line-height: 1.8;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
    transition: border-color 0.3s, box-shadow 0.3s;
}
textarea::placeholder { color: #8f8077; font-style: italic; }
textarea.flash, .cart.flash { border-color: var(--accent); box-shadow: 0 0 15px rgba(215, 169, 163, 0.3); }

/* Checkout */
.checkout-section {
    background: var(--card-bg); padding: 50px; border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(122, 107, 99, 0.05);
    max-width: 800px; margin: 0 auto;
}
.checkout-intro { margin-bottom: 25px; color: var(--text-muted); text-align: center; }
.order-total { text-align: right; font-weight: 600; margin: -10px 0 20px; font-family: 'Playfair Display', serif; font-size: 1.2rem; }
.clear-btn {
    background: none; border: none; color: var(--text-muted); text-decoration: underline;
    font-size: 0.85rem; margin: -10px 0 20px; font-family: 'Poppins', sans-serif;
}
.honeypot { position: absolute; left: -9999px; height: 0; width: 0; overflow: hidden; }

/* Cloudflare Turnstile bot check: centered, with room to breathe above the Send button.
   min-height reserves space so the page doesn't jump when the widget loads. */
.cf-turnstile { display: flex; justify-content: center; min-height: 65px; margin: 5px 0 15px; }

button.submit-btn {
    background-color: var(--primary); color: white; border: none;
    padding: 16px; width: 100%; font-size: 1.1rem; font-weight: 500;
    border-radius: 8px; transition: all 0.3s;
    text-transform: uppercase; letter-spacing: 2px; font-family: 'Poppins', sans-serif;
    margin-top: 10px;
}
button.submit-btn:hover { background-color: var(--primary-hover); box-shadow: 0 8px 20px rgba(140, 160, 134, 0.3); }

.wholesale-note { text-align: center; margin-top: 40px; color: var(--text-muted); font-size: 0.95rem; font-style: italic; }

footer { text-align: center; margin-top: 50px; padding: 0 20px; color: var(--text-muted); font-size: 0.85rem; }

/* Add-to-order form inside each product card */
.add-form { width: 100%; display: flex; flex-direction: column; flex-grow: 0; }

/* Basket (server-rendered, swapped in by htmx) */
.cart {
    background-color: var(--input-bg); border: 1px solid var(--border-color); border-radius: 12px;
    padding: 20px; margin-bottom: 25px; transition: border-color 0.3s, box-shadow 0.3s;
}
.cart-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; }
.cart-empty { color: #8f8077; font-style: italic; font-size: 0.95rem; }
.cart-lines { list-style: none; margin-bottom: 15px; }
.cart-line {
    display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid var(--border-color); font-size: 0.95rem;
}
.cart-qty { font-weight: 500; color: var(--primary); }
.cart-amount { font-family: 'Playfair Display', serif; font-weight: 600; }
.remove-btn {
    background: none; border: 1px solid var(--border-color); border-radius: 50%;
    width: 28px; height: 28px; line-height: 1; color: var(--text-muted); font-size: 1rem;
}
.remove-btn:hover, .remove-btn:focus-visible { border-color: var(--accent); color: var(--text-color); }
.order-total { margin: 0 0 10px; }
.order-total small { font-family: 'Poppins', sans-serif; font-weight: 300; font-size: 0.8rem; color: var(--text-muted); }
.cart .clear-btn { margin: 0; }

/* Inline order-form errors */
.form-error {
    background: #FBEDEB; border-left: 4px solid #B5544A; color: #6E2A23;
    padding: 12px 16px; border-radius: 8px; margin-bottom: 15px; font-size: 0.95rem;
}

/* Thank-you page */
.thanks { max-width: 640px; margin: 60px auto; text-align: center; }
.thanks h2 { margin-bottom: 15px; font-style: italic; font-weight: 400; font-size: 2.2rem; }
.thanks p { color: var(--text-muted); margin-bottom: 15px; }

/* Toast */
#toast-container { position: fixed; bottom: 30px; right: 30px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: rgba(255, 255, 255, 0.95); border-left: 4px solid var(--accent);
    color: var(--text-color); padding: 16px 24px; border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); font-size: 0.95rem;
    transform: translateX(120%); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; align-items: center; gap: 12px; font-weight: 500;
}
.toast.show { transform: translateX(0); }
.toast-icon { font-size: 1.3rem; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .soap-bubble { animation: none; display: none; }
    .card, .toast { transition: none; }
    html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 768px) {
    header { padding: 1.5rem 1rem; }
    header h1 { font-size: 2.2rem; }
    .contact-info { flex-direction: column; gap: 5px; width: 100%; max-width: 100%; border-radius: 12px; background: transparent; box-shadow: none; border: none; }
    .container { padding: 15px; }
    .checkout-section { padding: 30px 20px; }
}
@media (max-width: 480px) {
    .grid { grid-template-columns: 1fr; gap: 20px; }
    header h1 { font-size: 2rem; }
    #toast-container { bottom: 20px; right: 20px; left: 20px; }
    .toast { padding: 12px 15px; font-size: 0.9rem; }
}

/* ---------- Product cards: scent list with −/+ steppers ---------- */
.option-label { margin: -10px 0 8px; font-size: 0.8rem !important; text-transform: uppercase; letter-spacing: 1px; }
.variant-list { list-style: none; width: 100%; text-align: left; }
.variant-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 7px 4px; border-bottom: 1px solid var(--border-color);
}
.variant-row:last-child { border-bottom: none; }
.variant-row.in-basket .variant-name { font-weight: 500; color: var(--primary); }
.variant-name { font-size: 0.92rem; line-height: 1.3; }
.variant-price { color: var(--text-muted); font-size: 0.85rem; margin-left: 4px; }
.variant-detail { display: block; color: var(--text-muted); font-size: 0.78rem; }

.stepper { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.step-btn {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--text-color);
    background: transparent; color: var(--text-color); font-size: 1.1rem; line-height: 1;
    font-family: 'Poppins', sans-serif; transition: background-color 0.2s, border-color 0.2s;
}
.step-btn:hover:not(:disabled), .step-btn:focus-visible { background: var(--accent); border-color: var(--accent); }
.step-btn:disabled { opacity: 0.3; }
.step-qty { min-width: 1.6em; text-align: center; font-weight: 500; }
.stepper-sm .step-btn { width: 28px; height: 28px; font-size: 0.95rem; }
form.htmx-request .step-btn { opacity: 0.6; }

/* Basket lines (drawer and checkout page) */
.cart-line { grid-template-columns: 1fr auto auto; }
.checkout-link { display: block; text-align: center; text-decoration: none; margin: 10px 0; }
.checkout-page .checkout-link { display: none; }
.back-link { margin: -10px 0 20px; font-size: 0.9rem; }

/* ---------- Floating basket button + slide-out drawer ---------- */
.basket-fab {
    position: fixed; right: 24px; bottom: 24px; z-index: 900;
    background: var(--primary); color: #fff; border: none; border-radius: 50px;
    padding: 14px 22px; font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 500;
    box-shadow: 0 8px 24px rgba(92, 114, 87, 0.35);
}
.basket-fab:hover { background: var(--primary-hover); }
.basket-fab.bump { animation: bump 0.35s ease; }
@keyframes bump { 50% { transform: scale(1.12); } }

.drawer-overlay { position: fixed; inset: 0; background: rgba(74, 64, 58, 0.35); z-index: 950; }
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1000;
    width: min(420px, 100vw); overflow-y: auto; padding: 50px 20px 20px;
    background: var(--bg-color); box-shadow: -10px 0 40px rgba(0,0,0,0.12);
    transform: translateX(100%); transition: transform 0.3s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-close {
    position: absolute; top: 12px; right: 14px; background: none; border: none;
    font-size: 1.8rem; line-height: 1; color: var(--text-muted);
}
.drawer .cart { margin-bottom: 0; }
#toast-container { z-index: 1100; }

@media (prefers-reduced-motion: reduce) {
    .drawer { transition: none; }
    .basket-fab.bump { animation: none; }
}
@media (max-width: 480px) {
    .basket-fab { right: 16px; bottom: 16px; }
}

/* Square checkout: delivery choice */
.fulfillment-choices { border: none; margin-bottom: 15px; }
.fulfillment-choices legend { font-family: 'Playfair Display', serif; font-size: 1.15rem; margin-bottom: 10px; }
.choice {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 10px;
    background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 10px;
    text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--text-color); cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(111, 135, 105, 0.25); }
.choice input { accent-color: var(--primary); width: 18px; height: 18px; }
.choice-label { flex: 1; }
.choice-fee { color: var(--text-muted); font-size: 0.9rem; }
.secure-note { margin-top: 12px; font-size: 0.9rem; }

/* Stock */
.stock-note { display: block; font-size: 0.75rem; color: #9C4A40; font-weight: 500; }
.variant-row.sold-out .variant-name { color: var(--text-muted); text-decoration: line-through; text-decoration-color: rgba(107, 93, 85, 0.4); }
.variant-row.sold-out .stock-note { text-decoration: none; }

/* Product photos and descriptions */
.card-photo {
    width: calc(100% + 50px); max-width: none; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
    margin: -35px -25px 20px; border-radius: 16px 16px 0 0; background: var(--border-color);
}
.card-description { white-space: pre-line; font-size: 0.88rem !important; margin-top: -8px; }
.deal-note { display: block; color: var(--primary); font-size: 0.78rem; }
