/* =============================================================================
   Ein Stück Geschichte – shop styles (on top of Bootstrap 5.3)

   Design intent: calm and classic for buyers of antique furniture – warm ivory
   background, walnut-brown accents, a serif display face for headings, large
   photographs, generous white space and comfortably large body text.
   ============================================================================= */

/* Self-hosted font (no external requests → no third-party data transfer, GDPR) */
@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
}
@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
}

:root {
    --esg-ivory:   #faf7f2;   /* page background */
    --esg-paper:   #f3ede4;   /* bands, tiles */
    --esg-line:    #e2d8ca;   /* hairlines */
    --esg-walnut:  #4a2f1d;   /* primary accent */
    --esg-walnut-2:#6b4429;   /* hover */
    --esg-gold:    #a8834f;   /* small highlights */
    --esg-ink:     #2b2420;   /* text */
    --esg-muted:   #6f655c;
    --esg-serif:   "Cormorant Garamond", Georgia, "Times New Roman", serif;

    --bs-body-bg: var(--esg-ivory);
    --bs-body-color: var(--esg-ink);
    --bs-body-font-size: 1.0625rem;          /* 17px: easy reading */
    --bs-body-line-height: 1.65;
    --bs-link-color-rgb: 74, 47, 29;
    --bs-link-hover-color-rgb: 107, 68, 41;
    --bs-border-color: var(--esg-line);
}

h1, h2, h3 { hyphens: auto; overflow-wrap: break-word; }
h1, h2, h3, .brand-name, .footer-brand, .price, .price-sold, .service-title {
    font-family: var(--esg-serif);
    font-weight: 600;
    letter-spacing: .01em;
}

.skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 1000; background: #fff; padding: .5rem 1rem; }

/* ---- Header ---------------------------------------------------------------- */
.site-header { background: var(--esg-ivory); border-bottom: 1px solid var(--esg-line); }
.brand { text-decoration: none; color: var(--esg-ink); display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 2rem; color: var(--esg-walnut); }
.brand-tagline { font-size: .85rem; color: var(--esg-muted); letter-spacing: .08em; text-transform: uppercase; }
.header-links a { color: var(--esg-muted); text-decoration: none; margin-left: 1.25rem; font-size: .95rem; }
.header-links a:hover { color: var(--esg-walnut); }
.category-nav { border-top: 1px solid var(--esg-line); }
.category-nav .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.category-nav .nav-link { color: var(--esg-ink); white-space: nowrap; padding: .7rem 1rem; border-bottom: 2px solid transparent; }
.category-nav .nav-link:hover, .category-nav .nav-link.active { color: var(--esg-walnut); border-bottom-color: var(--esg-gold); }

.breadcrumbs { padding-top: 1.25rem; font-size: .9rem; }
.breadcrumb-item a { color: var(--esg-muted); text-decoration: none; }

/* ---- Buttons & pills ---------------------------------------------------------- */
.btn-walnut { background: var(--esg-walnut); border-color: var(--esg-walnut); color: #fff; }
.btn-walnut:hover, .btn-walnut:focus { background: var(--esg-walnut-2); border-color: var(--esg-walnut-2); color: #fff; }
.btn-walnut:disabled { background: #8b7a6c; border-color: #8b7a6c; opacity: 1; }
.pill { display: inline-block; padding: .35rem .9rem; margin: 0 .4rem .5rem 0; border: 1px solid var(--esg-line);
        border-radius: 999px; color: var(--esg-ink); text-decoration: none; font-size: .95rem; background: #fff; }
.pill:hover, .pill.active { border-color: var(--esg-walnut); color: var(--esg-walnut); }
.pill.active { background: var(--esg-paper); }
.category-pills { margin: 1.25rem 0 2rem; }

/* ---- Sections ------------------------------------------------------------------ */
.section { padding-top: 3rem; padding-bottom: 3rem; }
.section-title { font-size: 2rem; color: var(--esg-walnut); margin-bottom: 1.5rem; }
.section-title-sm { font-size: 1.6rem; color: var(--esg-walnut); margin: 2rem 0 1rem; }
.page-title { font-size: clamp(1.9rem, 7vw, 2.6rem); color: var(--esg-walnut); hyphens: auto; overflow-wrap: break-word; }
.lead-sm { font-size: 1.15rem; color: var(--esg-muted); max-width: 48rem; }
.listing-count { color: var(--esg-muted); margin-bottom: .25rem; }
.narrow { max-width: 52rem; }
.link-more { color: var(--esg-walnut); text-decoration: none; }

/* ---- Hero ------------------------------------------------------------------------ */
.hero { background: var(--esg-paper); border-bottom: 1px solid var(--esg-line); padding: 4.5rem 0 4rem; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .14em; color: var(--esg-gold); font-size: .85rem; margin-bottom: .5rem; }
.hero h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); color: var(--esg-walnut); margin-bottom: 1rem; }
.hero .lead { font-size: 1.25rem; max-width: 40rem; color: var(--esg-ink); }
.hero-actions { margin-top: 2rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.hero-count { color: var(--esg-muted); }

/* ---- Category tiles ------------------------------------------------------------- */
.category-tile { display: block; position: relative; border-radius: .25rem; overflow: hidden; background: var(--esg-paper);
                 aspect-ratio: 4 / 5; text-decoration: none; }
.category-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.category-tile:hover img { transform: scale(1.04); }
.category-tile-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1rem 1rem; color: #fff;
                       font-family: var(--esg-serif); font-size: 1.35rem; font-weight: 600; line-height: 1.2;
                       background: linear-gradient(transparent, rgba(30, 18, 10, .75)); }
.category-tile-label small { display: block; font-family: system-ui, sans-serif; font-size: .8rem; font-weight: 400; opacity: .9; }

/* ---- Product cards ------------------------------------------------------------------ */
.product-card-link { display: block; text-decoration: none; color: inherit; }
.product-card-image { position: relative; aspect-ratio: 4 / 3; background: var(--esg-paper); overflow: hidden; border-radius: .25rem; }
.product-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.product-card-link:hover .product-card-image img { transform: scale(1.04); }
.product-card-body { padding: .75rem .1rem 0; }
.product-card-title { font-size: 1.25rem; line-height: 1.25; margin: 0 0 .25rem; color: var(--esg-ink); }
.product-card-meta { font-size: .85rem; color: var(--esg-muted); margin: 0; }
.product-card-price { font-weight: 600; margin: .25rem 0 0; color: var(--esg-walnut); }
.product-card.is-sold .product-card-image img { filter: grayscale(.6); opacity: .8; }
.product-card.is-sold .product-card-price { color: var(--esg-muted); font-weight: 400; }
.badge-sold, .badge-set, .badge-ai { position: absolute; top: .6rem; left: .6rem; padding: .2rem .6rem; font-size: .8rem;
                                     border-radius: .2rem; letter-spacing: .03em; }
.badge-sold { background: var(--esg-ink); color: #fff; text-transform: uppercase; }
.badge-set { background: rgba(255, 255, 255, .92); color: var(--esg-walnut); }

/* ---- Product page ------------------------------------------------------------------- */
.gallery-main { margin: 0; background: var(--esg-paper); border-radius: .25rem; overflow: hidden; }
.gallery-main img { width: 100%; height: auto; max-height: 78vh; object-fit: contain; cursor: zoom-in; display: block; margin: 0 auto; }
.gallery-thumbs { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; background: none; border-radius: .2rem; overflow: hidden;
                         aspect-ratio: 1; width: 100%; }
.gallery-thumbs button.active, .gallery-thumbs button:hover { border-color: var(--esg-gold); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.product-number { color: var(--esg-muted); font-size: .9rem; letter-spacing: .05em; margin-bottom: .25rem; }
.product-title { font-size: clamp(2rem, 3.5vw, 2.8rem); color: var(--esg-walnut); line-height: 1.1; }
.product-subtitle { color: var(--esg-muted); font-size: 1.05rem; }
.buy-box { background: #fff; border: 1px solid var(--esg-line); border-radius: .25rem; padding: 1.5rem; margin: 1.5rem 0; }
.price { font-size: 2.4rem; color: var(--esg-walnut); margin: 0; line-height: 1.1; }
.price-sold { font-size: 2rem; color: var(--esg-muted); margin: 0 0 .5rem; }
.price-note { color: var(--esg-muted); font-size: .92rem; margin: .5rem 0 1.25rem; }
.facts { display: grid; grid-template-columns: 7rem 1fr; gap: .5rem 1rem; }
.facts dt { font-weight: 600; color: var(--esg-muted); font-size: .92rem; }
.facts dd { margin: 0; }
.dimensions { list-style: none; padding: 0; margin: 0; }
.prose p { margin-bottom: 1rem; }
.detail-images figure { margin: 0; }
.detail-images img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: .2rem; }
.detail-images figcaption { font-size: .85rem; color: var(--esg-muted); margin-top: .35rem; }

/* AI visualisations: visibly separated and labelled (owner requirement) */
.ai-section { margin-top: 3rem; padding: 1.5rem; background: var(--esg-paper); border: 1px dashed var(--esg-gold); border-radius: .25rem; }
.ai-disclaimer { font-size: .95rem; color: var(--esg-muted); max-width: 52rem; }
.ai-figure { position: relative; margin: 0; }
.ai-figure img { width: 100%; height: auto; border-radius: .2rem; }
.badge-ai { top: .8rem; left: 1.4rem; background: var(--esg-gold); color: #fff; font-weight: 600; text-transform: uppercase; }

.related { margin-top: 3rem; border-top: 1px solid var(--esg-line); }

/* Lightbox */
#lightbox .modal-content { background: #111; border: 0; position: relative; }
.lightbox-img { width: 100%; max-height: 88vh; object-fit: contain; }
.lightbox-close { position: absolute; top: .75rem; right: .75rem; z-index: 2; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, .35); color: #fff; border: 0;
                font-size: 2.5rem; width: 3rem; height: 4rem; line-height: 1; }
.lightbox-nav.prev { left: .5rem; }
.lightbox-nav.next { right: .5rem; }

/* ---- Service band & footer ------------------------------------------------------------ */
.service-band { background: var(--esg-paper); border-top: 1px solid var(--esg-line); padding: 3rem 0 1.5rem; }
.service-title { font-size: 1.4rem; color: var(--esg-walnut); margin-bottom: .5rem; }
.site-footer { background: var(--esg-walnut); color: #efe6da; padding: 3rem 0 2rem; margin-top: 0; }
.site-footer a { color: #efe6da; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand { font-size: 1.6rem; color: #fff; margin-bottom: .5rem; }
.footer-heading { text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; color: #d7c3a5; }
.footer-note { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 2rem; padding-top: 1rem; font-size: .85rem; color: #d7c3a5; }

@media (max-width: 575.98px) {
    .brand-name { font-size: 1.6rem; }
    .header-links { display: none; }
    .section { padding-top: 2rem; padding-bottom: 2rem; }
    .buy-box { padding: 1.1rem; }
}

/* =============================================================================
   Cart, checkout, order page, withdrawal (build step 3)
   ============================================================================= */
.narrow-wide { max-width: 72rem; }
.cart-link { position: relative; }
.cart-badge { display: inline-block; min-width: 1.4rem; padding: 0 .35rem; border-radius: 1rem; background: var(--esg-walnut);
    color: #fff; font-size: .8rem; line-height: 1.4rem; text-align: center; }
.badge-reserved { background: var(--esg-gold); }
.reserved-note { background: var(--esg-paper); border-left: 3px solid var(--esg-gold); padding: .75rem 1rem; margin: 0; }

.cart-list { list-style: none; padding: 0; margin: 0 0 1.5rem; border-top: 1px solid var(--esg-line); }
.cart-row { display: grid; grid-template-columns: 88px 1fr auto; grid-template-areas: "thumb info price" "thumb info remove";
    gap: .25rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--esg-line); align-items: start; }
.cart-thumb { grid-area: thumb; }
.cart-thumb img { width: 88px; height: 88px; object-fit: cover; border-radius: .2rem; background: var(--esg-paper); }
.cart-info { grid-area: info; display: flex; flex-direction: column; min-width: 0; }
.cart-title { font-family: var(--esg-serif); font-size: 1.25rem; line-height: 1.25; color: var(--esg-ink); text-decoration: none; }
.cart-meta { color: var(--esg-muted); font-size: .9rem; }
.cart-warning { color: #8a3b12; font-size: .9rem; font-weight: 600; margin-top: .25rem; }
.cart-price { grid-area: price; font-weight: 600; white-space: nowrap; }
.cart-remove { grid-area: remove; text-align: right; }
.cart-remove .btn-link { padding: 0; color: var(--esg-muted); }
.cart-row.is-unavailable .cart-thumb img, .cart-row.is-unavailable .cart-title { opacity: .55; }
.cart-summary { max-width: 28rem; margin-left: auto; }
.cart-total, .summary-total, .summary-line { display: flex; justify-content: space-between; gap: 1rem; margin: 0 0 .25rem; }
.cart-total { font-size: 1.2rem; }

.checkout-form .form-hint { color: var(--esg-muted); font-size: .85rem; font-weight: normal; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fulfilment-options { display: grid; gap: .75rem; }
.fulfilment-option { display: flex; gap: .75rem; align-items: flex-start; background: #fff; border: 1px solid var(--esg-line);
    border-radius: .25rem; padding: .9rem 1rem; cursor: pointer; }
.fulfilment-option input { margin-top: .35rem; }
.checkout-summary { background: #fff; border: 1px solid var(--esg-line); border-radius: .25rem; padding: 1.5rem; position: sticky; top: 1rem; }
.summary-list { list-style: none; padding: 0; margin: 0 0 .75rem; }
.summary-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px solid var(--esg-line); }
.summary-list li span:last-child, .summary-line span:last-child { white-space: nowrap; }
.summary-line { color: var(--esg-muted); font-size: .95rem; }
.summary-total { font-size: 1.25rem; font-weight: 600; margin-top: .75rem; }
.summary-vat { color: var(--esg-muted); font-size: .9rem; text-align: right; }

.status-label { font-style: italic; }
.status-box { background: #fff; border: 1px solid var(--esg-line); border-radius: .25rem; padding: 1.25rem 1.5rem; margin: 1rem 0; }
.timeline { list-style: none; padding: 0; margin: 0 0 1rem; border-left: 2px solid var(--esg-line); }
.timeline li { padding: 0 0 .9rem 1rem; position: relative; font-size: .95rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: .45rem; width: 10px; height: 10px; border-radius: 50%;
    background: var(--esg-gold); }
.timeline time { display: block; color: var(--esg-muted); font-size: .8rem; }

.withdraw-button { margin-top: .75rem; }
.legal-text { font-size: .98rem; }

@media (max-width: 575.98px) {
    .cart-row { grid-template-columns: 64px 1fr; grid-template-areas: "thumb info" "thumb price" "thumb remove"; }
    .cart-thumb img { width: 64px; height: 64px; }
    .cart-price { text-align: left; }
    .cart-remove { text-align: left; }
    .checkout-summary { padding: 1.1rem; position: static; }
}
.site-footer li { overflow-wrap: anywhere; hyphens: auto; }

/* Contact form, shipping guide prices (2026-10-06) */
.contact-piece { background: var(--esg-paper); border-left: 3px solid var(--esg-gold); padding: .6rem 1rem; }
.contact-form legend { font-size: 1rem; }
.shipping-request { background: #fff; border: 1px solid var(--esg-line); border-radius: .25rem; padding: 1rem 1.25rem; }
.rates-table { font-size: .95rem; }
.rates-table th, .rates-table td { vertical-align: top; }
.rates-table td { white-space: nowrap; }
.rates-table thead th { font-weight: 600; line-height: 1.3; }
.rates-table th:first-child { min-width: 10rem; }
.rates-table td.num { text-align: right; }
.rates-legend { font-size: .92rem; color: var(--esg-muted); }
