﻿/* =========================================================
   PDP LAYOUT
========================================================= */

.pdp-left-area {
    width: 100%;
}

.pdp-gallery-wrap {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.pdp-main {
    min-width: 0;
}

/* =========================================================
   THUMBS
========================================================= */

.pdp-thumbs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pdp-thumb {
    width: 120px;
    height: 120px;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

    .pdp-thumb:hover,
    .pdp-thumb.is-active {
        border-color: #111827;
        box-shadow: 0 8px 22px rgba(17, 24, 39, .10);
    }

    .pdp-thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

/* =========================================================
   MAIN IMAGE
========================================================= */

.pdp-main-image-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #eef0f2;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdp-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .18s ease;
}

    .pdp-main-image.is-zoomed {
        transform: scale(1.85);
    }

.pdp-no-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
}

/* =========================================================
   PRODUCT INFO
========================================================= */

.pdp-stock-code {
    color: #6b7280;
    font-size: .95rem;
    font-weight: 600;
}

.pdp-title {
    font-size: 1.95rem;
    line-height: 1.22;
    font-weight: 800;
    color: #111827;
}

.pdp-brand {
    color: #374151;
    font-weight: 700;
}

/* =========================================================
   PRICE
========================================================= */

.pdp-price-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.pdp-old-price {
    font-size: 34px;
    line-height: 1.05;
    color: #9ca3af;
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    font-weight: 800;
    opacity: .75;
}

.pdp-discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 6px 16px rgba(220, 38, 38, .18);
    transition: transform .18s ease, box-shadow .18s ease;
}

    .pdp-discount-badge:hover {
        transform: scale(1.05);
        box-shadow: 0 10px 24px rgba(220, 38, 38, .28);
    }

.pdp-price {
    font-size: 40px;
    line-height: 1.05;
    font-weight: 900;
    color: #0f5132;
}

/* =========================================================
   BUY AREA
========================================================= */

.pdp-buy-area {
    flex: 0 0 auto;
    margin-bottom: 24px;
}

.pdp-price-action-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.pdp-qty-cart-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pdp-qty-box {
    width: 150px;
    height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.pdp-qty-btn {
    width: 46px;
    height: 48px;
    border: 0;
    background: #fff;
    color: #111827;
    font-size: 24px;
    cursor: pointer;
    transition: background .18s ease;
}

    .pdp-qty-btn:hover {
        background: #f8fafc;
    }

.pdp-qty-input {
    width: 58px;
    height: 48px;
    border: 0;
    background: #fff;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    outline: none;
}

.pdp-add-cart-btn {
    min-width: 160px;
    height: 48px;
    border-radius: 10px;
    font-weight: 800;
}

.pdp-fav-btn {
    width: 48px;
    height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease;
}

    .pdp-fav-btn:hover {
        border-color: #111827;
        background: #fafafa;
    }

.pdp-cart-qty-badge {
    position: absolute;
    top: -10px;
    right: 108px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* =========================================================
   STOCK INFO STRIP
========================================================= */

.pdp-stock-strip {
    display: flex;
    align-items: stretch;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.pdp-stock-strip-item {
    min-height: 70px;
    padding: 14px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 800;
    color: #111827;
}

    .pdp-stock-strip-item i {
        font-size: 22px;
    }

.pdp-stock-icon,
.pdp-delivery-icon {
    color: #198754;
}

.pdp-limited-icon {
    color: #fd7e14;
}

.pdp-point-icon {
    color: #f5b301;
}

/* =========================================================
   EXTRA INFO
========================================================= */

.pdp-stock-extra {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid #eef0f2;
    border-radius: 14px;
    background: #fbfcfd;
    font-size: 14px;
}

.pdp-stock-available,
.pdp-limited-quantity,
.pdp-point-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1f2937;
    font-weight: 700;
}

/* =========================================================
   DETAIL AREA
========================================================= */

.row.g-4.align-items-start {
    align-items: stretch !important;
}

    .row.g-4.align-items-start > .col-lg-6:last-child {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

.row.g-4 > .col-lg-6:first-child {
    padding-left: 0;
}

.pdp-detail-box {
    flex: 1 1 auto;
    min-height: 360px;
    max-height: calc(100vh - 310px);
    border: 1px solid #eef0f2;
    border-radius: 16px;
    background: #fff;
    padding: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pdp-detail-html {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 8px;
    color: #374151;
    line-height: 1.65;
}

    .pdp-detail-html p {
        margin-bottom: 12px;
    }

    .pdp-detail-html img {
        max-width: 100%;
        height: auto;
        display: block;
    }

/* =========================================================
   RELATED PRODUCTS
========================================================= */

.related-section-title {
    margin: 22px 0 10px;
    font-size: 18px;
    font-weight: 800;
    color: #111827;
}

.related-slider-wrap {
    position: relative;
    overflow: hidden;
}

.related-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 38px;
    scrollbar-width: none;
}

    .related-slider::-webkit-scrollbar {
        display: none;
    }

.related-card {
    flex: 0 0 170px;
    width: 170px;
    border: 1px solid #eeeeee;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    color: inherit;
    text-decoration: none;
    text-align: center;
    transition: transform .2s ease, box-shadow .2s ease;
}

    .related-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 6px 20px rgba(0,0,0,.12);
    }

.related-img {
    height: 130px;
    padding: 10px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .related-img img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.related-body {
    padding: 10px;
}

.related-title {
    min-height: 54px;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.related-price-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.related-old-price {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 800;
}

.related-discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.related-net-price {
    font-size: 17px;
    font-weight: 900;
    color: #0f5132;
}

/* =========================================================
   RELATED ARROWS
========================================================= */

.rs-arrow {
    position: absolute;
    top: 45%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,.18);
    cursor: pointer;
    z-index: 5;
    font-size: 24px;
    line-height: 1;
}

.rs-left {
    left: 4px;
}

.rs-right {
    right: 4px;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 991.98px) {

    .pdp-gallery-wrap {
        grid-template-columns: 1fr;
    }

    .pdp-main {
        order: 1;
    }

    .pdp-thumbs {
        order: 2;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 6px;
        margin-top: 12px;
    }

    .pdp-thumb {
        width: 90px;
        height: 90px;
        min-width: 90px;
    }

    .pdp-title {
        font-size: 1.5rem;
    }

    .pdp-old-price,
    .pdp-price {
        font-size: 30px;
    }

    .pdp-discount-badge {
        font-size: 16px;
        padding: 6px 12px;
    }

    .pdp-price-action-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .pdp-qty-cart-row {
        flex-wrap: wrap;
        width: 100%;
    }

    .pdp-detail-box {
        max-height: none;
        min-height: auto;
    }

    .related-card {
        flex-basis: 155px;
        width: 155px;
    }

    .related-img {
        height: 120px;
    }

    .pdp-cart-qty-badge {
        right: 90px;
    }
}

.pdp-stock-strip-social {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 2px;
}

.pdp-social-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    color: #374151;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

    .pdp-social-btn i {
        font-size: 18px;
    }

    .pdp-social-btn:hover {
        transform: translateY(-2px);
        border-color: #d1d5db;
        background: #fafafa;
        box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
    }

    .pdp-social-btn:nth-child(1):hover {
        color: #e11d48;
    }

    .pdp-social-btn:nth-child(2):hover {
        color: #2563eb;
    }

    .pdp-social-btn:nth-child(3):hover {
        color: #0f766e;
    }

.plp-unavailable {
    width: 100%;
    min-height: 44px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
    color: #991b1b;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .plp-unavailable i {
        font-size: 16px;
    }

.plp-card-image {
    position: relative;
    overflow: hidden;
}

    .plp-card-image .product-discount-ribbon {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        width: 64px !important;
        height: 64px !important;
        max-width: 64px !important;
        max-height: 64px !important;
        object-fit: contain !important;
        z-index: 20 !important;
        pointer-events: none;
    }