.store-detail-image { width:100%; max-height:480px; object-fit:contain; object-position:center; display:block; background:#f8f9fa; }
.product-detail { --product-border:#e3e8ef; --product-muted:#667085; }
.product-detail-layout { display:grid; grid-template-columns:minmax(0, 1.35fr) minmax(320px, 1fr); gap:2rem; align-items:start; }
.product-detail-media, .product-summary { min-width:0; border:1px solid var(--product-border); border-radius:16px; background:#fff; box-shadow:0 10px 30px rgba(16,24,40,.06); overflow:hidden; }
.product-summary { padding:clamp(1.25rem, 3vw, 2rem); }
.product-summary-category { display:inline-flex; align-items:center; padding:.35rem .7rem; border:1px solid #e0e7ff; border-radius:999px; color:#084298; background:#e7f1ff; font-size:.78rem; font-weight:600; }
.product-summary-manufacturer { display:inline-flex; align-items:center; margin-left:.5rem; color:#475467; font-size:.85rem; font-weight:600; }
.product-summary-manufacturer img { max-height:28px; max-width:120px; object-fit:contain; vertical-align:middle; }
.product-specifications-group-title { margin:1rem 0 .4rem; color:#344054; font-size:.95rem; font-weight:700; }
.product-specifications-group-title:first-child { margin-top:0; }
.product-faq-list { display:flex; flex-direction:column; gap:1rem; }
.product-faq-question { margin:0 0 .3rem; color:#101828; font-weight:700; }
.product-faq-answer { margin:0; color:#475467; line-height:1.6; }
.product-video-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:1.25rem; }
.product-video-card { display:flex; flex-direction:column; }
.product-video-facade { position:relative; display:block; width:100%; padding:0; border:0; border-radius:10px; overflow:hidden; background:#0b0d10; cursor:pointer; aspect-ratio:16/9; }
.product-video-facade:focus-visible { outline:2px solid #6366f1; outline-offset:2px; }
.product-video-thumb { width:100%; height:100%; object-fit:cover; display:block; }
.product-video-thumb-empty { display:block; width:100%; height:100%; background:linear-gradient(135deg,#1c1f25,#2b2f36); }
.product-video-play-icon { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; transition:transform .15s ease; }
.product-video-facade:hover .product-video-play-icon, .product-video-facade:focus-visible .product-video-play-icon { transform:scale(1.08); }
.product-video-embed { display:block; width:100%; aspect-ratio:16/9; border:0; border-radius:10px; overflow:hidden; background:#0b0d10; }
.product-video-meta { padding-top:.6rem; }
.product-video-title { margin:0 0 .25rem; font-size:.95rem; font-weight:700; color:#101828; }
.product-video-desc { margin:0; font-size:.85rem; color:#475467; line-height:1.5; }
.product-summary-title { margin:.9rem 0 .4rem; color:#101828; font-size:clamp(1.75rem, 3vw, 2.5rem); line-height:1.15; }
.product-meta-line { display:flex; flex-wrap:wrap; gap:.25rem 1rem; margin:0 0 .75rem; color:var(--product-muted); font-size:.85rem; }
.product-meta-line strong { color:#1d2939; font-weight:600; }
.product-summary-lead { margin:0 0 1.25rem; color:var(--product-muted); font-size:1rem; line-height:1.65; }
/* martines' own short_description HTML embeds brewing-method icons as bare
   <img> tags with no size attribute (unlike the full description's own
   inline-styled Профил/Регион images) -- quick sizing pass so they show as
   small icons instead of at their native (large) pixel size; full visual
   pass comes later. */
.product-summary-lead img { max-width:56px; width:100%; height:auto; display:block; margin:0 auto; }
.product-summary-lead table { border-collapse:collapse; margin:.5rem 0; }
.product-summary-lead table td { text-align:center; vertical-align:middle; padding:.35rem; }
.product-tag-list { display:flex; flex-wrap:wrap; gap:.4rem; list-style:none; margin:0 0 .75rem; padding:0; }
.product-tag-list a { display:inline-flex; padding:.2rem .6rem; border-radius:999px; background:#f2f4f7; color:#344054; font-size:.78rem; text-decoration:none; }
.product-tag-list a:hover { background:#e4e7ec; }
.product-entity-line { margin:0 0 .75rem; color:var(--product-muted); font-size:.82rem; }
.product-price { display:flex; align-items:flex-start; flex-direction:column; gap:.2rem; margin-bottom:1rem; color:#6366f1; font-size:clamp(1.8rem, 3vw, 2.35rem); font-weight:700; line-height:1.15; }
.product-price-secondary { color:var(--product-muted); font-size:1rem; font-weight:600; }
.product-price-was { color:var(--product-muted); font-size:1.15rem; font-weight:600; text-decoration:line-through; }
.product-price-savings { color:#146c43; font-size:.95rem; font-weight:600; }
.product-badges { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin-bottom:.25rem; }
.product-availability { display:inline-flex; align-items:center; gap:.45rem; padding:.4rem .7rem; border-radius:999px; font-size:.82rem; font-weight:600; }
.product-availability::before { width:.5rem; height:.5rem; border-radius:50%; background:currentColor; content:""; }
.product-availability.is-available { color:#146c43; background:#d1e7dd; }
.product-availability.is-unavailable { color:#842029; background:#f8d7da; }
/* Only ever rendered for a real course product (2026-08-30 audit) -- a
   physical product (the store's standard, ~97% of the catalog) never
   shows a type badge/label at all anywhere customer-facing. */
.product-type-badge { display:inline-flex; align-items:center; padding:.4rem .7rem; border-radius:999px; font-size:.82rem; font-weight:600; }
.product-type-badge.is-course { color:#3730a3; background:#e0e7ff; }
.product-promo-badge { display:inline-flex; align-items:center; padding:.4rem .7rem; border-radius:999px; color:#fff; background:#dc3545; font-size:.82rem; font-weight:700; }
.product-gallery-promo-badge { position:absolute; top:.75rem; left:.75rem; z-index:2; padding:.35rem .65rem; border-radius:999px; color:#fff; background:#dc3545; font-size:.85rem; font-weight:700; box-shadow:0 2px 8px rgba(0,0,0,.18); }
/* No active promotion (server-rendered [hidden], or JS clears the text on
   variant switch): fully collapse, never a residual empty red pill. A bare
   class selector for `display` always beats the UA default [hidden]{display:none}
   rule (author origin wins ties), so [hidden] must be restated here at
   matching-or-higher specificity. :empty is a second safety net for the
   moment between clearing textContent and the hidden attribute landing. */
.product-promo-badge[hidden],
.product-promo-badge:empty { display:none; padding:0; margin:0; min-width:0; background:none; }
.product-gallery-promo-badge[hidden],
.product-gallery-promo-badge:empty { display:none; padding:0; margin:0; min-width:0; background:none; box-shadow:none; }
.product-purchase-note { margin:.75rem 0 0; color:var(--product-muted); font-size:.82rem; }
.product-purchase-note-highlight { padding:.6rem .85rem; border-radius:10px; color:#664d03; background:#fff8e1; font-weight:600; }
.product-purchase { margin-top:1.25rem; }
.product-purchase-row { display:flex; align-items:end; gap:.75rem; }
/* Server-rendered [hidden] only when the configuration itself is
   incomplete/invalid (includes/store_availability.php's configuration_valid) --
   whether the SAME button inside then reads "Add to cart" or "Notify me
   when available" is a text/data-attribute swap, not a hide/show of a
   second control (2026-08-30 UX revision). The bare class selector's
   `display:flex` above always beats the UA default [hidden]{display:none}
   rule (author origin wins ties, same documented pitfall as
   .product-promo-badge above), so [hidden] must be restated here at
   matching specificity -- confirmed live during this feature's own
   browser verification (an earlier version of this row stayed visibly
   clickable without this rule). */
.product-purchase-row[hidden] { display:none; }
.product-quantity { flex:0 0 88px; }
.product-quantity .form-control { min-height:48px; text-align:center; }
.product-add-button { min-height:48px; flex:1 1 auto; font-weight:700; box-shadow:0 5px 14px rgba(99, 102, 241,.2); }
.product-add-button:hover { transform:translateY(-1px); box-shadow:0 7px 18px rgba(99, 102, 241,.28); }
.product-add-button:focus-visible, .product-quantity .form-control:focus-visible { outline:3px solid rgba(99, 102, 241,.28); outline-offset:2px; }
.product-service-summary { list-style:none; margin:1.1rem 0 0; padding:.85rem 1rem 0; border-top:1px solid var(--product-border); display:flex; flex-direction:column; gap:.4rem; color:var(--product-muted); font-size:.85rem; }
.product-service-summary li { padding-left:1.4rem; position:relative; }
.product-service-summary li::before { content:"✓"; position:absolute; left:0; color:#146c43; font-weight:700; }

/* "Notify me when available" modal (2026-08-30 UX revision -- replaces
   the earlier always-visible inline section: a native <dialog>, opened
   only on click via assets/js/store-notify-modal.js, showModal()'d so it
   gets the browser's own centered-overlay positioning, focus trap, ESC-
   to-close and ::backdrop for free. Closed by default (no [open]
   attribute server-side); JS decides when to open it, so there is no
   [hidden]-vs-class-specificity fight to guard against here the way
   .product-purchase-row has (an un-opened <dialog> is display:none by
   built-in UA stylesheet with no author rule fighting it). */
.notify-modal { position:relative; width:min(420px, calc(100vw - 2rem)); margin:auto; padding:1.5rem; border:none; border-radius:16px; box-shadow:0 20px 48px rgba(16,24,40,.18); }
.notify-modal::backdrop { background:rgba(16,24,40,.55); }
.notify-modal-close { position:absolute; top:.75rem; right:.75rem; width:32px; height:32px; border:none; border-radius:999px; background:#f2f4f7; color:#475467; font-size:1.3rem; line-height:1; cursor:pointer; }
.notify-modal-close:hover { background:#e4e7ec; }
.notify-modal-title { margin:0 1.5rem .5rem 0; color:#1d2939; font-size:1.15rem; }
.notify-modal-intro { margin:0 0 1rem; color:var(--product-muted); font-size:.88rem; }
.notify-modal-email-note { margin:0 0 1rem; color:#344054; font-size:.9rem; }
.notify-modal-form .form-label { font-weight:600; color:#344054; }
.notify-modal-form .mb-2 + .mb-2 { margin-top:.75rem; }
.notify-modal-form .alert { margin:0 0 1rem; }
.product-notify-button { min-height:44px; margin-top:1rem; width:100%; font-weight:700; }

.product-image-placeholder { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.75rem; padding:4rem 1.5rem; color:#667085; background:#f8f9fa; }

.product-detail-accordion { margin-top:2rem; }
.product-detail-accordion .accordion-item { border:1px solid var(--product-border); border-radius:16px !important; overflow:hidden; box-shadow:0 8px 24px rgba(16,24,40,.04); }
.product-detail-accordion .accordion-item + .accordion-item { margin-top:1rem; }
.product-detail-accordion .accordion-button { font-weight:700; color:#1d2939; background:#fff; }
.product-detail-accordion .accordion-button:not(.collapsed) { color:#4338ca; background:#f7faff; box-shadow:inset 0 -1px 0 var(--product-border); }
.product-detail-accordion .accordion-button:focus { box-shadow:0 0 0 3px rgba(99, 102, 241,.18); }
.product-description { color:#344054; line-height:1.75; overflow-wrap:anywhere; }

/* YouTube lazy-embed facade (see storeLazyYoutubeEmbeds() in index.php and
   assets/js/store-youtube-facade.js). Same 16:9 box in both the facade and
   activated-iframe state, so clicking play never shifts layout. */
.store-yt-facade { position:relative; display:block; width:100%; max-width:100%; aspect-ratio:16/9; overflow:hidden; border-radius:12px; background:#000; cursor:pointer; margin:.75rem 0; }
.store-yt-facade-thumb { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.store-yt-facade-play { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.15); transition:background-color .15s ease; }
.store-yt-facade:hover .store-yt-facade-play, .store-yt-facade:focus-visible .store-yt-facade-play { background:rgba(0,0,0,.3); }
.store-yt-facade:focus-visible { outline:3px solid rgba(99, 102, 241,.5); outline-offset:2px; }
.store-yt-facade-frame { position:absolute; inset:0; width:100%; height:100%; border:0; }
.product-additional-list { display:grid; grid-template-columns:minmax(130px, .35fr) 1fr; margin:0; }
.product-additional-list dt, .product-additional-list dd { margin:0; padding:.65rem 0; border-bottom:1px solid #eef1f5; }
.product-additional-list dt { color:var(--product-muted); font-weight:500; }
.product-additional-list dd { color:#1d2939; font-weight:600; overflow-wrap:anywhere; }
.product-additional-list dt:last-of-type, .product-additional-list dd:last-of-type { border-bottom:0; }

.product-related { margin-top:2.5rem; }
.product-related h2 { margin:0 0 1rem; color:#1d2939; font-size:1.2rem; }

/* Plain CSS grid — this page never loads Bootstrap, so the old
   .row.row-cols-*.g-3 classes never actually applied any layout: cards
   were stacking as unconstrained full-width blocks. 1 / 2 / 3 / 4 columns
   at mobile / tablet / laptop / desktop, fixed gap, no overflow (grid
   tracks are 1fr, so the row can never exceed the container's width). */
.product-related-grid { display:grid; grid-template-columns:1fr; gap:1.25rem; }
@media (min-width:576px) { .product-related-grid { grid-template-columns:repeat(2, 1fr); } }
@media (min-width:992px) { .product-related-grid { grid-template-columns:repeat(3, 1fr); } }
@media (min-width:1400px) { .product-related-grid { grid-template-columns:repeat(4, 1fr); } }

.product-related-card { height:100%; display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--product-border,#e3e8ef); border-radius:14px; background:#fff; box-shadow:0 1px 2px rgba(16,24,40,.04); transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.product-related-card:hover { transform:translateY(-3px); border-color:#c9d8eb; box-shadow:0 12px 28px rgba(16,24,40,.09); }

/* Fixed-ratio image zone: never lets a large original dictate the card's
   size — the box is always 4/3 (capped at 230px tall) regardless of the
   source image's own dimensions, and object-fit:contain keeps the whole
   product visible without cropping. */
.product-related-image-link { display:block; aspect-ratio:4/3; max-height:230px; overflow:hidden; background:#fff; border-bottom:1px solid var(--product-border,#e3e8ef); }
.product-related-image { width:100%; height:100%; display:block; object-fit:contain; object-position:center; }
.product-related-image-placeholder { display:flex; align-items:center; justify-content:center; color:var(--product-muted,#667085); font-size:.82rem; }

.product-related-body { min-width:0; padding:1rem; display:flex; flex:1 1 auto; flex-direction:column; text-align:left; }
.product-related-name { margin:0 0 .6rem; display:-webkit-box; overflow:hidden; font-size:.95rem; font-weight:600; line-height:1.35; min-height:2.7em; overflow-wrap:anywhere; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.product-related-name a { color:#1d2939; text-decoration:none; }
.product-related-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:nowrap; gap:.6rem; margin-top:auto; }
.product-related-price { display:flex; min-width:0; flex-direction:column; color:#6366f1; font-size:1rem; font-weight:700; line-height:1.3; }
.product-related-price-secondary { color:var(--product-muted,#667085); font-size:.82rem; font-weight:600; }
.product-related-cta { flex:0 0 auto; white-space:nowrap; font-weight:600; }
.product-related-card a:focus-visible { outline:3px solid rgba(99, 102, 241,.32); outline-offset:3px; }

@media (max-width:991.98px) { .product-detail-layout { grid-template-columns:1fr; gap:1.25rem; } }
@media (max-width:575.98px) {
  .product-summary { padding:1.15rem; }
  .product-purchase-row { align-items:stretch; flex-direction:column; }
  .product-quantity { width:100%; flex-basis:auto; }
  .product-quantity .form-control { text-align:left; }
  .product-add-button { width:100%; }
  .product-additional-list { grid-template-columns:1fr; }
  .product-additional-list dt { padding-bottom:.1rem; border-bottom:0; }
  .product-additional-list dd { padding-top:.1rem; }
}

/* ===== Merged from store-gallery.css =====
   store-product.css and store-gallery.css are always <link>-ed together on
   every product-detail page (see index.php) — never one without the other —
   so this is a pure request-count reduction, not a duplication risk. No
   selector names overlap with anything above. */
.product-gallery-main { min-height:320px; position:relative; display:flex; align-items:center; justify-content:center; overflow:hidden; background:#f8f9fa; border-radius:calc(.375rem - 1px) calc(.375rem - 1px) 0 0; }
.product-gallery-open { width:100%; padding:0; border:0; display:flex; align-items:center; justify-content:center; background:transparent; cursor:zoom-in; }
.product-gallery-open picture { width:100%; display:block; }
.product-gallery-main .store-detail-image { height:480px; }
.product-gallery-arrow { width:44px; height:44px; position:absolute; top:50%; z-index:2; display:flex; align-items:center; justify-content:center; transform:translateY(-50%); border:0; border-radius:50%; color:#212529; background:rgba(255,255,255,.9); box-shadow:0 2px 12px rgba(16,24,40,.18); font-size:1.7rem; line-height:1; transition:background-color .15s ease, transform .15s ease; }
.product-gallery-arrow:hover { background:#fff; transform:translateY(-50%) scale(1.06); }
.product-gallery-arrow-prev { left:1rem; }
.product-gallery-arrow-next { right:1rem; }
.product-gallery-thumbnails { display:flex; gap:.75rem; overflow-x:auto; padding:1rem; border-top:1px solid #e7ebf0; scrollbar-width:thin; }
.product-gallery-thumbnail { width:88px; height:88px; flex:0 0 88px; padding:5px; display:flex; align-items:center; justify-content:center; background:#fff; border:2px solid #dee2e6; border-radius:10px; transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.product-gallery-thumbnail:hover { border-color:#6c757d; box-shadow:0 4px 12px rgba(16,24,40,.12); transform:translateY(-2px); }
.product-gallery-thumbnail.is-active { border-color:#6366f1; box-shadow:0 0 0 3px rgba(99, 102, 241,.18); }
.product-gallery-open:focus-visible, .product-gallery-arrow:focus-visible, .product-gallery-thumbnail:focus-visible, .product-lightbox-control:focus-visible { outline:3px solid #86b7fe; outline-offset:3px; }
.product-gallery-thumbnail img { width:100%; height:100%; object-fit:contain; object-position:center; display:block; }
.product-gallery-thumbnail picture { width:100%; height:100%; display:block; }
.product-lightbox[hidden] { display:none; }
.product-lightbox { position:fixed; inset:0; z-index:1080; padding:1.5rem; display:flex; align-items:center; justify-content:center; color:#fff; background:rgba(0,0,0,.92); }
.product-lightbox-stage { width:100%; height:100%; position:relative; display:flex; align-items:center; justify-content:center; overflow:hidden; }
.product-lightbox-stage > picture { display:flex; align-items:center; justify-content:center; }
.product-lightbox-image { max-width:calc(100vw - 8rem); max-height:calc(100vh - 6rem); width:auto; height:auto; object-fit:contain; cursor:zoom-in; transform:scale(1); transform-origin:center; transition:transform .2s ease; user-select:none; -webkit-user-drag:none; }
.product-lightbox-image.is-zoomed { transform:scale(2); cursor:zoom-out; }
.product-lightbox-control { width:48px; height:48px; position:absolute; z-index:2; display:flex; align-items:center; justify-content:center; border:0; border-radius:50%; color:#fff; background:rgba(255,255,255,.14); font-size:2rem; line-height:1; transition:background-color .15s ease; }
.product-lightbox-control:hover { background:rgba(255,255,255,.26); }
.product-lightbox-close { top:0; right:0; }
.product-lightbox-prev { left:0; top:50%; transform:translateY(-50%); }
.product-lightbox-next { right:0; top:50%; transform:translateY(-50%); }
.product-lightbox-counter { position:absolute; left:50%; bottom:0; z-index:2; transform:translateX(-50%); padding:.35rem .75rem; border-radius:999px; background:rgba(0,0,0,.55); font-variant-numeric:tabular-nums; }
body.product-lightbox-open { overflow:hidden; }
@media (max-width:575.98px) {
  .product-gallery-main { min-height:240px; }
  .product-gallery-main .store-detail-image { height:320px; }
  .product-gallery-arrow { width:40px; height:40px; }
  .product-gallery-arrow-prev { left:.5rem; }
  .product-gallery-arrow-next { right:.5rem; }
  .product-gallery-thumbnail { width:80px; height:80px; flex-basis:80px; }
  .product-lightbox { padding:.75rem; }
  .product-lightbox-image { max-width:calc(100vw - 1.5rem); max-height:calc(100vh - 5rem); }
  .product-lightbox-control { width:42px; height:42px; }
}
