/*
 * Quark 2 — user customizations
 *
 * This file is safe to edit. It is loaded last so anything here overrides
 * theme.css without having to mark rules !important.
 */

/* ============================================================
   The Bob Godfrey Collection — shop styles
   Neutral colours so it reads well in both light and dark mode.
   ============================================================ */
.shop-page > p { max-width: 60ch; }

.shop-section-title {
    margin: 2.4rem 0 1.2rem;
    display: flex; flex-wrap: wrap; align-items: baseline; gap: .6rem;
}
.shop-price-tag {
    font-size: .78rem; font-weight: 700; letter-spacing: .02em;
    background: #ffaa00; color: #1a1200;
    padding: .18rem .6rem; border-radius: 999px; white-space: nowrap;
}

/* Responsive product grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.4rem;
    margin: 0 0 2.5rem;
}

.product-card {
    display: flex; flex-direction: column;
    border: 1px solid rgba(127,127,127,.22);
    border-radius: 10px; overflow: hidden;
    background: rgba(127,127,127,.05);
    transition: box-shadow .15s ease, transform .15s ease;
}
.product-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.14); transform: translateY(-2px); }

.product-card-media {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 4 / 3; background: rgba(127,127,127,.10);
    overflow: hidden;
}
.product-card-media img {
    width: 100%; height: 100%;
    object-fit: contain;          /* show the whole artwork, never crop */
}
.product-card-noimg {
    font-size: .85rem; opacity: .55; padding: 1rem; text-align: center;
}

.product-card-body { padding: .9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.product-card-title { font-size: 1rem; line-height: 1.3; margin: 0; }
.product-card-title a { text-decoration: none; color: #1a1a1a; }
.product-card-title a:hover { color: #000; }
.product-card-price { font-weight: 400; margin: 0; }
.product-card-buy { margin-top: auto; }
.product-card-buy a { max-width: 100%; box-sizing: border-box; }

.shop-cart-bar { margin: 1.5rem 0 2rem; }

/* ---- Individual product page ---- */
.product-back { margin-bottom: 1.2rem; }
.product-back a { text-decoration: none; opacity: .8; }

/* Product page: image on top (sole focus), details stacked below */
.product-detail-media {
    max-width: 820px; margin: 0 auto 1.8rem;
    background: rgba(127,127,127,.08); border: 1px solid rgba(127,127,127,.18);
    border-radius: 10px; padding: 1rem;
    display: flex; align-items: center; justify-content: center;
}
.product-detail-info { max-width: 720px; margin: 0 auto; }
.product-detail-media img {
    max-width: 100%; height: auto; display: block; border-radius: 4px;
}
.product-detail-title { margin: 0 0 .4rem; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.2; overflow-wrap: normal; word-break: normal; hyphens: none; }
.product-detail-price { font-size: 1.5rem; font-weight: 800; margin: 0 0 1.1rem; }
.product-detail-buy { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.6rem; }
.product-detail-desc { line-height: 1.6; }
.product-detail-desc p { margin: 0 0 1rem; }

@media (max-width: 720px) {
    .product-detail-media { max-width: 100%; }
}

/* ============================================================
   Artwork protection (deterrents — not absolute).
   Baked-in watermark is applied to the image files themselves.
   ============================================================ */
.product-card-media img,
.product-detail-media img {
    -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none;
    -o-user-drag: none; user-drag: none;
    -webkit-user-select: none; -moz-user-select: none; user-select: none;
    -webkit-touch-callout: none;
}
/* Transparent shield over the large product image to deter drag/save */
.product-detail-media { position: relative; }
.product-detail-media::after {
    content: ""; position: absolute; inset: 0; z-index: 3;
    background: transparent;
}
/* Hide the artwork when printing; show a notice instead */
@media print {
    .product-card-media img,
    .product-detail-media img { display: none !important; }
    .product-detail-media::before,
    .product-card-media::before {
        content: "Artwork © The Bob Godfrey Collection — not licensed for reproduction";
        display: block; padding: 1.5rem; text-align: center; font-weight: 700;
    }
    .product-detail-buy, .product-card-buy, .shop-cart-bar { display: none !important; }
}

/* Persistent cart link, top-right in the header on every page */
.header-cart {
    display: inline-flex; align-items: center; gap: .4rem;
    text-decoration: none; font-weight: 600; font-size: .95rem;
    padding: .35rem .7rem; border-radius: 6px; white-space: nowrap;
    line-height: 1;
}
.header-cart:hover { background: rgba(127,127,127,.14); }
.header-cart i { font-size: 1.05rem; }
@media (max-width: 560px) {
    .header-cart span { display: none; }   /* icon-only on small screens */
}

/* Logo sizing in header */
.navbar-brand img { height: 46px; width: auto; display: block; }

/* Home page hero image (full-width, uncropped) */
.home-hero { width: 100%; margin: 0 0 1.5rem; }
.home-hero img { display: block; width: 100%; height: auto; }

/* Link colour: match the red logo instead of the theme's default purple */
:root,
:root[data-theme="light"],
:root[data-theme="dark"] {
    --q2-link: #e30a02;   /* logo red, a touch deeper for legibility */
}
a { color: var(--q2-link); }
a:hover { color: #b00800; }

/* Merged store hero: narrower banner with white overlay title */
.store-hero { position: relative; width: 100%; overflow: hidden; margin: 0 0 1.5rem; }
.store-hero img {
    display: block; width: 100%; height: 520px;
    object-fit: cover; object-position: center 68%;
}
.store-hero-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: flex-end; justify-content: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 45%, rgba(0,0,0,.55) 100%);
    padding: 0 1.2rem 2.6rem;
}
.store-hero-overlay h1 {
    margin: 0; color: #fff; text-align: center; line-height: 1.1;
    font-size: clamp(1.9rem, 5vw, 3.6rem);
    text-shadow: 0 2px 16px rgba(0,0,0,.6);
}
@media (max-width: 720px) {
    .store-hero img { height: 340px; }
}

/* Footer contact email */
.footer-contact { margin: 0 0 .4rem; }

/* <picture> wrappers shouldn't affect layout — let the inner <img> size as before */
.product-card-media picture,
.product-detail-media picture,
.store-hero picture { display: contents; }

/* Remove the theme's decorative accent bar before the store section headings */
.shop-section-title::before { content: none !important; }

/* Store intro text sits on the page background, separate from the products box */
.store-intro { max-width: 960px; margin: 0 auto 1.6rem; }
.store-intro p { margin: 0 0 1rem; }
.store-intro > :last-child { margin-bottom: 0; }

/* Tighter top spacing on product pages only */
.page-product #body-wrapper { padding-top: clamp(0.75rem, 2vw, 1.5rem); }
.page-product #body-wrapper > .container > .content-item { padding-top: clamp(1rem, 2.5vw, 1.5rem); }
.page-product .product-back { margin-bottom: 0.9rem; }
