/* Golden Records 1.2.4 — editorial page grids, primary actions and single-product carousels.
   Kept separate from existing rules to preserve WooCommerce and Gutenberg markup. */

/* Gutenberg groups must fill the editorial content width; enforce true grid layouts.
   Theme content is editable in Gutenberg, including nested group cards. */
body.gr-site .gr-editorial-content,
body.gr-site .gr-editorial-content > :is(.gr-about,.gr-contacts,.gr-delivery) {
    display:block;width:100%;max-width:none;min-width:0;box-sizing:border-box;
}
body.gr-site .gr-editorial :is(.gr-about,.gr-contacts,.gr-delivery) :is(.wp-block-group,.wp-block-columns,section,figure) {box-sizing:border-box;min-width:0;}
body.gr-site .gr-editorial :is(.gr-about,.gr-contacts,.gr-delivery) :is(p,li) {font-size:clamp(13.5px,1.12vw,15px);line-height:1.7;}
body.gr-site .gr-editorial :is(.gr-about,.gr-contacts,.gr-delivery) :is(h1,h2,h3,h4) {overflow-wrap:normal;word-break:normal;}

/* Explicit grid rules override editor presets and older narrow-column rules. */
body.gr-site .gr-editorial .gr-about :is(.founder-section,.manifesto-grid,.standards-3col,.service-2col,.priv-grid,.club-tg-grid),
body.gr-site .gr-editorial .gr-delivery :is(.pack-grid-4,.carriers-3col,.geo-grid-4,.pay-grid-4),
body.gr-site .gr-editorial .gr-contacts :is(.contacts-top-grid,.contacts-bottom-grid) {
    display:grid!important;width:100%!important;max-width:none!important;
    align-items:stretch!important;grid-auto-flow:row!important;gap:clamp(16px,2vw,26px)!important;
}
body.gr-site .gr-editorial .gr-about :is(.founder-section,.manifesto-grid,.standards-3col,.service-2col,.priv-grid,.club-tg-grid) > *,
body.gr-site .gr-editorial .gr-delivery :is(.pack-grid-4,.carriers-3col,.geo-grid-4,.pay-grid-4) > *,
body.gr-site .gr-editorial .gr-contacts :is(.contacts-top-grid,.contacts-bottom-grid) > * {
    grid-column:auto!important;grid-row:auto!important;min-width:0!important;
    width:100%!important;max-width:none!important;margin:0!important;
}
body.gr-site .gr-editorial .gr-about .founder-section {grid-template-columns:minmax(0,.83fr) minmax(0,1.17fr)!important;align-items:center!important;}
body.gr-site .gr-editorial .gr-about .manifesto-grid {grid-template-columns:minmax(0,1.2fr) minmax(0,.85fr)!important;}
body.gr-site .gr-editorial .gr-about .standards-3col {grid-template-columns:repeat(3,minmax(0,1fr))!important;}
body.gr-site .gr-editorial .gr-about .service-2col,
body.gr-site .gr-editorial .gr-about .club-tg-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
body.gr-site .gr-editorial .gr-about .priv-grid {grid-template-columns:repeat(4,minmax(0,1fr))!important;}
body.gr-site .gr-editorial .gr-delivery .pack-grid-4,
body.gr-site .gr-editorial .gr-delivery .geo-grid-4,
body.gr-site .gr-editorial .gr-delivery .pay-grid-4 {grid-template-columns:repeat(4,minmax(0,1fr))!important;}
body.gr-site .gr-editorial .gr-delivery .carriers-3col {grid-template-columns:repeat(3,minmax(0,1fr))!important;}
body.gr-site .gr-editorial .gr-contacts :is(.contacts-top-grid,.contacts-bottom-grid) {grid-template-columns:minmax(0,1fr) minmax(0,1.12fr)!important;}

/* About: readable hero, balanced content, coherent card dimensions. */
body.gr-site .gr-editorial .gr-about .about-hero {
    background:linear-gradient(105deg,rgba(8,23,15,.96) 0%,rgba(8,23,15,.91) 54%,rgba(8,23,15,.67) 100%),
               url('https://images.unsplash.com/photo-1603048588665-791ca8aea617?q=80&w=1400&auto=format&fit=crop') center/cover;
    padding:clamp(26px,5vw,64px)!important;border:1px solid #a48852;
    margin-bottom:clamp(28px,4vw,50px);min-height:280px;display:flex;flex-direction:column;justify-content:center;
}
body.gr-site .gr-editorial .gr-about .about-hero h1 {color:#fffaf0!important;font-size:clamp(31px,4.4vw,53px)!important;line-height:1.08!important;max-width:22ch;}
body.gr-site .gr-editorial .gr-about .about-hero .eyebrow {color:#e1bc71!important;}
body.gr-site .gr-editorial .gr-about .about-hero .about-hero-sub {color:#efd8a1!important;font-size:clamp(20px,2.4vw,28px);}
body.gr-site .gr-editorial .gr-about .about-hero p {color:#e5e9e2!important;max-width:73ch;}
body.gr-site .gr-editorial .gr-about :is(.s-card,.manifesto-main,.credo-card,.srv-card-dark,.srv-card-light,.club-box,.tg-box,.treasury-box,.priv-item) {
    border-radius:3px;padding:clamp(20px,2.4vw,36px);box-shadow:0 8px 25px rgba(15,26,19,.045);
}
body.gr-site .gr-editorial .gr-about .founder-portrait-frame {align-self:stretch;min-height:300px;}
body.gr-site .gr-editorial .gr-about .founder-portrait-frame > img {width:100%;height:auto;display:block;}
body.gr-site .gr-editorial .gr-about .s-card {height:100%;display:flex;flex-direction:column;}
body.gr-site .gr-editorial .gr-about .s-card h3 {font-size:clamp(22px,2vw,27px);}
body.gr-site .gr-editorial .gr-about .sec-title-center h2 {font-size:clamp(28px,3.4vw,40px);}
body.gr-site .gr-editorial .gr-about .priv-grid .priv-item {line-height:1.65;}
body.gr-site .gr-editorial .gr-about .credo-card h3,
body.gr-site .gr-editorial .gr-about .srv-card-dark h3,
body.gr-site .gr-editorial .gr-about .tg-box h3 {color:#e1bc71!important;}

/* Delivery: legible headings and full-width, responsive information sections. */
body.gr-site .gr-editorial .gr-delivery .delivery-hero {
    display:grid!important;grid-template-columns:minmax(0,1fr) minmax(195px,290px)!important;
    gap:clamp(18px,4vw,48px)!important;align-items:center!important;
    padding:clamp(24px,4vw,52px)!important;border-radius:3px;
}
body.gr-site .gr-editorial .gr-delivery .delivery-hero > * {grid-column:auto!important;min-width:0!important;}
body.gr-site .gr-editorial .gr-delivery .delivery-hero h1 {font-size:clamp(32px,4.1vw,51px)!important;color:#fffaf0!important;}
body.gr-site .gr-editorial .gr-delivery .delivery-hero .eyebrow {color:#dfbd78!important;}
body.gr-site .gr-editorial .gr-delivery .delivery-hero p {color:#e2eae3!important;max-width:70ch;}
body.gr-site .gr-editorial .gr-delivery .dispatch-badge {padding:22px 18px;border-radius:3px;}
body.gr-site .gr-editorial .gr-delivery .dispatch-badge b {color:#dfbd78!important;}
body.gr-site .gr-editorial .gr-delivery .sec-head {margin:clamp(25px,3.7vw,46px) 0 18px;}
body.gr-site .gr-editorial .gr-delivery .sec-head h2 {font-size:clamp(27px,2.8vw,37px);}
body.gr-site .gr-editorial .gr-delivery :is(.pack-card,.carrier-card,.pay-card) {
    border-radius:3px;padding:clamp(19px,2vw,28px)!important;display:flex;flex-direction:column;gap:6px;
    box-shadow:0 7px 24px rgba(11,25,16,.045);height:100%;
}
body.gr-site .gr-editorial .gr-delivery :is(.pack-card,.carrier-card,.pay-card) p {margin:0 0 7px;color:#45443f;font-size:14px;}
body.gr-site .gr-editorial .gr-delivery .carrier-card .carrier-meta {margin-top:auto;}
body.gr-site .gr-editorial .gr-delivery .geo-box {padding:clamp(23px,3.4vw,42px);border-radius:3px;}
body.gr-site .gr-editorial .gr-delivery .geo-box :is(h2,h3,h4) {color:#fffaf0!important;}
body.gr-site .gr-editorial .gr-delivery .geo-box .geo-days {color:#dfbd78!important;}
body.gr-site .gr-editorial .gr-delivery .geo-box li {color:#dce5df;}
body.gr-site .gr-editorial .gr-delivery .fiscal-guarantee {border-radius:3px;}

/* Contacts: two aligned rows (information + map; payment details + form). */
body.gr-site .gr-editorial .gr-contacts .salon-info-card,
body.gr-site .gr-editorial .gr-contacts .requisites-card,
body.gr-site .gr-editorial .gr-contacts .contact-form-card {padding:clamp(22px,3vw,40px)!important;border-radius:3px;min-height:0;}
body.gr-site .gr-editorial .gr-contacts .salon-info-card h1 {color:#fffaf0!important;font-size:clamp(29px,3vw,42px)!important;max-width:24ch;}
body.gr-site .gr-editorial .gr-contacts .salon-info-card .eyebrow {color:#dfbd78!important;}
body.gr-site .gr-editorial .gr-contacts .salon-info-card :is(a,p) {color:#f1f4ef;}
body.gr-site .gr-editorial .gr-contacts .salon-info-card .c-label {color:#dfbd78;}
body.gr-site .gr-editorial .gr-contacts .map-frame-box.gr-map-link,
body.gr-site .gr-editorial .gr-contacts .gr-contact-map {
    display:grid!important;place-items:center!important;min-height:345px;height:100%;
    background:radial-gradient(circle at 25% 30%,#2b4c36 0%,#102117 76%)!important;
    color:#faf8ef!important;text-align:center;padding:clamp(20px,3vw,40px);
    border:1px solid #b89655;border-radius:3px;
}
body.gr-site .gr-editorial .gr-contacts .map-frame-box.gr-map-link p {color:#f9f5e9!important;font-size:15px!important;}
body.gr-site .gr-editorial .gr-contacts .map-frame-box.gr-map-link .gr-eyebrow {color:#dfbd78!important;}
body.gr-site .gr-editorial .gr-contacts .map-frame-box.gr-map-link .gr-button {display:inline-flex;align-items:center;justify-content:center;margin-top:16px;}
body.gr-site .gr-editorial .gr-contacts .req-table,
body.gr-site .gr-editorial .gr-contacts figure.wp-block-table {display:block;width:100%;max-width:100%;overflow-x:auto;margin:0 0 18px!important;}
body.gr-site .gr-editorial .gr-contacts figure.wp-block-table table {width:100%;border-collapse:collapse;table-layout:auto;}
body.gr-site .gr-editorial .gr-contacts .req-table td {font-size:12.5px;overflow-wrap:anywhere;}
body.gr-site .gr-editorial .gr-contacts .contact-form-card h2,
body.gr-site .gr-editorial .gr-contacts .requisites-card h2 {font-size:clamp(27px,2.8vw,36px);}
body.gr-site .gr-editorial .gr-contacts .gr-contact-form-fields {grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
body.gr-site .gr-editorial .gr-contacts .gr-contact-form :is(input:not([type="checkbox"]),textarea) {min-height:44px;padding:10px 12px;font-size:14px;}

/* All add-to-cart actions: near-black by default, gold ONLY on hover/focus.
   An added item does not permanently change the button color. */
body.gr-site :is(.gr-card-footer,.gr-purchase-actions,.gr-wishlist-card,.gr-carousel-viewport) :is(.add_to_cart_button,.single_add_to_cart_button),
body.gr-site ul.products li.gr-lp-card .gr-card-footer :is(.gr-loop-purchase,.gr-cart-added) :is(button,.button),
body.gr-site .gr-purchase-actions button.single_add_to_cart_button,
body.gr-site .gr-purchase-actions button.single_add_to_cart_button.added {
    background:#102117!important;border:1px solid #102117!important;
    color:#dfbd78!important;box-shadow:none!important;border-radius:2px!important;
    transition:background-color .2s ease,color .2s ease,border-color .2s ease;
}
body.gr-site :is(.gr-card-footer,.gr-purchase-actions,.gr-wishlist-card,.gr-carousel-viewport) :is(.add_to_cart_button,.single_add_to_cart_button):is(:hover,:focus-visible),
body.gr-site ul.products li.gr-lp-card .gr-card-footer :is(.gr-loop-purchase,.gr-cart-added) :is(button,.button):is(:hover,:focus-visible),
body.gr-site .gr-purchase-actions button.single_add_to_cart_button:is(:hover,:focus-visible) {
    background:#b89655!important;border-color:#b89655!important;color:#102117!important;
}
/* Buy in one click uses the inverted treatment. */
body.gr-site .gr-purchase-actions > button.gr-buy-direct {
    background:#b89655!important;border:1px solid #b89655!important;color:#102117!important;
    box-shadow:none!important;border-radius:2px!important;min-height:46px!important;
    font-weight:700!important;
}
body.gr-site .gr-purchase-actions > button.gr-buy-direct:is(:hover,:focus-visible) {
    background:#102117!important;border-color:#102117!important;color:#dfbd78!important;
}
body.gr-site .gr-purchase-actions > :is(.single_add_to_cart_button,.gr-buy-direct) {min-height:46px!important;}
body.gr-site :is(.gr-purchase-actions,.gr-card-footer) :is(button,.button):focus-visible {outline:2px solid #b89655;outline-offset:2px;}

/* Related + same-artist products: no bottom scrollbars, at most eight products,
   explicit previous/next controls and responsive number of visible cards. */
body.gr-site .gr-pdp-details .gr-related-carousel {
    --gr-carousel-visible:4;--gr-carousel-gap:18px;
    margin:clamp(26px,3vw,42px) 0 0!important;
    padding:clamp(18px,2.4vw,30px)!important;
    background:#fffdf9;border:1px solid #ded8ca;border-top:2px solid #b89655;
    min-width:0;overflow:hidden;
}
body.gr-site .gr-pdp-details .gr-carousel-heading {
    display:flex;align-items:center;justify-content:space-between;gap:18px;
    margin-bottom:18px;padding-bottom:12px;border-bottom:1px solid #ded8ca;
}
body.gr-site .gr-pdp-details .gr-carousel-heading h2 {margin:0!important;font:600 clamp(25px,2.7vw,36px)/1.15 'Cormorant Garamond',serif!important;color:#102117;}
body.gr-site .gr-pdp-details .gr-carousel-controls {display:flex;align-items:center;gap:8px;flex-shrink:0;}
body.gr-site .gr-pdp-details .gr-carousel-controls[hidden] {display:none!important;}
body.gr-site .gr-pdp-details .gr-carousel-controls button {
    width:39px;height:39px;display:inline-flex;align-items:center;justify-content:center;
    background:#fff;border:1px solid #b89655;color:#102117;padding:0;border-radius:2px;
    cursor:pointer;transition:background-color .2s ease,color .2s ease;
}
body.gr-site .gr-pdp-details .gr-carousel-controls button:hover:not(:disabled) {background:#102117;color:#dfbd78;}
body.gr-site .gr-pdp-details .gr-carousel-controls button:disabled {opacity:.35;cursor:default;}
body.gr-site .gr-pdp-details .gr-carousel-viewport {width:100%;overflow:hidden!important;scrollbar-width:none;min-width:0;}
body.gr-site .gr-pdp-details .gr-carousel-viewport::-webkit-scrollbar {display:none!important;}
body.gr-site .gr-pdp-details .gr-carousel-viewport ul.products {
    width:100%!important;display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
    align-items:stretch!important;gap:var(--gr-carousel-gap)!important;
    margin:0!important;padding:0!important;overflow:visible!important;
    transition:transform .35s ease;will-change:transform;
}
body.gr-site .gr-pdp-details .gr-carousel-viewport ul.products::before,
body.gr-site .gr-pdp-details .gr-carousel-viewport ul.products::after {display:none!important;}
body.gr-site .gr-pdp-details .gr-carousel-viewport ul.products > li.product {
    float:none!important;clear:none!important;display:flex!important;flex-direction:column;
    flex:0 0 calc((100% - 3 * var(--gr-carousel-gap))/4)!important;
    width:calc((100% - 3 * var(--gr-carousel-gap))/4)!important;
    max-width:none!important;min-width:0!important;
    margin:0!important;height:auto!important;
}
body.gr-site .gr-pdp-details .gr-carousel-viewport li.gr-lp-card .gr-lp-image {width:100%;}
body.gr-site .gr-pdp-details .gr-carousel-viewport li.gr-lp-card .gr-card-footer {margin-top:auto;}
@media (prefers-reduced-motion:reduce) {
    body.gr-site .gr-pdp-details .gr-carousel-viewport ul.products {transition:none!important;}
}

@media (max-width:1080px) {
    body.gr-site .gr-editorial .gr-about :is(.standards-3col,.priv-grid),
    body.gr-site .gr-editorial .gr-delivery :is(.pack-grid-4,.carriers-3col,.geo-grid-4,.pay-grid-4) {
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
    body.gr-site .gr-editorial .gr-about .founder-section {grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)!important;}
    body.gr-site .gr-pdp-details .gr-related-carousel {--gr-carousel-visible:3;}
    body.gr-site .gr-pdp-details .gr-carousel-viewport ul.products > li.product {
        flex-basis:calc((100% - 2 * var(--gr-carousel-gap))/3)!important;
        width:calc((100% - 2 * var(--gr-carousel-gap))/3)!important;
    }
}
@media (max-width:760px) {
    body.gr-site .gr-editorial .gr-about :is(.founder-section,.manifesto-grid,.service-2col,.club-tg-grid),
    body.gr-site .gr-editorial .gr-contacts :is(.contacts-top-grid,.contacts-bottom-grid) {
        grid-template-columns:minmax(0,1fr)!important;
    }
    body.gr-site .gr-editorial .gr-delivery .delivery-hero {grid-template-columns:minmax(0,1fr)!important;gap:20px!important;}
    body.gr-site .gr-editorial .gr-delivery .dispatch-badge {justify-self:stretch;width:100%;}
    body.gr-site .gr-editorial .gr-about .about-hero {min-height:auto;}
    body.gr-site .gr-editorial .gr-contacts .map-frame-box.gr-map-link {min-height:265px;}
    body.gr-site .gr-editorial .gr-delivery .geo-box {padding:24px 18px!important;}
    body.gr-site .gr-pdp-details .gr-related-carousel {--gr-carousel-visible:2;--gr-carousel-gap:12px;padding:14px!important;}
    body.gr-site .gr-pdp-details .gr-carousel-viewport ul.products > li.product {
        flex-basis:calc((100% - var(--gr-carousel-gap))/2)!important;
        width:calc((100% - var(--gr-carousel-gap))/2)!important;
    }
}
@media (max-width:520px) {
    body.gr-site .gr-editorial .gr-about :is(.standards-3col,.priv-grid),
    body.gr-site .gr-editorial .gr-delivery :is(.pack-grid-4,.carriers-3col,.geo-grid-4,.pay-grid-4) {
        grid-template-columns:minmax(0,1fr)!important;
    }
    body.gr-site .gr-editorial .gr-about :is(.s-card,.manifesto-main,.credo-card,.srv-card-dark,.srv-card-light,.club-box,.tg-box,.treasury-box) {padding:20px!important;}
    body.gr-site .gr-editorial .gr-about .closing-quote p {font-size:clamp(23px,6vw,30px);}
    body.gr-site .gr-editorial .gr-contacts .gr-contact-form-fields {grid-template-columns:minmax(0,1fr);}
    body.gr-site .gr-editorial .gr-contacts .req-table td:first-child {width:105px;}
    body.gr-site .gr-pdp-details .gr-carousel-heading {gap:6px;}
    body.gr-site .gr-pdp-details .gr-carousel-heading h2 {font-size:24px!important;}
    body.gr-site .gr-pdp-details .gr-carousel-controls {gap:5px;}
    body.gr-site .gr-pdp-details .gr-carousel-controls button {width:33px;height:33px;}
    body.gr-site .gr-pdp-details .gr-carousel-viewport .gr-card-footer {gap:8px;}
    body.gr-site .gr-pdp-details .gr-carousel-viewport ul.products > li.product {font-size:12px;}
}

@media(max-width:520px) {
    body.gr-site .gr-editorial .gr-contacts .req-table table {table-layout:fixed!important;width:100%!important;}
    body.gr-site .gr-editorial .gr-contacts .req-table td:first-child {width:33%!important;}
    body.gr-site .gr-editorial .gr-contacts .req-table td:last-child {width:67%!important;overflow-wrap:anywhere;word-break:break-word;}
}
