

.product-media-main {
    position: relative;
    height: clamp(420px, 42vw, 540px);
    border: 1px solid #d6e1ee;
    border-radius: 14px;
    background: linear-gradient(180deg, #f9fcff 0%, #eef3f9 100%);
}

.product-media-main img {
    object-fit: contain;
    object-position: center;
    background: transparent;
}

.product-media-main video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #101418;
}

/* Navigation arrows — positioned absolutely inside .product-media-main */
.product-media-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(100, 140, 180, 0.35);
    background: rgba(255, 255, 255, 0.92);
    color: #2c4a6e;
    transform: translateY(-50%);
    transition: background 0.15s, opacity 0.15s;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    /* Ensure buttons are not obscured by picture/video */
    pointer-events: auto;
}

.product-media-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(100, 140, 180, 0.6);
}

.product-media-nav:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.product-media-nav:disabled {
    opacity: 0.35;
    cursor: default;
}

.product-media-nav--prev {
    left: 14px;
}

.product-media-nav--next {
    right: 14px;
}

/* Counter badge — bottom-right corner */
.product-media-counter {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.6;
    pointer-events: none;
    user-select: none;
}

.product-media-nav[hidden],
.product-media-counter[hidden] {
    display: none !important;
}

.product-media-thumb {
    width: 76px;
    height: 76px;
    overflow: hidden;
    border-radius: 10px !important;
    background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.product-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

.product-media-thumb-video {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #101418;
    color: #fff;
    font-weight: 600;
}

.product-detail-section {
    padding-top: 1.25rem;
}

.product-detail-title {
    font-size: clamp(2rem, 3vw, 3rem);
}

.product-availability {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid #cbd6e3;
    border-radius: 999px;
    background: #f5f7fa;
    color: #526274;
    font-size: 0.8rem;
}

.product-availability.is-in-stock {
    border-color: #aadbc8;
    background: #effaf5;
    color: #116149;
}

.product-availability-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentColor;
}

.product-availability-count {
    padding-left: 0.42rem;
    border-left: 1px solid currentColor;
}

.product-buy-box {
    border: 1px solid #d8e1ea;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 30px rgba(21, 48, 72, 0.09);
}

@media (min-width: 992px) {
    .product-gallery-column {
        position: sticky;
        top: 90px;
    }
}

@media (max-width: 767.98px) {
    .product-media-main {
        height: 300px;
    }

    .product-media-thumb {
        width: 64px;
        height: 64px;
    }

    .product-media-nav--prev {
        left: 8px;
    }

    .product-media-nav--next {
        right: 8px;
    }

    .product-media-counter {
        right: 8px;
        bottom: 8px;
    }
}

.product-purchase-controls,
.product-quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-purchase-controls {
    align-items: stretch;
}

.product-quantity-controls .btn,
.product-purchase-controls .product-add-cart-button {
    min-height: 44px;
}

.product-purchase-controls .product-add-cart-button {
    flex: 1 1 auto;
}

.product-quantity-controls #product_quantity {
    width: 120px;
}

@media (max-width: 399.98px) {
    .product-purchase-controls {
        display: grid;
        grid-template-columns: 1fr;
    }

    .product-quantity-controls {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .product-quantity-controls #product_quantity {
        width: 100% !important;
    }

    .product-add-cart-button {
        width: 100%;
    }
}