/* ================================================================
   product-detail.css  –  EverythingKuwait Product Detail Page
   Premium redesign — aligned with home-modern.css design system
   ================================================================ */

/* ── Page ── */
.pd-wrapper {
    background: var(--bg, #f7f6f4);
    min-height: 100vh;
    padding-bottom: 72px;
}

/* ── Breadcrumb ── */
.pd-breadcrumb { margin-bottom: 20px; }
.pd-breadcrumb .breadcrumb {
    background: transparent;
    padding: 18px 0 0;
    margin: 0;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .01em;
    color: var(--muted, #a8a8a8);
    gap: 0;
}
.pd-breadcrumb .breadcrumb-item a {
    color: var(--muted, #a8a8a8);
    text-decoration: none;
    transition: color .2s;
}
.pd-breadcrumb .breadcrumb-item a:hover { color: var(--black, #0a0a0a); }
.pd-breadcrumb .breadcrumb-item.active { color: var(--dark, #1c1c1c); font-weight: 600; }
.pd-breadcrumb .breadcrumb-item + .breadcrumb-item::before { color: var(--light, #e8e8e8); }

/* ================================================================
   MAIN PRODUCT CARD
   ================================================================ */
.pd-main-card {
    background: var(--white, #fff);
    border: 1px solid var(--light, #e8e8e8);
    border-radius: 28px;
    box-shadow: 0 4px 32px rgba(0,0,0,.06), 0 1px 4px rgba(0,0,0,.04);
    overflow: hidden;
    margin-bottom: 20px;
    transition: box-shadow .3s var(--ease);
}

.pd-main-inner {
    display: grid;
    grid-template-columns: 52% 48%;
}

@media (max-width: 900px)  { .pd-main-inner { grid-template-columns: 1fr; } }

/* Gallery column */
.pd-gallery-col {
    padding: 32px 28px 32px 32px;
    border-right: 1px solid var(--light, #e8e8e8);
    background: linear-gradient(145deg, #fafaf9 0%, #f5f4f2 100%);
}
@media (max-width: 900px) {
    .pd-gallery-col {
        border-right: none;
        border-bottom: 1px solid var(--light, #e8e8e8);
        padding: 24px;
    }
}

/* Info column */
.pd-info-col {
    padding: 36px 36px 36px 32px;
    display: flex;
    flex-direction: column;
}
@media (max-width: 900px) { .pd-info-col { padding: 28px 24px; } }

/* ================================================================
   TRUST BADGES STRIP (below main card)
   ================================================================ */
.pd-trust-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: var(--white, #fff);
    border: 1px solid var(--light, #e8e8e8);
    border-radius: 16px;
    padding: 14px 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.pd-trust-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mid, #6b6b6b);
    letter-spacing: .01em;
}
.pd-trust-item i {
    font-size: 15px;
    color: var(--dark, #1c1c1c);
}

/* ================================================================
   TABS — Premium underline style
   ================================================================ */
.pd-tabs-wrap {
    background: var(--white, #fff);
    border: 1px solid var(--light, #e8e8e8);
    border-radius: 24px;
    box-shadow: 0 2px 16px rgba(0,0,0,.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.pd-tabs-nav {
    display: flex;
    align-items: flex-end;
    gap: 0;
    padding: 0 24px;
    border-bottom: 1.5px solid var(--light, #e8e8e8);
    background: #fafaf9;
    overflow-x: auto;
    scrollbar-width: none;
}
.pd-tabs-nav::-webkit-scrollbar { display: none; }

.pd-tab-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 16px 18px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mid, #6b6b6b);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    background: transparent;
    position: relative;
    transition: color .2s var(--ease);
    letter-spacing: .01em;
}
.pd-tab-link::after {
    content: '';
    position: absolute;
    bottom: -1.5px;
    left: 0; right: 0;
    height: 2.5px;
    background: var(--primary, #09b1ba);
    border-radius: 3px 3px 0 0;
    transform: scaleX(0);
    transition: transform .22s var(--ease);
}
.pd-tab-link:hover { color: var(--dark, #1c1c1c); text-decoration: none; }
.pd-tab-link.active { color: var(--black, #0a0a0a); }
.pd-tab-link.active::after { transform: scaleX(1); }

.pd-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--light, #e8e8e8);
    color: var(--dark, #1c1c1c);
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    transition: background .2s, color .2s;
}
.pd-tab-link.active .pd-tab-badge {
    background: var(--primary, #09b1ba);
    color: var(--white, #fff);
}

/* Tab panes */
.pd-tab-pane        { display: none; padding: 30px 32px; }
.pd-tab-pane.active { display: block; }
@media (max-width: 600px) {
    .pd-tab-pane { padding: 22px 20px; }
}

/* ── Description ── */
.pd-description {
    font-size: 13.5px;
    line-height: 1.85;
    color: var(--mid, #6b6b6b);
}
.pd-description h1,.pd-description h2,.pd-description h3,
.pd-description h4,.pd-description h5 {
    color: var(--dark, #1c1c1c);
    font-weight: 700;
    margin-top: 1.4em;
    margin-bottom: .6em;
}
.pd-description p { margin-bottom: 1em; }
.pd-description img  { max-width: 100%; border-radius: 14px; margin: 8px 0; }
.pd-description iframe { border-radius: 14px; }
.pd-description a { color: var(--dark); text-decoration: underline; }

/* ── Info / Shipping tables ── */
.pd-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    border: 1px solid var(--light, #e8e8e8);
    border-radius: 14px;
    overflow: hidden;
}
.pd-data-table tr { transition: background .15s; }
.pd-data-table tr:hover { background: #fafaf9; }
.pd-data-table tr + tr td { border-top: 1px solid var(--light, #e8e8e8); }
.pd-data-table td {
    padding: 13px 16px;
    color: var(--mid, #6b6b6b);
    vertical-align: top;
}
.pd-data-table td:first-child {
    font-weight: 700;
    color: var(--dark, #1c1c1c);
    width: 36%;
    background: #fafaf9;
    border-right: 1px solid var(--light, #e8e8e8);
}

/* Map */
.pd-map-wrap {
    border-radius: 16px;
    overflow: hidden;
    margin-top: 20px;
    height: 280px;
    border: 1px solid var(--light, #e8e8e8);
}
.pd-map-wrap iframe { width: 100%; height: 100%; border: none; display: block; }

/* ── Reviews container ── */
#review-result { font-size: 13.5px; }

/* ── Comments ── */
.pd-comments-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
@media (max-width: 768px) { .pd-comments-grid { grid-template-columns: 1fr; gap: 28px; } }

.pd-comment-form-head {
    font-size: 14px;
    font-weight: 800;
    color: var(--dark, #1c1c1c);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pd-comment-form-head::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    border-radius: 4px;
    background: var(--dark, #1c1c1c);
    flex-shrink: 0;
}

.pd-comment-form .form-control {
    border-radius: 12px !important;
    border: 1.5px solid var(--light, #e8e8e8) !important;
    font-size: 13px;
    color: var(--dark, #1c1c1c);
    background: #fafaf9;
    transition: border-color .2s, background .2s;
    padding: 10px 14px !important;
}
.pd-comment-form .form-control:focus {
    border-color: var(--dark, #1c1c1c) !important;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,0,0,.06) !important;
    outline: none;
}
.pd-comment-form textarea.form-control { min-height: 110px; resize: vertical; }

/* ================================================================
   PRODUCT SECTIONS — Related / Vendor / Also Like
   Styled as ek-section cards matching home page
   ================================================================ */
.pd-section {
    background: var(--white, #fff);
    border: 1px solid var(--light, #e8e8e8);
    border-radius: 24px;
    box-shadow: 0 2px 16px rgba(0,0,0,.05);
    overflow: hidden;
    margin-bottom: 24px;
    transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.pd-section:hover {
    box-shadow: 0 8px 36px rgba(0,0,0,.09);
    transform: translateY(-2px);
}

.pd-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--light, #e8e8e8);
    background: var(--white, #fff);
    gap: 12px;
}

.pd-section-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--black, #0a0a0a);
    margin: 0;
    letter-spacing: -.01em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.pd-section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: var(--primary, #09b1ba);
    flex-shrink: 0;
    transition: height .25s var(--ease);
}
.pd-section:hover .pd-section-title::before { height: 22px; }

.pd-section-title a {
    color: inherit;
    text-decoration: none;
    transition: color .2s;
}
.pd-section-title a:hover { color: var(--mid, #6b6b6b); }

/* View all pill — matches ek-view-all from home page */
.pd-viewall {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--dark, #1c1c1c) !important;
    text-decoration: none !important;
    background: var(--white, #fff);
    border: 1.5px solid var(--light, #e8e8e8);
    border-radius: 50px;
    padding: 6px 16px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    flex-shrink: 0;
    transition:
        background .22s var(--ease),
        color .22s var(--ease),
        border-color .22s var(--ease),
        transform .28s cubic-bezier(.175,.885,.32,1.275),
        box-shadow .22s var(--ease);
}
.pd-viewall::after { content: '→'; font-size: .78rem; transition: transform .28s cubic-bezier(.175,.885,.32,1.275); }
.pd-viewall:hover {
    background: var(--primary, #09b1ba);
    color: var(--white, #fff) !important;
    border-color: var(--primary, #09b1ba);
    transform: scale(1.06) translateY(-1px);
    box-shadow: 0 4px 16px rgba(9,177,186,.28);
}
.pd-viewall:hover::after { transform: translateX(4px); }

.pd-section-body { padding: 22px 24px; }

/* Grid inside pd-section — 5 cols, tighter cards */
.pd-section .ek-products-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 14px 10px;
}
@media (max-width: 1200px) { .pd-section .ek-products-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .pd-section .ek-products-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .pd-section .ek-products-grid { grid-template-columns: repeat(2, 1fr); } }

/* Ad space */
.pd-ad-space { margin-bottom: 20px; }

/* ================================================================
   STICKY GALLERY HELPER
   ================================================================ */
@media (min-width: 900px) {
    #product_slider_container { position: sticky; top: 90px; }
}

/* ================================================================
   DIVIDER between tab nav and content
   ================================================================ */
.pd-tab-divider {
    height: 1px;
    background: var(--light, #e8e8e8);
    margin: 0 24px;
}

/* ================================================================
   MOBILE OVERRIDES  ≤ 900px
   ================================================================ */
@media (max-width: 900px) {

    /* ── Page wrapper ── */
    .pd-wrapper { padding-bottom: 40px; }

    /* ── Breadcrumb ── */
    /* Base main-1.7.min.css sets height:18px on .breadcrumb — override so wrapped text isn't clipped */
    .pd-breadcrumb .breadcrumb {
        padding-top: 14px;
        font-size: 11px;
        height: auto !important;
        flex-wrap: wrap !important;
        margin-bottom: 12px !important;
    }
    /* Truncate long active item (product title) with ellipsis */
    .pd-breadcrumb .breadcrumb-item.active {
        max-width: 160px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ── Main card ── */
    .pd-main-card { border-radius: 20px; }
    .pd-gallery-col { padding: 18px 16px; }
    .pd-info-col   { padding: 20px 16px 24px; }

    /* ── Gallery: flip to column — thumbnails become horizontal row below main image ── */
    .product-slider-container {
        display: flex !important;
        flex-direction: column-reverse !important; /* main image on top, thumbs below */
        width: 100% !important;
        float: none !important;
        overflow: visible !important;
    }
    .product-slider-container .left {
        display: block !important;
        width: 100% !important;
        padding-right: 0 !important;
        padding-top: 10px;
        overflow: hidden;
    }
    .product-slider-container .right {
        display: block !important;
        width: 100% !important;
    }

    /* Thumbnail strip — horizontal scroll */
    .product-thumbnails-slider .item {
        margin-bottom: 0 !important;
        margin-right: 6px;
    }
    /* Main image: natural proportions (like service details) */
    .product-slider-container .right .product-slider-content {
        height: auto !important;
        margin-bottom: 10px;
    }
    /* Hide the 1×1 transparent placeholder — let the actual image set the height */
    .product-slider .img-bg {
        display: none !important;
    }
    /* Actual product image: full-width, natural aspect ratio */
    .product-slider .img-product-slider {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        max-height: 420px;
        object-fit: contain !important;
        transform: none !important;
        margin: 0 auto !important;
        display: block !important;
    }
    /* Thumbnail strip height */
    .product-slider-container .left .product-slider-content {
        height: 68px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
    }

    /* ── Product title ── */
    .product-content-details .product-title {
        font-size: 18px !important;
        line-height: 26px !important;
        margin-bottom: 8px !important;
    }

    /* ── Meta row (stars / views) ── */
    .product-content-details .meta { margin-bottom: 10px; }
    .product-content-details .meta span {
        float: none !important;
        display: inline-flex !important;
        align-items: center;
        margin-left: 10px !important;
        font-size: 12px !important;
    }
    .product-content-details .product-details-review {
        margin-left: 0 !important;
        display: inline-flex !important;
        align-items: center;
        gap: 4px;
    }

    /* ── Price + contact button row — stack vertically ── */
    .product-content-details .price {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        margin-bottom: 14px !important;
    }
    .product-content-details .price .lbl-price {
        float: none !important;
        font-size: 22px !important;
        line-height: 28px !important;
    }
    .product-content-details .price .discount-original-price {
        font-size: 18px !important;
    }
    .btn-contact-seller {
        float: none !important;
        width: 100% !important;
        text-align: center !important;
        padding: .5rem 1rem !important;
        border-radius: 10px !important;
    }

    /* ── Item details (Status / SKU / Stock rows) ── */
    .product-content-details .details .item-details {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        width: 100% !important;
        float: none !important;
        gap: 8px;
        margin-bottom: 6px !important;
    }
    .product-content-details .details .item-details .left {
        display: block !important;
        width: 110px !important;
        flex-shrink: 0;
    }
    .product-content-details .details .item-details .right {
        display: block !important;
        flex: 1;
        min-width: 0;
    }

    /* ── Add-to-cart area — full-width stacked buttons ── */
    .product-add-to-cart-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }
    .product-add-to-cart-container .number-spinner {
        width: 130px !important;
        float: none !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
    }
    .product-add-to-cart-container .button-container {
        width: 100% !important;
        min-width: 0 !important;
        float: none !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        line-height: normal !important;
    }
    .product-add-to-cart-container .button-container .btn,
    .product-add-to-cart-container .button-container a.btn {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
    }
    .product-add-to-cart-container .button-container-wishlist {
        width: 100% !important;
    }
    .btn-wishlist {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        border: 1.5px solid var(--light, #e8e8e8) !important;
        border-radius: 10px !important;
        padding: .5rem 1rem !important;
        line-height: 1.5 !important;
    }
    .btn-wishlist-classified {
        min-width: 0 !important;
        width: 100% !important;
        border-radius: 10px !important;
    }
    .btn-live-preview {
        border-radius: 10px !important;
    }

    /* ── Trust strip ── */
    .pd-trust-strip {
        gap: 12px !important;
        padding: 12px 16px !important;
        justify-content: space-between !important;
    }
    .pd-trust-item { font-size: 11px !important; gap: 5px !important; }
    .pd-trust-item i { font-size: 13px !important; }

    /* ── Tab nav ── */
    .pd-tabs-nav {
        padding: 0 12px !important;
        gap: 2px !important;
        position: relative;
    }
    .pd-tab-link {
        padding: 11px 12px 10px !important;
        font-size: 11.5px !important;
        letter-spacing: 0 !important;
    }

    /* ── Tab pane ── */
    .pd-tab-pane { padding: 18px 16px !important; }

    /* ── Description text ── */
    .pd-description { font-size: 13px; line-height: 1.75; }

    /* ── Data tables ── */
    .pd-data-table td { padding: 10px 12px; font-size: 12.5px; }
    .pd-data-table td:first-child { width: 40%; }

    /* ── Sections (related / more from vendor) ── */
    .pd-section-head { padding: 14px 16px !important; }
    .pd-section-body { padding: 16px 12px !important; }
    .pd-section-title { font-size: 13px !important; }
}

/* ================================================================
   MOBILE OVERRIDES  ≤ 480px  (phones)
   ================================================================ */
@media (max-width: 480px) {

    /* ── Card corners ── */
    .pd-main-card  { border-radius: 16px; }
    .pd-tabs-wrap  { border-radius: 16px; }
    .pd-section    { border-radius: 16px; }

    /* ── Tab nav: pill-style on phones ── */
    .pd-tabs-nav {
        padding: 8px 10px !important;
        gap: 4px !important;
        border-bottom: none !important;
        background: #f3f3f3 !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .pd-tab-link {
        padding: 7px 13px !important;
        font-size: 11px !important;
        border-radius: 50px !important;
        background: transparent;
        border: 1.5px solid transparent !important;
        transition: background .18s, color .18s, border-color .18s !important;
        white-space: nowrap;
    }
    .pd-tab-link::after { display: none !important; }
    .pd-tab-link.active {
        background: #fff !important;
        color: var(--black, #0a0a0a) !important;
        border-color: var(--light, #e8e8e8) !important;
        box-shadow: 0 1px 6px rgba(0,0,0,.08);
    }
    .pd-tab-link:hover:not(.active) {
        background: rgba(255,255,255,.6) !important;
    }

    /* ── Tab pane ── */
    .pd-tab-pane { padding: 16px 14px !important; }

    /* ── Description ── */
    .pd-description { font-size: 12.5px !important; line-height: 1.7 !important; }
    .pd-description img { border-radius: 10px !important; }

    /* ── Tables ── */
    .pd-data-table td { padding: 9px 10px !important; font-size: 12px !important; }
    .pd-data-table td:first-child { width: 42% !important; }

    /* ── Gallery: main image height is auto; only constrain thumbnail strip ── */
    .product-slider .img-product-slider {
        max-height: 340px;
    }
    .product-slider-container .left .product-slider-content {
        height: 60px !important;
    }

    /* ── Trust strip: 2-column wrap ── */
    .pd-trust-strip {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px 16px !important;
        justify-items: start !important;
    }

    /* ── Info padding ── */
    .pd-gallery-col { padding: 14px 12px !important; }
    .pd-info-col    { padding: 16px 12px 20px !important; }

    /* ── Title ── */
    .product-content-details .product-title {
        font-size: 16px !important;
        line-height: 22px !important;
    }

    /* ── Price ── */
    .product-content-details .price .lbl-price {
        font-size: 20px !important;
    }

    /* ── Related products: 2 columns ── */
    .pd-section .ek-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px 8px !important;
    }
}
