/* ============================================
   GLOBAL STYLES - Windsor Furniture Co
   Brand: gold + charcoal (from the long-standing store identity),
   Playfair Display headings, Raleway body.
   Header / megamenu styles live in megamenu.css.
   ============================================ */

/* Design Tokens */
:root {
    --color-gold: #f2bd1e;
    --color-gold-light: #ffdc73;
    --color-gold-pale: #fff6dc;
    --color-gold-dark: #aa8925;
    --color-gold-deep: #7a5c00;      /* gold that passes contrast as text on white */
    --color-charcoal: #2f2f30;
    --color-charcoal-soft: #3d3d3f;
    --color-gray-dark: #5f5e61;
    --color-gray: #8e8d91;
    --color-gray-light: #bebcc2;

    /* Semantic aliases (used across route stylesheets) */
    --color-primary: var(--color-charcoal);
    --color-primary-light: var(--color-charcoal-soft);
    --color-primary-dark: #1f1f20;
    --color-secondary: var(--color-gold);
    --color-secondary-light: var(--color-gold-light);
    --color-accent: var(--color-gold-deep);
    --color-text: #2f2f30;
    --color-text-light: #5f5e61;
    --color-text-muted: #8e8d91;
    --color-bg: #ffffff;
    --color-bg-light: #f7f6f3;
    --color-bg-alt: #efede8;
    --color-border: #e3e1dc;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.14);
    --radius: 6px;
    --transition: 0.2s ease;

    /* Bootstrap hooks */
    --bs-primary: #f2bd1e;
    --bs-primary-rgb: 242, 189, 30;
    --bs-link-color: #7a5c00;
    --bs-link-color-rgb: 122, 92, 0;
    --bs-link-hover-color: #2f2f30;
    --bs-body-font-family: var(--font-body);
}

/* Base Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* clip, not hidden: hidden on html+body makes body a scroll container and breaks the sticky header */
    overflow-x: clip;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-charcoal);
}

a {
    color: var(--color-gold-deep);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-charcoal);
}

img {
    max-width: 100%;
    height: auto;
}

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

/* Small uppercase label above headings */
.eyebrow {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-gold-deep);
    margin-bottom: 0.5rem;
}

/* Brand display heading: uppercase, wide-spaced Playfair (store signage style) */
.display-brand {
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ============================================
   SECTION UTILITIES
   ============================================ */
.section-padding {
    padding: 5rem 0;
}

.section-padding-sm {
    padding: 3rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 620px;
    margin: 0 auto;
}

.section-bg-light {
    background-color: var(--color-bg-light);
}

.section-bg-alt {
    background-color: var(--color-bg-alt);
}

/* ============================================
   BUTTONS (gold with charcoal text for contrast)
   ============================================ */
.btn {
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius);
}

.btn-primary {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-charcoal);
}

.btn-primary:disabled,
.btn-primary.disabled {
    background-color: var(--color-bg-alt);
    border-color: var(--color-border);
    color: var(--color-text-muted);
    opacity: 1;
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn-primary:active,
.btn-primary.active {
    background-color: var(--color-gold-dark) !important;
    border-color: var(--color-gold-dark) !important;
    color: #ffffff !important;
}

.btn-secondary,
.btn-dark {
    background-color: var(--color-charcoal);
    border-color: var(--color-charcoal);
    color: #ffffff;
}

.btn-secondary:hover,
.btn-dark:hover {
    background-color: #000000;
    border-color: #000000;
    color: var(--color-gold);
}

.btn-outline-primary,
.btn-outline-secondary {
    color: var(--color-charcoal);
    border-color: var(--color-charcoal);
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover {
    background-color: var(--color-charcoal);
    border-color: var(--color-charcoal);
    color: #ffffff;
}

.btn-outline-light:hover {
    color: var(--color-charcoal);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 0.2rem rgba(242, 189, 30, 0.3);
}

.form-check-input:checked {
    background-color: var(--color-charcoal);
    border-color: var(--color-charcoal);
}

.page-link {
    color: var(--color-charcoal);
}

.page-item.active .page-link {
    background-color: var(--color-charcoal);
    border-color: var(--color-charcoal);
    color: #ffffff;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.card:has(form) {
    transition: none;
}
.card:has(form):hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   SITE FOOTER
   ============================================ */
.site-footer {
    background: var(--color-charcoal);
    color: rgba(255, 255, 255, 0.82);
    border-top: 8px solid var(--color-gold);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 0.9fr 1.4fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.site-footer__brand {
    text-align: center;
}

.site-footer__logo {
    width: 75%;
    height: auto;
    margin-bottom: 1rem;
}

.site-footer__brand .site-footer__social {
    justify-content: center;
}

/* Map fills the row height set by the other columns */
.site-footer__map {
    display: flex;
    flex-direction: column;
}

.site-footer__map iframe {
    flex: 1;
    width: 100%;
    min-height: 220px;
    border: 0;
    border-radius: var(--radius, 8px);
}

.site-footer h2 {
    font-family: var(--font-body);
    color: var(--color-gold);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 1rem;
}

.site-footer p {
    font-size: 0.92rem;
    line-height: 1.7;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li {
    margin-bottom: 0.5rem;
    font-size: 0.92rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.82);
    transition: color var(--transition);
}

.site-footer a:hover {
    color: var(--color-gold);
}

.site-footer__contact i {
    color: var(--color-gold);
    width: 1.25rem;
    display: inline-block;
}

.site-footer__hours {
    margin-bottom: 1.75rem;
}

.site-footer__hours i {
    color: var(--color-gold);
    width: 1.25rem;
    display: inline-block;
}

.site-footer__social {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.site-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
}

.site-footer__social a:hover {
    background: var(--color-gold);
    color: var(--color-charcoal);
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
}

.site-footer__bottom p {
    margin: 0;
    font-size: 0.85rem;
}

.site-footer__legal {
    display: flex;
    gap: 1.5rem;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-form .form-group {
    margin-bottom: 1.25rem;
}

.contact-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Shop + product pages: breadcrumbs with the optional "pardon our progress" notice on the right */
.shop-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.shop-topbar .shop-breadcrumb ol,
.shop-topbar .product-breadcrumb ol {
    margin-bottom: 0;
}

.shop-progress-alert {
    margin: 0;
    padding: 0.5rem 0.9rem;
    font-size: 1rem;
}

.shop-progress-alert .bi {
    margin-right: 0.35rem;
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 260px;
    border: 0;
    border-radius: var(--radius);
}

/* ============================================
   COMING SOON PAGE
   ============================================ */
.coming-soon-body {
    min-height: 100svh;
    background: var(--color-charcoal);
}

.coming-soon {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-charcoal) 0%, #1f1f20 100%);
    color: #ffffff;
    overflow: hidden;
    padding: 2rem;
}

.coming-soon::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(242, 189, 30, 0.14) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(242, 189, 30, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.coming-soon-container {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
    animation: fadeInUp 0.8s ease-out;
}

.coming-soon-logo {
    width: min(340px, 70vw);
    height: auto;
    margin: 0 auto 1.75rem;
    display: block;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.3));
}

.coming-soon h1 {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #ffffff;
    line-height: 1.2;
}

.coming-soon-container > p:first-of-type {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
}

.coming-soon-sub {
    font-size: 1.1rem;
    color: var(--color-gold-light);
    margin-bottom: 3rem !important;
    font-weight: 500;
}

.coming-soon-legal {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7) !important;
    margin-top: 3rem;
}

.coming-soon-legal a {
    color: var(--color-gold-light);
    font-weight: 500;
}

.coming-soon-legal a:hover {
    color: #ffffff;
}

.coming-soon-legal a + span {
    margin: 0 0.5rem;
    color: rgba(255, 255, 255, 0.5);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   LEGAL PAGES (Privacy, Terms)
   ============================================ */
.legal-page h1 {
    font-size: 2.2rem;
    font-weight: 600;
}

.legal-page h2 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-gold);
}

.legal-page h3 {
    font-size: 1.1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.legal-page p,
.legal-page li {
    line-height: 1.8;
    color: #444;
}

.legal-page ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-page address {
    font-style: normal;
    line-height: 1.8;
    color: #444;
}

/* ============================================
   CONTENT PAGES (about, financing, etc.)
   ============================================ */
.content-hero {
    background: var(--color-bg-alt);
    padding: 3.5rem 0 2.5rem;
    margin-bottom: 3rem;
    border-bottom: 4px solid var(--color-gold);
}

.content-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.content-hero p {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 620px;
}

.content-body {
    margin: 0 0 4rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

.content-body h2 {
    font-size: 1.6rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.content-body h3 {
    font-size: 1.2rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.content-card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-gold);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.content-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Charcoal call-to-action band (Our History, Financing, Layaway) */
.story-callout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    margin-top: 3.5rem;
    padding: 1.5rem 1.75rem;
    background: var(--color-charcoal);
    border-left: 6px solid var(--color-gold);
    border-radius: var(--radius);
    color: #ffffff;
}

.story-callout > div:first-child {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.story-callout > div:first-child > .bi {
    font-size: 2rem;
    color: var(--color-gold);
}

.story-callout strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
}

.story-callout span {
    color: rgba(255, 255, 255, 0.82);
}

.story-callout__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.story-callout__actions .btn {
    white-space: nowrap;
}

.story-callout .btn-outline-secondary {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
}

.story-callout .btn-outline-secondary:hover {
    background: #ffffff;
    color: var(--color-charcoal);
}

@media (max-width: 575.98px) {
    .story-callout__actions,
    .story-callout__actions .btn {
        width: 100%;
    }
}

/* Quantity stepper (product page, cart): - [n] + */
.qty-stepper {
    display: inline-flex;
    flex: none;
    align-items: stretch;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #ffffff;
}

.qty-stepper__btn {
    width: 2.75rem;
    border: 0;
    background: none;
    color: var(--color-charcoal);
    font-size: 1.2rem;
    cursor: pointer;
}

.qty-stepper__btn:hover:not(:disabled) {
    background: var(--color-bg-light);
}

.qty-stepper__btn:disabled {
    color: var(--color-gray-light);
    cursor: not-allowed;
}

.qty-stepper input {
    width: 3rem;
    border: 0;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-charcoal);
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.qty-stepper input:focus {
    outline: none;
}

.qty-stepper:focus-within {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 0.2rem rgba(242, 189, 30, 0.3);
}

.qty-stepper--sm .qty-stepper__btn {
    width: 2.25rem;
    font-size: 1rem;
}

.qty-stepper--sm input {
    width: 2.5rem;
    height: 2.25rem;
    font-size: 0.95rem;
}

/* Order summary (checkout confirmation + account order detail) */
.order-summary {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.order-summary__items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.order-summary__items li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.order-summary__name {
    display: block;
    font-weight: 700;
    color: var(--color-charcoal);
}

a.order-summary__name:hover {
    color: var(--color-gold-deep);
}

.order-summary__qty {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.order-summary__totals {
    margin: 0;
    padding: 1rem 1.25rem;
    background: var(--color-bg-light);
}

.order-summary__totals > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 0;
    color: var(--color-text-light);
}

.order-summary__totals dt,
.order-summary__totals dd {
    margin: 0;
    font-weight: 400;
}

.order-summary__grand {
    margin-top: 0.5rem;
    padding-top: 0.75rem !important;
    border-top: 1px solid var(--color-border);
    font-size: 1.15rem;
    color: var(--color-charcoal) !important;
}

.order-summary__grand dt,
.order-summary__grand dd {
    font-weight: 700 !important;
}

.order-summary__info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 2rem;
    padding: 1.25rem;
    border-top: 1px solid var(--color-border);
}

.order-summary__info h3 {
    margin: 0 0 0.4rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-gold-deep);
}

.order-summary__info p {
    margin: 0;
    color: var(--color-text-light);
}

.order-summary__note {
    margin-top: 0.5rem !important;
    font-style: italic;
}

.order-status {
    display: inline-block;
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: middle;
    background: var(--color-bg-alt);
    color: var(--color-text-light);
}

.order-status--paid {
    background: #e7f4ec;
    color: #1e7a3c;
}

.order-status--refunded,
.order-status--cancelled {
    background: #fbeaec;
    color: #b02a37;
}

/* SweetAlert2 toasts (WF.toast / WF.cartAdded in app.js) */
.swal2-popup.wf-toast {
    width: 22rem;
    padding: 0.85rem 1rem;
    border-left: 4px solid var(--color-gold);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-family: var(--font-body);
    color: var(--color-charcoal);
}

.swal2-popup.wf-toast .wf-toast__title {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-charcoal);
}

.swal2-popup.wf-toast .wf-toast__text {
    margin: 0.2rem 0 0;
    padding: 0;
    font-size: 0.92rem;
    text-align: left;
    color: var(--color-text-light);
}

.wf-toast__count {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

.swal2-popup.wf-toast .swal2-actions {
    justify-content: flex-start;
    margin: 0.6rem 0 0;
}

.swal2-popup.wf-toast .wf-toast__btn {
    margin: 0;
}

.swal2-popup.wf-toast .wf-toast__close {
    color: var(--color-text-muted);
}

.swal2-popup.wf-toast .swal2-timer-progress-bar {
    background: var(--color-gold);
}

/* SweetAlert2 confirm dialogs (WF.confirm) */
.swal2-popup.wf-dialog {
    width: 26rem;
    padding: 1.75rem 1.5rem 1.5rem;
    border-top: 4px solid var(--color-gold);
    border-radius: var(--radius);
    font-family: var(--font-body);
}

.swal2-popup.wf-dialog .wf-dialog__title {
    padding: 0;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-charcoal);
}

.swal2-popup.wf-dialog .wf-dialog__text {
    margin: 0.6rem 0 0;
    padding: 0;
    font-size: 0.98rem;
    color: var(--color-text-light);
}

.swal2-popup.wf-dialog .swal2-icon.swal2-warning {
    border-color: var(--color-gold);
    color: var(--color-gold-deep);
}

.swal2-popup.wf-dialog .wf-dialog__actions {
    gap: 0.6rem;
    margin-top: 1.4rem;
}

/* Header cart badge bump after adding an item */
@keyframes wf-cart-bump {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(1.25); }
}

.site-actions__cart.is-bumped {
    animation: wf-cart-bump 0.5s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .site-actions__cart.is-bumped {
        animation: none;
    }
}

/* Privacy Policy / Terms of Use: readable line length */
.legal-body {
    max-width: 780px;
}

.legal-body h3 {
    font-size: 1.1rem;
    color: var(--color-charcoal);
}

.legal-body li {
    margin-bottom: 0.4rem;
}

.legal-contact {
    font-style: normal;
    line-height: 1.8;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991.98px) {
    .section-header h2 {
        font-size: 1.75rem;
    }

    .section-padding {
        padding: 3.5rem 0;
    }

    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767.98px) {
    .coming-soon {
        padding: 4rem 1.5rem;
    }

    .coming-soon-logo {
        width: min(280px, 78vw);
        margin-bottom: 1.25rem;
    }

    .coming-soon h1 {
        font-size: 2.5rem;
    }

    .coming-soon-container > p:first-of-type {
        font-size: 1.2rem;
    }

    .content-hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 575.98px) {
    .section-header h2 {
        font-size: 1.5rem;
    }

    .section-padding {
        padding: 2.5rem 0;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .site-footer__bottom {
        flex-direction: column;
        text-align: center;
    }
}
