/* ============================================================
                                           BASE
                                        ============================================================ */
.product-page {
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================================
                                           GALLERY CARD
                                        ============================================================ */
.gallery-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .07);
    overflow: hidden;
}

.main-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#mainImg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Loading spinner overlay */
.img-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.img-loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.img-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Hidden canvas */
#mockupCanvas {
    position: absolute;
    left: -9999px;
    top: -9999px;
    visibility: hidden;
    pointer-events: none;
}

/* ============================================================
                                           INFO CARD
                                        ============================================================ */
.info-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .07);
    padding: 1rem;
    height: 100%;
}

.product-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 1.25rem;
    line-height: 1.3;
}

/* ============================================================
                                           SELLER BOX
                                        ============================================================ */
.seller-box {
    background: #fafafa;
    border: 1.5px solid #efefef;
    border-radius: 12px;
    padding: .85rem 1rem;
    margin-bottom: 1.25rem;
}

.seller-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: .25rem;
}

.seller-name {
    font-size: .9rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
}

.seller-name:hover {
    color: #2563eb;
}

.seller-rating {
    font-size: .78rem;
    color: #888;
    margin-top: .15rem;
}

/* ============================================================
                                           PRICE ROW
                                        ============================================================ */
.price-row {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.price-current {
    font-size: 2rem;
    font-weight: 700;
    color: #111;
    line-height: 1;
}

.price-original {
    font-size: 1.1rem;
    color: #bbb;
    text-decoration: line-through;
}

.price-badge {
    background: #fee2e2;
    color: #dc2626;
    font-size: .72rem;
    font-weight: 700;
    padding: .2rem .5rem;
    border-radius: 6px;
    letter-spacing: .04em;
}

/* ============================================================
                                           FORM CONTROLS
                                        ============================================================ */
.ctrl-group {
    margin-bottom: .85rem;
}

.ctrl-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #999;
    margin-bottom: .35rem;
}

.field-select,
.field-number {
    width: 100%;
    padding: .6rem .85rem;
    border: 1.5px solid #e5e5e5;
    border-radius: 10px;
    font-size: .88rem;
    color: #111;
    background: #fafafa;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
    appearance: auto;
}

.field-select:focus,
.field-number:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.qty-row {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.qty-row .ctrl-label {
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.field-number {
    max-width: 100px;
}

/* Size guide link */
.size-guide-link {
    font-size: .75rem;
    color: #2563eb;
    text-decoration: none;
    float: right;
    margin-top: .1rem;
}

.size-guide-link:hover {
    text-decoration: underline;
}

/* ============================================================
                                           CTA BUTTONS
                                        ============================================================ */
.cta-stack {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-top: 1.5rem;
}

.btn-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .78rem 1.5rem;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    width: 100%;
}

.btn-cart:hover {
    background: #333;
    transform: translateY(-1px);
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .78rem 1.5rem;
    background: #dcfce7;
    color: #15803d;
    border: 1.5px solid #bbf7d0;
    border-radius: 12px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, transform .1s;
    width: 100%;
}

.btn-whatsapp:hover {
    background: #15803d;
    color: #fff;
    border-color: #15803d;
    transform: translateY(-1px);
}

/* ============================================================
                                           INFO PANELS (Quality / Return)
                                        ============================================================ */
.info-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 767px) {
    .info-panels {
        grid-template-columns: 1fr;
    }
}

.info-panel {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
    padding: 1.15rem 1.25rem;
}

.info-panel-title {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: .5rem;
}

.info-panel p {
    font-size: .85rem;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

/* ============================================================
                                           REVIEWS
                                        ============================================================ */
.reviews-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .07);
    padding: 1.75rem;
    margin-top: 1.5rem;
}

.reviews-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid #f0f0f0;
}

.ratings-col {
    border-right: 1px solid #f0f0f0;
    padding-right: 1.5rem;
}

@media (max-width: 991px) {
    .ratings-col {
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
        padding-right: 0;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
}

.rating-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .35rem 0;
    font-size: .82rem;
    color: #555;
}

.rating-pct {
    font-weight: 700;
    color: #111;
}

.review-item {
    padding: .85rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: .3rem;
}

.reviewer-name {
    font-size: .85rem;
    font-weight: 600;
    color: #111;
}

.review-label {
    font-size: .75rem;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    padding: .15rem .5rem;
    border-radius: 5px;
}

.review-comment {
    font-size: .83rem;
    color: #666;
    line-height: 1.5;
}

/* ============================================================
                                           MORE DESIGNS
                                        ============================================================ */
.more-section {
    margin-top: 2rem;
}

.more-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 1rem;
}

.design-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: .75rem;
}

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

@media (max-width: 576px) {
    .design-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.design-item a {
    text-decoration: none;
    display: block;
}

.design-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.design-item .d-name {
    font-size: .78rem;
    color: #555;
    margin-top: .35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.design-item .d-price {
    font-size: .82rem;
    font-weight: 700;
    color: #111;
}

/* ============================================================
                                           MODAL tweaks
                                        ============================================================ */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .15);
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 1.1rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
}

/* ============================================================
                                           THUMBNAIL CAROUSEL
                                        ============================================================ */
.carousel-inner-row {
    display: flex;
    gap: .75rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: .25rem;
}

.carousel-col,
.carousel-colb {
    flex: 0 0 auto;
    width: 20%;
}

@media (max-width: 991px) {

    .carousel-col,
    .carousel-colb {
        width: 40%;
    }
}

.thumbnail-wrapper .thumbnails {
    cursor: pointer;
}

@media (max-width: 991px) {
    .carousel-inner-row {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .carousel-inner-row::-webkit-scrollbar {
        display: none;
    }
}

.cs-img {
    display: block;
}

.pname,
.pr-name {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}