@keyframes shake {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    50% {
        transform: translateX(5px);
    }
    75% {
        transform: translateX(-5px);
    }
    100% {
        transform: translateX(0);
    }
}

#stockErrorContainer {
    width: 100%;
    margin-top: 8px;
}

#stockErrorContainer .text-danger {
    font-size: 14px;
}
.size-box.invalid {
    border: 1px solid #dc3545;
    border-radius: 6px;
    padding: 10px;
    animation: shake 0.3s ease;
}

.size-box ul.selected li {
    display: inline-block;
    margin: 5px;
    position: relative;
}

.size-box ul.selected li input[type="radio"] {
    display: none;
}

.size-box ul.selected li label {
    cursor: pointer;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    transition: all 0.3s;
}

.size-box ul.selected li input[type="radio"]:checked + label {
    background-color: #d65025;
    color: #fff;
    border-color: #d65025;
}

.color-box ul.color-variant li {
    display: inline-block;
    margin: 5px;
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}

.color-box ul.color-variant li input[type="radio"] {
    display: none;
}

.color-box ul.color-variant li label {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.color-box ul.color-variant li input[type="radio"]:checked + label {
    border: 2px solid #d65025;
}
.size-box ul li a.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}
/* Review Stars */
.star-rating {
    display: inline-block;
    unicode-bidi: bidi-override;
    color: #ffc107;
    font-size: 0;
    height: 25px;
    position: relative;
    padding: 0;
    text-shadow: 0px 1px 0 #a2a2a2;
}

.star-rating i {
    font-size: 1.5rem;
    margin-right: 5px;
    color: #ffc107;
    cursor: pointer;
}

/* Review Images */
.review-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.review-images img {
    transition: transform 0.3s ease;
}

.review-images img:hover {
    transform: scale(1.05);
}

/* Review Title */
.review-title {
    font-weight: 600;
    margin: 5px 0;
    color: #333;
}

/* Empty Reviews */
.alert-info {
    background-color: #e7f8ff;
    color: #31708f;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}
.user-img {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

.user-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #6c757d;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
}
.size-box .selected li a.out-of-stock {
    position: relative;
    pointer-events: none;
    color: #999;
    opacity: 0.8;
    font-weight: bold;
    display: inline-block;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    text-align: center;
    min-width: 40px;
}

.size-box .selected li a.out-of-stock span {
    position: relative;
    display: inline-block;
    z-index: 1;
}

/* Bold red X lines */
.size-box .selected li a.out-of-stock::before,
.size-box .selected li a.out-of-stock::after {
    content: "";
    position: absolute;
    width: 80%;
    height: 2px;
    background-color: red;
    top: 50%;
    left: 10%;
    transform-origin: center;
    z-index: 2;
}

.size-box .selected li a.out-of-stock::before {
    transform: rotate(45deg);
}

.size-box .selected li a.out-of-stock::after {
    transform: rotate(-45deg);
}

/* Text below size */
.size-box .selected li a.out-of-stock::after {
    content: "";
}

.size-box .selected li a.out-of-stock-text {
    display: block;
    font-size: 11px;
    color: red;
    margin-top: 4px;
    text-align: center;
}

/* ==============================
   PRODUCT PAGE – MODERN UI
   ============================== */

.product-gallery {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

/* THUMBNAILS */
.product-thumbs {
    width: 72px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-thumbs img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    background: #f1f1f1;
}

.product-thumbs img:hover {
    transform: scale(1.04);
}

.product-thumbs img.active {
    border-color: #000;
}

/* MAIN IMAGE CARD */
.product-main-image {
    flex: 1;
    background: #f6f6f6;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 3 / 4; /* 🔥 KEY FIX */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 🔥 FULL WIDTH + HEIGHT */
    display: block;
}

/* ==============================
   RIGHT PRODUCT SECTION POLISH
   ============================== */

.product-detail-box {
    padding-left: 10px;
}

.product-detail-box h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-detail-box p {
    font-size: 18px;
}

.product-detail-box .delete {
    color: #999;
    margin-left: 6px;
}

/* INFO LIST */
.dz-info ul li {
    padding: 6px 0;
}

.dz-info h6 {
    font-weight: 500;
}

/* CTA BUTTONS */
.btn_black {
    background: #111;
    color: #fff;
    border-radius: 10px;
}

.btn_outline {
    border-radius: 10px;
}

/* ==============================
   MOBILE IMPROVEMENTS
   ============================== */

@media (max-width: 768px) {
    .product-gallery {
        flex-direction: column;
        gap: 14px;
    }

    .product-main-image {
        aspect-ratio: 4 / 5;
        border-radius: 16px;
    }

    .product-thumbs {
        width: 100%;
        flex-direction: row;
        justify-content: center;
    }

    .product-thumbs img {
        width: 68px;
    }

    .product-detail-box h3 {
        font-size: 22px;
    }
}
/* ==============================
   PRODUCT IMAGE HOVER ZOOM
   ============================== */

.product-main-image {
    overflow: hidden;
}

.product-main-image img {
    transition: transform 0.5s ease;
}

.product-main-image:hover img {
    transform: scale(1.15);
}

/* Disable zoom on mobile */
@media (max-width: 768px) {
    .product-main-image:hover img {
        transform: none;
    }
}
.product-main-image img {
    transition:
        transform 0.3s ease,
        transform-origin 0.3s ease;
}
/* =====================================
   RELATED PRODUCTS – SAME CARD STYLE
   ===================================== */

.related-products .product-box-3 {
    background: #fff;
    border-radius: 14px;
    padding: 10px;
    transition: all 0.3s ease;
}

.related-products .product-box-3:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* Image wrapper */
.related-products .product-box-3 .img-wrapper {
    overflow: hidden;
    border-radius: 12px;
}

/* Image height adjustment */
.related-products .product-box-3 .product-image a {
    height: 300px; /* slightly smaller than listing */
    display: block;
    border-radius: 12px;
}

.related-products .product-box-3 .product-image-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
}

/* Text alignment */
.related-products .product-box-3 .product-detail {
    padding-top: 10px;
    text-align: center;
}

.related-products .product-box-3 .product-detail h6 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 8px 0 6px;
    height: 36px;
    overflow: hidden;
}

.related-products .product-box-3 .product-detail p {
    margin: 0;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    color: #ff7a00;
}

.related-products .product-box-3 .product-detail del {
    font-size: 12px;
    color: #999;
    margin-left: 6px;
}

/* MOBILE */
@media (max-width: 767px) {
    .related-products .product-box-3 .product-image a {
        height: 220px;
    }

    .related-products .product-box-3 .product-detail h6 {
        font-size: 13px;
    }
}
.product-box-3 .product-detail p {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: center;
}

@media (min-width: 769px) {
    .product-gallery {
        flex-direction: row;
    }

    .product-thumbs {
        order: 1;
    }

    .product-main-image {
        order: 2;
    }
}
.product-main-image {
    touch-action: pan-y;
}