/* ==========================================================================
   Kids Mall - Product Details Page (PDP) Stylesheet
   Separated from PHP template for maximum performance & clean view-source
   ========================================================================== */

/* 1. Gallery Layout & Thumbnails */
.km-pdp-gallery-wrap {
    display: flex !important;
    flex-direction: row !important;
    gap: 16px !important;
    align-items: flex-start !important;
    width: 100% !important;
}
.km-pdp-thumbs-v {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    flex-shrink: 0 !important;
}
.km-pdp-thumb-wrap {
    width: 70px !important;
    height: 70px !important;
    min-width: 70px !important;
    min-height: 70px !important;
    max-width: 70px !important;
    max-height: 70px !important;
    border-radius: 12px !important;
    border: 2px solid #E2E8F0 !important;
    background: #FFFFFF !important;
    padding: 3px !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}
.km-pdp-thumb-wrap:hover,
.km-pdp-thumb-wrap.active {
    border-color: #E5232A !important;
    box-shadow: 0 0 0 3px rgba(229, 35, 42, 0.18) !important;
}
.km-pdp-thumb-item {
    width: 100% !important;
    height: 100% !important;
    max-width: 64px !important;
    max-height: 64px !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    pointer-events: none !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

/* 2. Main Stage Image Display */
.km-pdp-stage {
    position: relative !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 485px !important;
    max-height: 485px !important;
    background: #FFFFFF !important;
    border: 1px solid #EDF2F7 !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(18, 59, 114, 0.04) !important;
}
.km-pdp-stage-img {
    max-width: 100% !important;
    max-height: 435px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.km-pdp-stage:hover .km-pdp-stage-img {
    transform: scale(1.03) !important;
}
.km-pdp-bestseller-badge {
    position: absolute !important;
    top: 16px !important;
    left: 16px !important;
    z-index: 10 !important;
    background-color: #F45AA8 !important;
    color: #FFFFFF !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 20px !important;
    padding: 5px 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    box-shadow: 0 4px 12px rgba(244, 90, 168, 0.35) !important;
}
.km-pdp-expand-btn {
    position: absolute !important;
    bottom: 16px !important;
    right: 16px !important;
    z-index: 10 !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 10px !important;
    border: 1px solid #E2E8F0 !important;
    background: #FFFFFF !important;
    color: #475569 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transition: all 0.2s ease !important;
}
.km-pdp-expand-btn:hover {
    background: #F8FAFC !important;
    color: #E5232A !important;
    transform: scale(1.08) !important;
}
.km-pdp-savings-badge {
    background-color: #DCFCE7 !important;
    color: #16A34A !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    border-radius: 20px !important;
    padding: 3px 10px !important;
    display: inline-flex !important;
    align-items: center !important;
}
.km-pdp-variant-chip {
    border: 1.5px solid #E2E8F0 !important;
    background: #FFFFFF !important;
    color: #1E293B !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 6px 14px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    font-family: 'Outfit', sans-serif !important;
}
.km-pdp-variant-chip:hover,
.km-pdp-variant-chip.active {
    border-color: #E5232A !important;
    background: #FFF5F5 !important;
    color: #E5232A !important;
    box-shadow: 0 0 0 2px rgba(229, 35, 42, 0.15) !important;
}

/* 3. Four Spec Highlight Pills */
.km-pdp-spec-pill {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    border: 1px solid #E2E8F0 !important;
    background: #F8FAFC !important;
    height: 100% !important;
    transition: all 0.2s ease !important;
}
.km-pdp-spec-pill:hover {
    background: #FFFFFF !important;
    border-color: #CBD5E1 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}
.km-pdp-spec-pill-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 15px !important;
    flex-shrink: 0 !important;
}
.km-pdp-spec-pill-label {
    font-size: 11px !important;
    color: #64748B !important;
    line-height: 1.1 !important;
    margin-bottom: 2px !important;
    font-weight: 500 !important;
}
.km-pdp-spec-pill-val {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #123B72 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* 4. Stepper & Action Buttons */
.km-pdp-actions-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
}
.km-pdp-stepper {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border: 1.5px solid #CBD5E1 !important;
    border-radius: 12px !important;
    background: #FFFFFF !important;
    height: 48px !important;
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
    padding: 0 !important;
}
.km-pdp-stepper-btn {
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 48px !important;
    border: none !important;
    background: #F8FAFC !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    padding: 0 !important;
}
.km-pdp-stepper-btn:hover {
    background: #E2E8F0 !important;
    color: #0F172A !important;
}
.km-pdp-stepper-input {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 48px !important;
    border: none !important;
    text-align: center !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    color: #0F172A !important;
    background: #FFFFFF !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
}
.km-btn-add-cart-solid {
    flex: 1 1 180px !important;
    height: 48px !important;
    background: linear-gradient(135deg, #E5232A 0%, #D0181F 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    box-shadow: 0 4px 14px rgba(229, 35, 42, 0.28) !important;
    transition: all 0.2s ease !important;
    font-family: 'Outfit', sans-serif !important;
}
.km-btn-add-cart-solid:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(229, 35, 42, 0.38) !important;
    color: #FFFFFF !important;
}
.km-pdp-btn-buy-now {
    flex: 1 1 130px !important;
    height: 48px !important;
    background: #123B72 !important;
    color: #FFFFFF !important;
    border: none !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    border-radius: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    box-shadow: 0 4px 14px rgba(18, 59, 114, 0.25) !important;
    transition: all 0.2s ease !important;
    font-family: 'Outfit', sans-serif !important;
}
.km-pdp-btn-buy-now:hover {
    background: #0D2B54 !important;
    color: #FFFFFF !important;
    transform: translateY(-1px) !important;
}

/* 5. WhatsApp & Call Soft Action Buttons */
.km-pdp-btn-wa-soft {
    background: #DCFCE7 !important;
    color: #15803D !important;
    border: 1.5px solid #86EFAC !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
    height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    font-family: 'Outfit', sans-serif !important;
}
.km-pdp-btn-wa-soft:hover {
    background: #BBF7D0 !important;
    color: #14532D !important;
    transform: translateY(-1px) !important;
}
.km-pdp-btn-call-soft {
    background: #EFF6FF !important;
    color: #1D4ED8 !important;
    border: 1.5px solid #BFDBFE !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 13.5px !important;
    height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    font-family: 'Outfit', sans-serif !important;
}
.km-pdp-btn-call-soft:hover {
    background: #DBEAFE !important;
    color: #1E40AF !important;
    transform: translateY(-1px) !important;
}

/* 6. Four Mini Trust Badges */
.km-pdp-mini-trust {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    background: #F8FAFC !important;
    border: 1px solid #F1F5F9 !important;
    border-radius: 12px !important;
    height: 100% !important;
}
.km-pdp-mini-trust-icon-box {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 9px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
}
.km-pdp-mini-trust-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #123B72 !important;
    line-height: 1.15 !important;
}
.km-pdp-mini-trust-sub {
    font-size: 10.5px !important;
    color: #64748B !important;
    line-height: 1.15 !important;
}

/* 7. Hide Colliding Floating Buttons on PDP */
#floating-whatsapp-btn,
#floating-call-btn,
#floating-back-to-top,
.whatsapp-float,
.scroll-to-top,
.call-float-btn {
    display: none !important;
}

/* 8. Tabs */
.km-pdp-ref-tabs {
    display: flex !important;
    gap: 8px !important;
    border-bottom: 2px solid #F1F5F9 !important;
    padding-bottom: 0 !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
}
.km-pdp-ref-tab-btn {
    border: none !important;
    background: transparent !important;
    padding: 12px 18px !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    color: #64748B !important;
    position: relative !important;
    cursor: pointer !important;
    font-family: 'Outfit', sans-serif !important;
    transition: all 0.2s ease !important;
    border-bottom: 3px solid transparent !important;
    margin-bottom: -2px !important;
}
.km-pdp-ref-tab-btn:hover {
    color: #123B72 !important;
}
.km-pdp-ref-tab-btn.active {
    color: #E5232A !important;
    font-weight: 700 !important;
    border-bottom-color: #E5232A !important;
}

/* 9. Related Products Carousel */
.km-pdp-products-carousel {
    display: flex !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    gap: 16px !important;
    padding-bottom: 12px !important;
    padding-top: 4px !important;
    scrollbar-width: thin !important;
    -webkit-overflow-scrolling: touch !important;
}
.km-pdp-carousel-card {
    flex: 0 0 220px !important;
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
}
.km-pdp-rel-card {
    background: #FFFFFF !important;
    border: 1.5px solid #E2E8F0 !important;
    border-radius: 16px !important;
    padding: 12px !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
}
.km-pdp-rel-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 24px rgba(18, 59, 114, 0.08) !important;
    border-color: #CBD5E1 !important;
}
.km-pdp-rel-img-box {
    width: 100% !important;
    height: 160px !important;
    max-height: 160px !important;
    background: #F8FAFC !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 10px !important;
    position: relative !important;
}
.km-pdp-rel-img {
    max-width: 100% !important;
    max-height: 140px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    transition: transform 0.25s ease !important;
    display: block !important;
    margin: 0 auto !important;
}
.km-pdp-rel-card:hover .km-pdp-rel-img {
    transform: scale(1.06) !important;
}
.km-pdp-rel-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #123B72 !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 34px !important;
}

/* 10. Sticky Mobile Buy Bar */
.km-pdp-sticky-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 8px 16px calc(env(safe-area-inset-bottom, 0px) + 8px) 16px;
    z-index: 1040;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
.km-pdp-sticky-bar.visible {
    display: block !important;
}

/* 11. Responsive Breakpoints */
@media (max-width: 767.98px) {
    .km-pdp-gallery-wrap {
        flex-direction: column-reverse !important;
    }
    .km-pdp-thumbs-v {
        flex-direction: row !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        padding-bottom: 6px !important;
    }
    .km-pdp-stage {
        height: 360px !important;
        max-height: 360px !important;
    }
    .km-pdp-stage-img {
        max-height: 310px !important;
    }
    .km-pdp-carousel-card {
        flex: 0 0 170px !important;
        width: 170px !important;
        min-width: 170px !important;
        max-width: 170px !important;
    }
    .km-pdp-rel-img-box {
        height: 130px !important;
        max-height: 130px !important;
    }
    .km-pdp-rel-img {
        max-height: 110px !important;
    }
    .mobile-bottom-nav,
    .km-mobile-bottom-nav {
        display: none !important;
    }
    body {
        padding-bottom: 74px !important;
    }
}

@media (max-width: 575.98px) {
    .km-pdp-actions-wrap {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
    }
    .km-pdp-stepper {
        width: 95px !important;
        min-width: 95px !important;
        max-width: 95px !important;
        height: 44px !important;
        flex-shrink: 0 !important;
    }
    .km-pdp-stepper-btn {
        width: 28px !important;
        min-width: 28px !important;
        height: 44px !important;
        font-size: 16px !important;
    }
    .km-pdp-stepper-input {
        width: 36px !important;
        min-width: 36px !important;
        height: 44px !important;
        font-size: 15px !important;
    }
    .km-btn-add-cart-solid {
        flex: 1 1 auto !important;
        height: 44px !important;
        font-size: 13.5px !important;
        padding: 0 10px !important;
        white-space: nowrap !important;
    }
    .km-pdp-btn-buy-now {
        flex: 1 1 auto !important;
        height: 44px !important;
        font-size: 13.5px !important;
        padding: 0 10px !important;
        white-space: nowrap !important;
    }
    .km-pdp-spec-pill {
        padding: 8px 10px !important;
        gap: 8px !important;
    }
    .km-pdp-spec-pill-icon {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        font-size: 13px !important;
    }
    .km-pdp-spec-pill-label {
        font-size: 10px !important;
    }
    .km-pdp-spec-pill-val {
        font-size: 12px !important;
    }
    .km-pdp-btn-wa-soft,
    .km-pdp-btn-call-soft {
        font-size: 12px !important;
        height: 40px !important;
        padding: 0 8px !important;
        gap: 5px !important;
    }
    .km-pdp-mini-trust {
        padding: 8px 8px !important;
        gap: 6px !important;
    }
    .km-pdp-mini-trust-icon-box {
        width: 26px !important;
        height: 26px !important;
        min-width: 26px !important;
        font-size: 12px !important;
    }
    .km-pdp-mini-trust-title {
        font-size: 10.5px !important;
    }
    .km-pdp-mini-trust-sub {
        font-size: 9px !important;
    }
}
