/* ---------- Layout ---------- */
.detail-h6 {
    color: #b2b2b2;
    font-size: 13px;
}

.product-section {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.left-gallery {
    position: sticky;
    top: 100px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}


.main-image-product-wrapper {
    position: relative;
    display: inline-block;
}

.prev-image-btn,
.next-image-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
}

.prev-image-btn:hover,
.next-image-btn:hover {
    background: rgb(0, 0, 0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.prev-image-btn {
    left: 5px;
}

.next-image-btn {
    right: 5px;
}

.main-image-product-wrapper {
    position: relative;
    width: 100%;
}

.main-image-product img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    cursor: zoom-in;
}

/* ---------- Zoom Icon ---------- */
.zoom-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    /* background: rgba(0, 0, 0, 0.6); */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 2;
}

.zoom-icon:hover {
    background: rgba(0, 0, 0, 0.8);
}

.thumb-gallery {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    width: 100%;
}

.thumb-gallery img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumb-gallery img:hover {
    transform: scale(1.07);
}

.thumb-gallery img.active {
    border-color: #000;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.right-details {
    flex: 1;
}

.price h4 {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
}

.price del {
    color: #888;
    margin-left: 10px;
}

.color-section img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #000000;
    transition: border-color 0.3s ease;
}

.color-section img:hover,
.color-section img.selected {
    border-color: #ffffff;
}

.size-section {
    margin: 25px 0;
}

.size-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(45px, auto));
    gap: 10px;
    max-width: 380px;
    justify-content: start;
}

.size-btn {
    background: #000000;
    border: 1px solid #676767;
    border-radius: 8px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.size-btn.active {
    background-color: #FFF;
    color: #000;
    border: 2px solid #ffffff;
    font-weight: 600;
}

/* ---------- Mobile Fixes ---------- */
@media (max-width: 992px) {
    .product-section {
        flex-direction: column !important;
        align-items: center !important;
        gap: 35px;
    }

    .left-gallery {
        position: static !important;
        top: auto !important;
        width: 100%;
    }

    .main-image-product img {
        width: 100%;
        height: auto !important;
        object-fit: contain !important;
    }

    .thumb-gallery img {
        width: 70px;
        height: 70px;
    }

    .right-details {
        width: 100%;
        margin-top: 25px;
    }

    .thumb-gallery {
        justify-content: center;
    }
}

.image-icon {
    position: absolute;
    z-index: 30;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 6px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease;
}

.image-icon:hover {
    transform: scale(1.04);
}

/* ==================== MODAL FIX ==================== */
.modal-content {
    background-color: #fff !important;
    color: #000 !important;
}

.modal-backdrop.show {
    opacity: 0.8 !important;
}

/* ===== Custom Modal Close Button ===== */
.btn-close {
    position: relative;
    width: 15px;
    height: 15px;
    border: none;
    background: #898989ff !important;
    border-radius: 50%;
    opacity: 1 !important;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-close::before,
.btn-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    background-color: #000;
    transform-origin: center;
}

.btn-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.btn-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.btn-close:hover {
    background: #e0e0e0 !important;
}

/* ==================== FORCE CENTER ZOOM IMAGE ==================== */
.pswp__button--arrow .pswp__icn {
    width: 35px !important;
}

/* ========== Out of Stock Styles ========== */
.color-wrapper {
    position: relative;
    display: inline-block;
}

.stock-label {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 4px;
    border-radius: 0 0 6px 6px;
}

.color-img.out-of-stock {
    border-color: #ccc !important;
    opacity: 0.5;
}

.size-btn.disabled {
    background: #5f5f5f !important;
    color: #888 !important;
    border: 1px solid #ccc !important;
    cursor: not-allowed !important;
}

/* ===== Custom Add to Cart Button ===== */
/* ===== Common Button Style Base ===== */
.btn-custom-dark,
.btn-custom-gray {
    position: relative;
    overflow: hidden;
    border: 1px solid #fff;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    padding: 10px 14px;
    font-size: 12px;
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    z-index: 1;
}

.btn-custom-gray1{
    position: relative;
    overflow: hidden;
    /* border: 1px solid #fff; */
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    padding: 10px 14px;
    font-size: 12px;
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    z-index: 1;
}


/* ===== Add to Cart (Black to White) ===== */
.btn-custom-dark {
    background-color: #000;
}

.btn-custom-dark::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: #fff;
    transition: all 0.5s ease;
    z-index: -1;
}

.btn-custom-dark:hover::before {
    left: 0;
}

.btn-custom-dark>span {
    position: relative;
    z-index: 2;
}

.btn-custom-dark:hover {
    color: #000;
    border-color: #000;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ===== Buy Now (Black to Gray) ===== */
.btn-custom-gray1 {
  background: linear-gradient(90deg, #444, #777);
    /* Start black */
    /* border: 1px solid #fff; */
    color:#fff;
}

.btn-custom-gray1::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #ffffff;
    color: #000;
    /* smooth gray slide */
    transition: all 0.5s ease;
    z-index: -1;
}

.btn-custom-gray1:hover::before {
    left: 0;
}

.btn-custom-gray1>span {
    position: relative;
    z-index: 2;
}

.btn-custom-gray1:hover {
    color: #000000;
    background: #FFF !important;
    /* keep text white on gray hover */
    border: 1px solid #fff;
    /* transform: scale(1.05); */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}


/* ===== Buy Now (Black to Gray) ===== */
.btn-custom-gray {
    background-color: #000;
    /* Start black */
    border: 1px solid #fff;
}

.btn-custom-gray::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #444, #777);
    /* smooth gray slide */
    transition: all 0.5s ease;
    z-index: -1;
}

.btn-custom-gray:hover::before {
    left: 0;
}

.btn-custom-gray>span {
    position: relative;
    z-index: 2;
}

.btn-custom-gray:hover {
    color: #fff;
    /* keep text white on gray hover */
    border-color: #777;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}