/* =========================================================================
   Product detail page - coastal-premium dressing
   Coexists with Swiper (.gallery-top, .gallery-thumbs) and bootstrap-select
   (variant pickers). Class names that JS reaches for stay intact.
   ========================================================================= */

.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-7);
    margin-top: var(--s-5);
}
.product-layout > .product-media,
.product-layout > .product-info { min-width: 0; }
@media (min-width: 992px) {
    .product-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s-9); }
}

.product-media {
    position: sticky;
    top: 96px;
    align-self: start;
}
.product-media .gallery-top {
    width: 100%;
    height: 520px;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--c-cream);
    border: 1px solid var(--c-line-cool);
}
.product-media .gallery-thumbs {
    width: 100%;
    height: 96px;
    margin-top: var(--s-3);
}
.product-media .gallery-thumbs .swiper-slide {
    width: 96px !important;
    height: 96px;
    border-radius: var(--r-sm);
    overflow: hidden;
    background-color: var(--c-cream);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid var(--c-line-cool);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.product-media .gallery-thumbs .swiper-slide:hover { opacity: 0.8; }
.product-media .gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--c-brass);
}
.product-media .swiper-slide.product-large-image {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: zoom-in;
}

.swiper-button-prev, .swiper-button-next,
.swiper-button-prev-thmb, .swiper-button-next-thmb {
    width: 40px !important; height: 40px !important;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.85) !important;
    box-shadow: var(--c-shadow-1);
    color: var(--c-ink) !important;
    margin-top: -20px !important;
}
.swiper-button-prev::after, .swiper-button-next::after,
.swiper-button-prev-thmb::after, .swiper-button-next-thmb::after {
    font-size: 14px !important;
    font-weight: 700;
}

@media (max-width: 991px) {
    .product-media { position: static; }
    .product-media .gallery-top { height: clamp(280px, 60vw, 460px); }
}


/* Right column */
.product-info { display: flex; flex-direction: column; gap: var(--s-5); }
.product-info__name {
    font-family: var(--f-display);
    font-size: clamp(1.75rem, 2vw + 0.5rem, var(--fs-4xl));
    font-weight: 600;
    line-height: var(--lh-tight);
    margin: 0;
    color: var(--c-ink);
}
.product-info__variant-info {
    font-style: italic;
    color: var(--c-muted);
    font-size: var(--fs-md);
    margin: 0;
}
.product-info__short {
    color: var(--c-muted);
    line-height: var(--lh-base);
    margin: 0;
}

.product-price-card {
    background: var(--c-paper);
    border: 1px solid var(--c-line-cool);
    border-radius: var(--r-md);
    padding: var(--s-5);
    box-shadow: var(--c-shadow-1);
}
.product-price-card .before-price {
    display: block;
    color: var(--c-muted);
    text-decoration: line-through;
    font-size: var(--fs-sm);
    margin-bottom: 2px;
}
.product-price-card .now-price {
    display: block;
    font-family: var(--f-display);
    font-size: var(--fs-4xl);
    font-weight: 600;
    color: var(--c-ink);
    line-height: 1;
    margin-bottom: var(--s-4);
}
.product-price-card .add-to-cart-button { margin-top: var(--s-3); }
.product-price-card .add-to-cart-button .btn {
    width: 100%;
    height: 56px;
    background: var(--c-brass) !important;
    border: 0 !important;
    color: #fff !important;
    border-radius: var(--r-sm) !important;
    font-family: var(--f-body) !important;
    font-size: var(--fs-md) !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: background var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out) !important;
}
.product-price-card .add-to-cart-button .btn:hover {
    background: var(--c-brass-hover) !important;
    transform: translateY(-1px);
}
.product-price-card .add-to-cart-button .btn-success {
    background: var(--c-brass) !important;
}
.product-price-card .add-to-cart-button .request_product_price {
    background: var(--c-navy) !important;
}

.product-price-card .inventory-status {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-size: var(--fs-sm);
    color: var(--c-forest);
    margin-top: var(--s-3);
}
.product-price-card .inventory-status.is-icon-not { color: var(--c-muted); }
.product-price-card .inventory-status .mdi { color: currentColor; }

.product-price-card .hotlinks {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-top: var(--s-5);
    padding-top: var(--s-4);
    border-top: 1px solid var(--c-line-cool);
}
.product-price-card .hotlinks a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--c-cream);
    border: 1px solid var(--c-bone);
    border-radius: var(--r-pill);
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--c-ink);
    text-decoration: none;
    transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.product-price-card .hotlinks a::before {
    content: "#";
    color: var(--c-brass);
    font-weight: 700;
}
.product-price-card .hotlinks a:hover { background: var(--c-brass-soft); color: var(--c-ink); }

.product-warning {
    background: var(--c-coral-soft);
    border: 1px solid var(--c-coral);
    border-radius: var(--r-md);
    padding: var(--s-4) var(--s-5);
}
.product-warning__title {
    color: var(--c-coral);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--ls-caps);
    font-size: var(--fs-xs);
    margin: 0 0 var(--s-2);
}
.product-warning span { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-2); }

.product-attributes {
    background: var(--c-cream);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: var(--s-4);
}
.product-attributes h3 {
    font-family: var(--f-body);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--ls-caps);
    color: var(--c-muted);
    margin: 0 0 var(--s-3);
}
.product-attributes table.attributes { width: 100%; border-collapse: collapse; }
.product-attributes table.attributes td {
    padding: var(--s-3);
    border-bottom: 1px solid var(--c-line);
    font-size: var(--fs-sm);
    vertical-align: middle;
    color: var(--c-ink);
}
.product-attributes table.attributes td:first-child {
    font-weight: 600;
    color: var(--c-muted);
    width: 40%;
}
.product-attributes table.attributes tr:last-child td { border-bottom: 0; }
.product-attributes ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.product-attributes li {
    list-style: none;
    padding: 4px 10px;
    border-radius: var(--r-xs);
    background: var(--c-paper);
    border: 1px solid var(--c-line);
    font-size: var(--fs-sm);
}

.product-variants {
    background: var(--c-cream);
    border: 1px solid var(--c-line);
    border-radius: var(--r-md);
    padding: var(--s-4);
    display: flex;
    flex-direction: column;
    gap: var(--s-4);
}
.product-variants .form-group label {
    display: block;
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--ls-caps);
    color: var(--c-muted);
    margin-bottom: var(--s-2);
}
.product-variants .form-group small { color: var(--c-muted); font-size: 11px; display: block; margin-bottom: var(--s-2); }

/* bootstrap-select dressing for variant pickers */
.product-variants .bootstrap-select { width: 100% !important; min-width: 0 !important; }
.product-variants .bootstrap-select > .dropdown-toggle {
    background: var(--c-paper) !important;
    border: 1px solid var(--c-line-cool) !important;
    border-radius: var(--r-xs) !important;
    color: var(--c-ink) !important;
    height: 44px !important;
    padding: 0 var(--s-4) !important;
    box-shadow: none !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
}
.product-variants .bootstrap-select > .dropdown-toggle:hover,
.product-variants .bootstrap-select > .dropdown-toggle:focus {
    border-color: var(--c-brass) !important;
    box-shadow: 0 0 0 3px rgb(176 123 44 / 0.15) !important;
}
.product-variants .bootstrap-select .dropdown-menu {
    border: 1px solid var(--c-line-cool) !important;
    border-radius: var(--r-sm) !important;
    box-shadow: var(--c-shadow-2) !important;
    padding: var(--s-2) !important;
}
.product-variants .bootstrap-select .dropdown-item {
    padding: var(--s-2) var(--s-3) !important;
    border-radius: var(--r-xs) !important;
}
.product-variants .bootstrap-select .dropdown-item.active,
.product-variants .bootstrap-select .dropdown-item:hover { background: var(--c-cream) !important; color: var(--c-ink) !important; }

.product-block {
    background: var(--c-paper);
    border: 1px solid var(--c-line-cool);
    border-radius: var(--r-md);
    padding: var(--s-7);
    margin-top: var(--s-7);
}
.product-block h2 {
    font-family: var(--f-display);
    font-size: var(--fs-3xl);
    font-weight: 600;
    margin: 0 0 var(--s-5);
    padding-bottom: var(--s-3);
    border-bottom: 1px dashed var(--c-line);
}
.product-block .product-safe-description p { line-height: var(--lh-loose); color: var(--c-ink); }
.product-block iframe { width: 100%; aspect-ratio: 16/9; border-radius: var(--r-sm); margin-top: var(--s-4); }

/* image lightbox modal */
#image-pop.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgb(11 27 44 / 0.85);
    padding: var(--s-7);
}
#image-pop .close {
    position: absolute;
    top: var(--s-4); right: var(--s-5);
    color: #fff;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
}
#image-pop .close:hover { color: var(--c-brass-soft); }
#image-pop .modal-content {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent !important;
    box-shadow: none;
    border: 0;
}
#image-pop #caption {
    position: absolute;
    bottom: var(--s-5); left: 0; right: 0;
    text-align: center;
    color: #fff;
    font-size: var(--fs-sm);
}

/* -------- Variant picker -------- */
.product-variants { display: flex; flex-direction: column; gap: var(--s-4); }
.variant-picker { position: relative; width: 100%; }
.variant-picker__label {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-muted);
    margin-bottom: var(--s-1);
}
.variant-picker__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    width: 100%;
    background: var(--c-paper);
    border: 1px solid var(--c-line-cool);
    border-radius: var(--r-sm);
    padding: var(--s-3) var(--s-4);
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: var(--c-ink);
    transition: border-color var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out);
}
.variant-picker__trigger:hover { border-color: var(--c-brass); }
.variant-picker__trigger:focus-visible {
    outline: none;
    border-color: var(--c-brass);
    box-shadow: 0 0 0 3px var(--c-brass-soft);
}
.variant-picker.is-open .variant-picker__trigger {
    border-color: var(--c-brass);
    box-shadow: 0 0 0 3px var(--c-brass-soft);
}
.variant-picker__value { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.variant-picker__chevron {
    color: var(--c-muted);
    transition: transform var(--t-fast) var(--ease-out);
    flex-shrink: 0;
}
.variant-picker.is-open .variant-picker__chevron { transform: rotate(180deg); }

.variant-picker__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    background: var(--c-paper);
    border: 1px solid var(--c-line-cool);
    border-radius: var(--r-sm);
    box-shadow: var(--c-shadow-3);
    padding: var(--s-2);
    display: none;
}
.variant-picker.is-open .variant-picker__menu { display: block; }

.variant-picker__search {
    width: 100%;
    border: 1px solid var(--c-line-cool);
    border-radius: var(--r-xs);
    padding: var(--s-2) var(--s-3);
    margin-bottom: var(--s-2);
    font: inherit;
    background: var(--c-cream);
}
.variant-picker__search:focus { outline: none; border-color: var(--c-brass); background: var(--c-paper); }

.variant-picker__list { max-height: 320px; overflow-y: auto; }

.variant-picker__option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4);
    border-radius: var(--r-xs);
    color: var(--c-ink) !important;
    text-decoration: none !important;
    background: transparent;
    transition: background var(--t-fast) var(--ease-out);
}
.variant-picker__option + .variant-picker__option { margin-top: 2px; }
.variant-picker__option:hover { background: var(--c-cream); }
.variant-picker__option.is-selected { background: var(--c-brass-soft); }
.variant-picker__option.is-selected::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 2px;
    background: var(--c-brass);
}
.variant-picker__option.is-selected .variant-picker__option-name { color: var(--c-brass-hover); }

.variant-picker__option-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.variant-picker__option-name { font-weight: 600; }
.variant-picker__option-info {
    font-size: var(--fs-xs);
    color: var(--c-muted);
    white-space: pre-wrap;
}
.variant-picker__option-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-xs);
    white-space: nowrap;
    color: var(--c-muted);
    flex-shrink: 0;
}
.variant-picker__option-status .dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 999px;
    background: currentColor;
}
.variant-picker__option-status--in { color: var(--c-forest); }
.variant-picker__option-status--low { color: var(--c-amber); }
.variant-picker__option-status--out { color: var(--c-muted-soft); }
.variant-picker__option-status--remote { color: var(--c-sea); }

.variant-picker__empty {
    padding: var(--s-3);
    color: var(--c-muted);
    text-align: center;
    font-size: var(--fs-sm);
}
