/* Compact product page and a single photo/video gallery. */
.product-card-media {
    background: #fff;
}

.product-grid .product-card-media img,
.related .product-card-media img {
    width: 100%;
    height: 100%;
    padding: 0 !important;
    object-fit: cover;
    object-position: center;
    transform: translate(var(--card-image-x, 0), var(--card-image-y, 0)) scale(var(--card-image-scale, 1)) !important;
    transform-origin: center;
}

.product-grid .product-card:hover .product-card-media img,
.related .product-card:hover .product-card-media img {
    transform: translate(var(--card-image-x, 0), var(--card-image-y, 0)) scale(var(--card-image-scale, 1)) !important;
}

.single-product .product-page > .container,
.single-product .product-details-section > .container {
    width: min(calc(100% - 40px), 1100px);
}

.single-product .product-page {
    padding: 14px 0 32px;
}

.single-product .breadcrumbs {
    padding: 6px 0 18px;
}

.single-product .product-main {
    grid-template-columns: minmax(0, 470px) minmax(0, 1fr);
    gap: clamp(30px, 4vw, 54px);
    align-items: start;
}

.single-product .product-gallery-custom {
    position: relative;
    aspect-ratio: auto;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.product-gallery-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--light-line);
    background: var(--surface-soft);
}

.product-gallery-slide {
    width: 100%;
    height: 100%;
}

.product-gallery-slide[hidden] { display: none !important; }

.product-gallery-slide > img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 34px;
    object-fit: contain;
}

.product-gallery-video {
    background: #07151b;
}

.product-gallery-video .product-video-player,
.product-gallery-video .product-video-iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
    background: #07151b;
}

.product-gallery-video .product-video-external {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    padding: 24px;
    color: #fff;
    font-weight: 800;
    text-align: center;
}

.product-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}

.product-gallery-thumb {
    position: relative;
    width: 70px;
    min-width: 70px;
    height: 70px;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--light-line);
    background: #fff;
    cursor: pointer;
}

.product-gallery-thumb.active {
    border-color: var(--blue);
    box-shadow: inset 0 0 0 1px var(--blue);
}

.product-gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 7px;
    object-fit: contain;
}

.product-gallery-video-thumb::after {
    position: absolute;
    inset: 0;
    content: "";
    background: rgba(7,21,27,.52);
}

.product-gallery-video-thumb > span {
    position: absolute;
    z-index: 2;
    top: 22px;
    left: 27px;
    color: #fff;
    font-size: 17px;
}

.product-gallery-video-thumb > small {
    position: absolute;
    z-index: 2;
    right: 4px;
    bottom: 3px;
    left: 4px;
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .05em;
    text-align: center;
    text-transform: uppercase;
}

.single-product .product-summary-custom {
    padding-top: 30px;
}

.single-product .product-summary-custom h1 {
    margin: 12px 0 12px;
    font-size: clamp(42px, 4.4vw, 62px);
    line-height: .95;
}

.single-product .product-tag-row {
    margin-bottom: 16px;
}

.single-product .single-price {
    padding: 16px 0;
    font-size: 26px;
}

.single-product .short-description {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.55;
}

.single-product .buy-panel {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.single-product .buy-panel form.cart {
    margin: 0 !important;
}

body.single-product.woocommerce .site-main .buy-panel > .button.whatsapp-button {
    display: flex !important;
    width: 100%;
    min-height: 50px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px;
    margin: 0 !important;
    padding: 0 20px !important;
    border: 1px solid #139b58 !important;
    border-radius: 3px !important;
    background: #fff !important;
    color: #087640 !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    letter-spacing: .01em !important;
    line-height: 1.2 !important;
    text-align: center;
    text-transform: uppercase;
}

body.single-product.woocommerce .site-main .buy-panel > .button.whatsapp-button:hover {
    border-color: #087640 !important;
    background: #087640 !important;
    color: #fff !important;
}

body.single-product.woocommerce .site-main .buy-panel > .button.whatsapp-button svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.single-product .compare-single-button {
    margin-top: 0;
}

.single-product .payment-notes {
    gap: 6px;
    margin-top: 15px;
}

.single-product .product-details-section {
    padding: 40px 0;
}

@media (max-width: 900px) {
    .single-product .product-main {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .single-product .product-gallery-custom {
        width: min(100%, 600px);
        margin-inline: auto;
    }

    .single-product .product-summary-custom {
        padding-top: 0;
    }
}

@media (max-width: 600px) {
    .single-product .product-page > .container,
    .single-product .product-details-section > .container {
        width: min(calc(100% - 28px), 1100px);
    }

    .single-product .product-page {
        padding-top: 8px;
        padding-bottom: 38px;
    }

    .single-product .breadcrumbs {
        padding-bottom: 12px;
    }

    .product-gallery-slide > img {
        padding: 20px;
    }

    .product-gallery-thumb {
        width: 62px;
        min-width: 62px;
        height: 62px;
    }

    .product-gallery-video-thumb > span {
        top: 18px;
        left: 23px;
    }

    .single-product .product-summary-custom h1 {
        font-size: clamp(36px, 12vw, 48px);
    }

    .single-product .product-details-section {
        padding: 42px 0;
    }
}

/* Compact setup cards: product media must never create tall empty columns. */
.setup-card {
    min-height: 0;
}

.setup-products {
    min-height: 0;
}

.setup-products a {
    min-height: 0;
    justify-content: flex-start;
    padding: 12px;
}

.setup-products img {
    width: 100%;
    height: 220px;
    aspect-ratio: auto;
    padding: 18px;
    object-fit: contain;
    transform: translate(var(--card-image-x, 0), var(--card-image-y, 0)) scale(var(--card-image-scale, 1)) !important;
    transform-origin: center;
}

/* Personal comparison profile and compact product cards. */
.compare-profile {
    display: grid;
    grid-template-columns: minmax(260px, 1.3fr) repeat(4, minmax(120px, .65fr));
    gap: 10px;
    align-items: end;
    margin-bottom: 10px;
    padding: 18px;
    border: 1px solid var(--light-line);
    background: #fff;
}

.compare-profile-copy h2 {
    margin: 4px 0 3px;
    font-size: 22px;
    letter-spacing: -.04em;
}

.compare-profile-copy p {
    max-width: 460px;
    margin: 0;
    color: #65767d;
    font-size: 10px;
    line-height: 1.45;
}

.compare-profile label {
    color: #64757c;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.compare-profile select {
    width: 100%;
    height: 42px;
    margin-top: 6px;
    padding: 0 30px 0 10px;
    border: 1px solid var(--light-line);
    border-radius: 2px;
    background: #f7fafb;
    color: var(--ink);
    font-size: 11px;
    font-weight: 750;
}

.compare-selected-card {
    padding: 14px;
}

.compare-selected-card.is-winner {
    border-color: var(--blue);
    box-shadow: inset 0 3px 0 var(--blue);
}

.compare-selected-media {
    display: grid;
    height: 260px;
    aspect-ratio: auto;
    margin: -14px -14px 12px;
    place-items: center;
}

.compare-selected-media img {
    width: 100%;
    height: 100%;
    max-width: 310px;
    max-height: 252px;
    padding: 14px;
    object-fit: contain;
}

.compare-card-core {
    display: grid;
    grid-template-columns: minmax(80px, .7fr) minmax(120px, 1.3fr) minmax(86px, .8fr);
    gap: 10px 16px;
    align-items: center;
    padding: 6px 0 14px;
}

.compare-selected-grid[data-compare-count="1"] .compare-card-core,
.compare-selected-grid[data-compare-count="2"] .compare-card-core {
    grid-template-columns: minmax(80px, .65fr) minmax(130px, 1.15fr) minmax(90px, .75fr) minmax(150px, 1.45fr);
}

.compare-card-identity {
    min-width: 0;
}

.compare-card-identity h3,
.compare-selected-card .compare-card-identity h3 {
    min-height: 0;
    margin: 5px 0 0;
}

.compare-card-core .compare-card-price {
    white-space: nowrap;
}

.compare-score {
    display: flex;
    flex-direction: column;
    gap: 1px;
    align-items: flex-start;
    margin: 0;
}

.compare-score strong {
    color: #07899d;
    font-size: 24px;
    letter-spacing: -.05em;
}

.compare-score span {
    color: #718188;
    font-size: 8px;
    font-weight: 850;
    text-transform: uppercase;
}

.compare-reasons {
    display: flex;
    min-height: 0;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    align-content: flex-start;
}

.compare-selected-grid:not([data-compare-count="1"]):not([data-compare-count="2"]) .compare-reasons {
    grid-column: 1 / -1;
}

.compare-reasons span {
    padding: 5px 7px;
    border: 1px solid #cfe4e8;
    background: #f1fafb;
    color: #3f626a;
    font-size: 8px;
    line-height: 1.25;
}

.compare-fit {
    min-height: 0;
    margin: 0;
    padding: 0;
    border-top: 0;
}

.compare-card-bottom {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, .9fr);
    gap: 18px;
    align-items: center;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--light-line);
}

.compare-card-bottom .button {
    margin: 0;
}

.compare-insight-title {
    align-items: flex-start;
}

.compare-insight-title h2 {
    line-height: 1.15;
}

.compare-point-label {
    display: block;
    margin: 10px 0 4px;
    color: #247582;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.compare-insight-grid .compare-cons li::before {
    content: "–";
    color: #a1654d;
}

.compare-table-products img {
    object-fit: contain;
}

@media (max-width: 1000px) {
    .compare-profile {
        grid-template-columns: repeat(4, 1fr);
    }

    .compare-profile-copy {
        grid-column: 1 / -1;
    }
}

@media (max-width: 860px) {
    .setup-card {
        display: flex;
        min-height: 0;
        flex-direction: column;
    }

    .setup-info {
        padding: 24px;
    }

    .setup-info h2 {
        margin-top: 12px;
        font-size: clamp(32px, 9vw, 44px);
    }

    .setup-total {
        margin: 24px 0 16px;
    }

    .setup-products {
        display: flex;
        min-height: 0;
        gap: 8px;
        overflow-x: auto;
        padding: 10px;
        border-top: 1px solid var(--light-line);
        border-left: 0;
        background: var(--surface-soft);
        scroll-snap-type: x proximity;
    }

    .setup-products a,
    .setup-products a:last-child {
        display: grid;
        min-width: 0;
        max-width: none;
        flex: 0 0 158px;
        grid-column: auto;
        grid-template-rows: 126px auto;
        margin: 0;
        padding: 7px;
        border: 1px solid var(--light-line);
        background: #fff;
        scroll-snap-align: start;
    }

    .setup-products img {
        width: 100%;
        height: 126px;
        padding: 8px;
    }

    .setup-products span {
        margin-top: 7px;
        padding: 0 3px 4px;
        line-height: 1.3;
        text-overflow: clip;
        white-space: normal;
    }
}

@media (max-width: 600px) {
    .compare-profile {
        grid-template-columns: 1fr 1fr;
        padding: 14px;
    }

    .compare-profile-copy {
        grid-column: 1 / -1;
    }

    .compare-selected-grid {
        grid-auto-columns: min(82vw, 274px);
    }

    .compare-selected-media {
        height: 185px;
    }

    .compare-selected-media img {
        max-width: 220px;
        max-height: 180px;
        padding: 10px;
    }

    .compare-card-core,
    .compare-selected-grid[data-compare-count="1"] .compare-card-core,
    .compare-selected-grid[data-compare-count="2"] .compare-card-core {
        grid-template-columns: 72px minmax(100px, 1fr);
        gap: 10px 12px;
    }

    .compare-card-core .compare-card-price {
        grid-column: 1;
    }

    .compare-card-core .compare-reasons {
        grid-column: 2;
    }

    .compare-card-bottom {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .compare-insight-title {
        padding: 20px;
    }

    .compare-insight-grid article {
        min-width: 245px;
        padding: 18px;
    }
}

/* Related products are a compact shelf, not a second full-size catalog. */
body.single-product .related-custom {
    padding-block: 48px;
}

body.single-product .related-custom > .container {
    width: min(calc(100% - 40px), 1100px);
}

body.single-product .related-custom .section-heading {
    margin-bottom: 18px;
}

body.single-product .related-custom .section-heading h2 {
    font-size: clamp(32px, 3vw, 42px);
    line-height: 1;
}

body.single-product .related-custom .related ul.products {
    gap: 12px;
}

body.single-product .related-custom .product-card-media {
    height: clamp(200px, 18vw, 220px);
    aspect-ratio: auto;
}

body.single-product .related-custom .product-card-media img,
body.single-product .related-custom .product-card:hover .product-card-media img {
    padding: 14px !important;
    object-fit: contain;
}

body.single-product .related-custom .product-card-body {
    padding: 14px;
}

body.single-product .related-custom .product-card-meta {
    min-height: 19px;
    gap: 4px;
}

body.single-product .related-custom .product-card-meta span {
    padding: 4px 6px;
    font-size: 7px;
}

body.single-product .related-custom .product-card h3 {
    min-height: 34px;
    margin: 9px 0 7px;
    font-size: 15px;
    line-height: 1.15;
}

body.single-product .related-custom .product-card-bottom {
    padding-top: 9px;
}

body.single-product .related-custom .product-price {
    font-size: 15px;
}

body.single-product .related-custom .product-arrow {
    width: 30px;
    height: 30px;
}

body.single-product .related-custom .product-card-actions {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 9px;
}

body.single-product .related-custom .mini-whatsapp {
    display: none;
}

body.single-product .related-custom .mini-cart,
body.single-product .related-custom .compare-toggle {
    min-height: 36px;
    padding-inline: 8px;
    font-size: 8px;
}

body.single-product .related-custom .compare-card-button {
    grid-column: auto;
}

body.single-product .related-custom .favorite-card-button {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
}

body.single-product .related-custom .favorite-card-button svg {
    width: 17px;
    height: 17px;
}

body.single-product .related-custom .stock-badge,
body.single-product .related-custom .sale-badge {
    top: 10px;
    padding: 5px 7px;
    font-size: 7px;
}

body.single-product .related-custom .sale-badge,
body.single-product .related-custom .product-card-media-wrap .sale-badge {
    top: 47px;
    right: 10px;
}

@media (max-width: 600px) {
    body.single-product .related-custom {
        padding-block: 32px;
    }

    body.single-product .related-custom > .container {
        width: min(calc(100% - 24px), 1100px);
    }

    body.single-product .related-custom .section-heading {
        margin-bottom: 14px;
    }

    body.single-product .related-custom .section-heading h2 {
        font-size: 29px;
    }

    body.single-product .related-custom .related ul.products {
        grid-auto-flow: column;
        grid-auto-columns: min(76vw, 275px);
        grid-template-columns: none;
        gap: 8px;
        contain: paint;
        overflow-x: auto;
        margin-right: -12px;
        padding-right: 12px;
        padding-bottom: 4px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    body.single-product .related-custom .related ul.products::-webkit-scrollbar {
        display: none;
    }

    body.single-product .related-custom .related ul.products > article {
        scroll-snap-align: start;
    }

    body.single-product .related-custom .product-card-media {
        height: 128px;
    }

    body.single-product .related-custom .product-card-media img,
    body.single-product .related-custom .product-card:hover .product-card-media img {
        padding: 9px !important;
    }

    body.single-product .related-custom .product-card-body {
        padding: 9px;
    }

    body.single-product .related-custom .product-card-meta {
        min-height: 18px;
    }

    body.single-product .related-custom .product-card-meta span {
        padding: 3px 4px;
        font-size: 6px;
    }

    body.single-product .related-custom .product-card h3 {
        min-height: 30px;
        margin: 7px 0 6px;
        font-size: 12px;
    }

    body.single-product .related-custom .product-price {
        font-size: 12px;
    }

    body.single-product .related-custom .product-arrow {
        width: 26px;
        height: 26px;
        font-size: 10px;
    }

    body.single-product .related-custom .product-card-actions {
        gap: 4px;
        margin-top: 7px;
    }

    body.single-product .related-custom .mini-cart,
    body.single-product .related-custom .compare-toggle {
        min-height: 40px;
        padding-inline: 4px;
        gap: 3px;
        font-size: 7px;
    }

    body.single-product .related-custom .compare-plus {
        font-size: 12px;
    }

    body.single-product .related-custom .favorite-card-button {
        top: 7px;
        right: 7px;
        width: 30px;
        height: 30px;
    }

    body.single-product .related-custom .favorite-card-button svg {
        width: 16px;
        height: 16px;
    }

    body.single-product .related-custom .stock-badge,
    body.single-product .related-custom .sale-badge {
        top: 7px;
        padding: 4px 5px;
        font-size: 6px;
    }

    body.single-product .related-custom .sale-badge,
    body.single-product .related-custom .product-card-media-wrap .sale-badge {
        top: 42px;
        right: 7px;
    }
}
