/* ==========================================================================
   Barbara's Specialties -- modernized public site stylesheet
   Keeps the original navy + cream/peach palette and script wordmark feel,
   replaces the fixed-width table layout with responsive CSS.
   ========================================================================== */

:root {
    --navy: #0d0b52;
    --navy-deep: #070626;
    --cream: #fdf8ef;
    --peach: #f6cf9e;
    --peach-deep: #eab976;
    --ink: #2a2416;
    --muted: #756b5a;
    --gold: #a8752f;
    --border: #ecdfc9;
    --success-bg: #e8f5ea;
    --success-text: #1f6b33;
    --danger-bg: #fbe9e7;
    --danger-text: #a32a1a;
    --radius: 14px;
    --shadow: 0 2px 6px rgba(20, 15, 5, 0.07), 0 10px 30px rgba(20, 15, 5, 0.08);
    --maxw: 1080px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--cream);
    color: var(--ink);
    font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

img { max-width: 100%; }

a { color: var(--navy); }
a:hover { color: var(--gold); }

.script {
    font-family: "Alex Brush", cursive;
}

/* ---------- Top bar / brand ---------- */

.site-topbar {
    background: var(--navy);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.site-topbar::before {
    /* faint repeated wordmark watermark, echoing the old banner's ghost text */
    content: "Barbara's Specialties";
    font-family: "Alex Brush", cursive;
    font-size: 46px;
    color: rgba(255, 255, 255, 0.06);
    position: absolute;
    top: -8px;
    left: 10%;
    white-space: nowrap;
    pointer-events: none;
}

.site-topbar-inner {
    position: relative;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 22px 24px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #fff;
}

.brand:hover { color: #fff; opacity: 0.92; }

.pie-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    color: #fff;
}

.brand-text {
    font-family: "Alex Brush", cursive;
    font-size: 40px;
    line-height: 1;
}

.brand-contact {
    text-align: right;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.brand-contact strong { color: #fff; font-size: 14px; }

/* ---------- Nav ---------- */

.site-nav {
    background: var(--peach);
    border-bottom: 4px solid var(--peach-deep);
}

.site-nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
}

.site-nav a {
    display: block;
    padding: 13px 18px;
    color: var(--navy-deep);
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.site-nav a:hover { background: var(--peach-deep); color: var(--navy-deep); }

.site-nav a.active {
    background: var(--navy);
    color: #fff;
}

/* ---------- Page shell ---------- */

.site-main {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 40px 24px 64px;
}

.page-title {
    font-size: 32px;
    margin: 0 0 6px;
    color: var(--navy);
}

.page-subtitle {
    color: var(--muted);
    margin: 0 0 28px;
    font-size: 15px;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}

/* ---------- Alerts ---------- */

.alert {
    border-radius: var(--radius);
    padding: 14px 18px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success { background: var(--success-bg); color: var(--success-text); border-color: #c3e6ca; }
.alert-danger { background: var(--danger-bg); color: var(--danger-text); border-color: #f0c4bc; }

/* ---------- Homepage hero ---------- */

.hero {
    display: flex;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
    padding: 20px 4px 44px;
}

.hero-copy { flex: 1 1 340px; }

.hero-tagline {
    font-family: "Alex Brush", cursive;
    font-size: 42px;
    color: var(--navy);
    margin: 0 0 10px;
    line-height: 1.1;
}

.hero-sub {
    color: var(--muted);
    font-size: 17px;
    margin: 0;
}

.hero-photo {
    flex: 1 1 260px;
    max-width: 360px;
}

.hero-photo img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: block;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    align-items: start;
}

.about-grid img {
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ---------- Product / category grid ---------- */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
}

.product-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.12s ease;
}

.product-card:hover { transform: translateY(-3px); color: var(--ink); }

.product-photo-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f6f1e6;
}

.product-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 9px;
    border-radius: 999px;
}

.badge-out { background: rgba(163, 42, 26, 0.92); color: #fff; }
.badge-in { background: rgba(31, 107, 51, 0.92); color: #fff; }

.product-card-body {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-card-name { font-weight: 800; font-size: 15px; }
.product-card-price { color: var(--gold); font-weight: 800; font-size: 14px; }
.product-card-desc {
    color: var(--muted);
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Product detail ---------- */

.product-detail {
    display: grid;
    grid-template-columns: minmax(240px, 380px) 1fr;
    gap: 32px;
}

@media (max-width: 720px) {
    .product-detail { grid-template-columns: 1fr; }
}

.product-detail-photo {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #f6f1e6;
    cursor: zoom-in;
}

.product-detail-photo img { width: 100%; display: block; }

.product-detail-name {
    font-size: 26px;
    color: var(--navy);
    margin: 0 0 6px;
}

.product-detail-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--gold);
    margin: 0 0 14px;
}

.product-detail-desc { margin-bottom: 20px; }

.stock-line { margin-bottom: 18px; font-weight: 700; }
.stock-in { color: var(--success-text); }
.stock-out { color: var(--danger-text); }

.back-link { display: inline-block; margin-top: 18px; font-weight: 700; }

/* Lightweight click-to-enlarge overlay (replaces the old popup-window photo viewer) */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 30, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 999;
}

.lightbox-overlay[hidden] { display: none; }

.lightbox-overlay img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* ---------- Forms (contact page) ---------- */

.field { margin-bottom: 18px; }

.field label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 6px;
}

.field-optional {
    font-weight: 400;
    color: var(--muted);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-family: inherit;
    font-size: 15px;
    background: #fffdf9;
    color: var(--ink);
}

.field input:focus, .field textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(13, 11, 82, 0.12);
}

/* Honeypot field -- hidden from sighted users and screen readers, but still
   present in the DOM/tab order trap for bots that fill every field blindly. */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 9px;
    padding: 12px 26px;
    background: var(--navy);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover { background: var(--navy-deep); color: #fff; }

/* ---------- Events ---------- */

.event-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 18px 20px;
}

.event-card + .event-card { margin-top: 16px; }

.event-dates {
    flex: 0 0 auto;
    background: var(--navy);
    color: #fff;
    border-radius: 10px;
    padding: 10px 14px;
    text-align: center;
    font-weight: 800;
    font-size: 13px;
    min-width: 92px;
}

.event-body { flex: 1; }
.event-location { font-size: 18px; font-weight: 800; color: var(--navy); margin: 0 0 6px; }

/* ---------- Footer ---------- */

.site-footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    padding: 26px 20px;
    font-size: 13px;
}

.site-footer a { color: #fff; text-decoration: underline; }

.footer-credit {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.footer-credit a {
    color: var(--peach-deep);
    font-weight: 800;
    text-decoration: none;
}

.footer-credit a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
    .site-topbar-inner { flex-direction: column; align-items: flex-start; }
    .brand-contact { text-align: left; }
    .brand-text { font-size: 32px; }
    .hero-tagline { font-size: 32px; }
    .site-main { padding: 28px 16px 48px; }
    .card { padding: 18px; }
}
