/* ================================================================
   OH!SOME PRODUCT DETAIL PAGE CSS (Modern Retail Experience)
   Breakpoints: ≥1024 Desktop | 768-1023 Tablet | <768 Mobile
   ================================================================ */

.ohsome-product-page {
    background: #F8F9FA;
    min-height: 85vh;
    padding-bottom: 60px;
}

/* Breadcrumb Navigation */
.product-breadcrumb-bar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #6B7280;
    flex-wrap: wrap;
}
.breadcrumb-link {
    color: #6B7280;
    text-decoration: none;
    transition: color 0.15s;
}
.breadcrumb-link:hover { color: #111315; }
.breadcrumb-sep { color: #D1D5DB; font-size: 0.7rem; }
.breadcrumb-current {
    color: #111315;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

/* Main Product Layout */
.product-detail-container {
    max-width: 1280px;
    margin: 12px auto 0;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 36px;
    box-sizing: border-box;
}

/* Loading & Error States */
.product-loading-skeleton, .product-error-box {
    max-width: 1280px;
    margin: 40px auto;
    padding: 40px 24px;
    text-align: center;
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #F0F0F0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.skeleton-spinner {
    font-size: 2.2rem;
    color: #FFD12F;
    animation: spin 1s infinite linear;
    display: inline-block;
    margin-bottom: 12px;
}
@keyframes spin { 100% { transform: rotate(360deg); } }
.skeleton-text { font-size: 0.92rem; font-weight: 700; color: #4B5563; }

.product-error-box i { font-size: 3rem; color: #EF4444; margin-bottom: 12px; display: block; }
.error-title { font-size: 1.25rem; font-weight: 900; color: #111315; margin: 0 0 8px; }
.error-sub { font-size: 0.88rem; color: #6B7280; margin: 0 0 20px; }
.btn-back-catalog {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 999px;
    background: #FFD12F;
    color: #111315;
    font-weight: 800;
    font-size: 0.84rem;
    text-decoration: none;
}

/* Left Column: Gallery */
.product-gallery-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 80px;
    height: fit-content;
}
.product-main-frame {
    position: relative;
    width: 100%;
    height: 480px;
    border-radius: 20px;
    background: #FFFFFF;
    border: 1.5px solid #F0F0F0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.35s ease;
}
.product-main-frame:hover .main-img {
    transform: scale(1.05);
}

.gallery-badges-overlay {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 5;
}
.gallery-badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.gallery-badge.official { background: #111315; color: #FFD12F; }
.gallery-badge.guarantee { background: #10B981; color: #FFFFFF; }

.thumbs-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px;
    scrollbar-width: thin;
}
.thumb-btn {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    border: 2px solid #E5E7EB;
    background: #FFFFFF;
    overflow: hidden;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    transition: all 0.15s;
}
.thumb-btn.active, .thumb-btn:hover {
    border-color: #FFC700;
    box-shadow: 0 0 0 2px rgba(255, 199, 0, 0.3);
}
.thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gallery-extra-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    font-size: 0.8rem;
}
.extra-action-btn {
    background: transparent;
    border: none;
    color: #6B7280;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    transition: color 0.15s;
}
.extra-action-btn:hover { color: #111315; }
.extra-action-btn i { font-size: 0.95rem; }

/* Right Column: Info & Purchase */
.product-info-col {
    background: #FFFFFF;
    border-radius: 20px;
    border: 1.5px solid #F0F0F0;
    padding: 32px 36px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.prod-eyebrow-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.prod-badge-cat {
    padding: 3px 10px;
    border-radius: 999px;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #B45309;
    font-size: 0.72rem;
    font-weight: 800;
}
.prod-badge-brand {
    padding: 3px 10px;
    border-radius: 999px;
    background: #F3F4F6;
    color: #374151;
    font-size: 0.72rem;
    font-weight: 800;
}
.prod-badge-official {
    font-size: 0.72rem;
    font-weight: 800;
    color: #0284C7;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: auto;
}

.prod-title {
    font-size: clamp(1.4rem, 2.8vw, 1.95rem);
    font-weight: 900;
    color: #111315;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.prod-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: #6B7280;
    flex-wrap: wrap;
    border-bottom: 1px solid #F3F4F6;
    padding-bottom: 16px;
}
.meta-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #D97706;
    font-weight: 800;
}
.meta-sku, .meta-barcode {
    font-family: monospace;
    color: #6B7280;
    font-size: 0.78rem;
}

/* Price Box */
.prod-price-box {
    background: linear-gradient(135deg, #FFFDF0 0%, #FEF9C3 100%);
    border: 1px solid #FDE68A;
    border-radius: 14px;
    padding: 18px 24px;
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
}
.prod-price-main {
    font-size: clamp(1.7rem, 3.2vw, 2.3rem);
    font-weight: 900;
    color: #111315;
    letter-spacing: -0.02em;
    line-height: 1;
}
.prod-price-struck {
    font-size: 1.05rem;
    color: #9CA3AF;
    text-decoration: line-through;
    font-weight: 600;
}
.prod-discount-tag {
    background: #EF4444;
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.04em;
}

/* Stock Status */
.prod-stock-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.prod-stock-pill {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.prod-stock-pill.in-stock {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}
.prod-stock-pill.out-of-stock {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

/* Quantity Stepper */
.prod-quantity-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.quantity-label {
    font-size: 0.84rem;
    font-weight: 800;
    color: #111315;
}
.quantity-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    background: #FFFFFF;
    overflow: hidden;
}
.stepper-btn {
    width: 38px;
    height: 38px;
    background: #F9FAFB;
    border: none;
    font-size: 1rem;
    font-weight: 800;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stepper-btn:hover { background: #F3F4F6; }
.stepper-input {
    width: 52px;
    height: 38px;
    border: none;
    outline: none;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: #111315;
    background: transparent;
}
.subtotal-preview {
    font-size: 0.82rem;
    color: #6B7280;
}
.subtotal-preview strong { color: #111315; font-size: 0.95rem; }

/* Buttons Row */
.prod-buttons-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 12px;
}
.btn-add-cart {
    height: 50px;
    border-radius: 12px;
    background: #FFD12F;
    color: #111315;
    font-size: 0.92rem;
    font-weight: 900;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(255, 209, 47, 0.4);
    transition: background 0.15s, transform 0.15s;
}
.btn-add-cart:hover {
    background: #FCC800;
    transform: translateY(-2px);
}
.btn-buy-now {
    height: 50px;
    border-radius: 12px;
    background: #111315;
    color: #FFFFFF;
    font-size: 0.92rem;
    font-weight: 900;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s, transform 0.15s;
}
.btn-buy-now:hover {
    background: #000000;
    transform: translateY(-2px);
}
.btn-chat-wa {
    height: 44px;
    border-radius: 10px;
    background: #ECFDF5;
    color: #065F46;
    border: 1.5px solid #A7F3D0;
    font-size: 0.84rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.15s;
    grid-column: 1 / -1;
}
.btn-chat-wa:hover {
    background: #D1FAE5;
    color: #047857;
}

/* Trust Features Grid */
.prod-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    border-top: 1px solid #F3F4F6;
    padding-top: 20px;
}
.trust-mini-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    background: #FAFAFA;
    font-size: 0.72rem;
    font-weight: 700;
    color: #374151;
    line-height: 1.35;
}
.trust-mini-card i { font-size: 1.1rem; color: #10B981; flex-shrink: 0; }

/* Tabs Section (Description, Specs, Reviews) */
.product-tabs-section {
    max-width: 1280px;
    margin: 36px auto 0;
    padding: 0 24px;
    box-sizing: border-box;
}
.tabs-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 24px;
}
.tab-btn {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.15s;
}
.tab-btn.active {
    color: #111315;
    border-bottom-color: #FFD12F;
}
.tab-content {
    background: #FFFFFF;
    border-radius: 18px;
    border: 1.5px solid #F0F0F0;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.desc-text {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #374151;
    margin: 0 0 20px;
}
.desc-features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}
.desc-feat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: #4B5563;
}
.desc-feat-item i { color: #10B981; }

.specs-table {
    width: 100%;
    border-collapse: collapse;
}
.specs-table tr { border-bottom: 1px solid #F3F4F6; }
.specs-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.82rem;
    font-weight: 800;
    color: #6B7280;
    width: 200px;
}
.specs-table td {
    padding: 12px 16px;
    font-size: 0.86rem;
    font-weight: 700;
    color: #111315;
}

/* Related Products Section */
.product-related-section {
    max-width: 1280px;
    margin: 36px auto 0;
    padding: 0 24px;
    box-sizing: border-box;
}
.related-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.related-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: #111315;
    margin: 0;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.related-card {
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #F0F0F0;
    padding: 14px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.related-img-wrap {
    width: 100%;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    background: #F9FAFB;
    display: flex;
    align-items: center;
    justify-content: center;
}
.related-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.related-name {
    font-size: 0.84rem;
    font-weight: 800;
    color: #111315;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.related-price {
    font-size: 0.95rem;
    font-weight: 900;
    color: #D97706;
}

/* Mobile Sticky Bottom Purchase Bar */
.mobile-product-bottom-bar {
    display: none;
}

/* Responsive */
@media (max-width: 1023px) {
    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .product-gallery-col { position: static; }
    .product-main-frame { height: 380px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .product-breadcrumb-bar { padding: 12px 16px 4px; font-size: 0.74rem; }
    .product-detail-container { padding: 0 16px; }
    .product-main-frame { height: 280px; border-radius: 16px; }
    .product-info-col { padding: 20px 16px; border-radius: 16px; gap: 16px; }
    .prod-title { font-size: 1.25rem; }
    .prod-price-main { font-size: 1.6rem; }
    .prod-trust-grid { grid-template-columns: 1fr; gap: 8px; }
    .desc-features-list { grid-template-columns: 1fr; }
    .product-tabs-section { padding: 0 16px; }
    .tab-content { padding: 20px 16px; border-radius: 14px; }
    .specs-table th { width: 120px; font-size: 0.75rem; padding: 10px 8px; }
    .specs-table td { font-size: 0.78rem; padding: 10px 8px; }
    .product-related-section { padding: 0 16px; }

    /* Mobile Bottom Sticky Action Bar */
    body { padding-bottom: 70px !important; }
    .mobile-product-bottom-bar {
        display: flex !important;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        background: #FFFFFF;
        border-top: 1px solid #E5E7EB;
        box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
        align-items: center;
        gap: 8px;
    }
    .mobile-wa-btn {
        width: 44px;
        height: 44px;
        border-radius: 10px;
        background: #ECFDF5;
        color: #065F46;
        border: 1px solid #A7F3D0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.3rem;
        flex-shrink: 0;
        text-decoration: none;
    }
    .mobile-cart-btn {
        flex: 1;
        height: 44px;
        border-radius: 10px;
        background: #FFFBEB;
        color: #B45309;
        border: 1.5px solid #FDE68A;
        font-size: 0.8rem;
        font-weight: 800;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        cursor: pointer;
    }
    .mobile-buy-btn {
        flex: 1.1;
        height: 44px;
        border-radius: 10px;
        background: #FFD12F;
        color: #111315;
        border: none;
        font-size: 0.82rem;
        font-weight: 900;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        cursor: pointer;
    }
}

/* ==========================================================
   FLY-TO-CART ANIMATION & FEEDBACK
   ========================================================== */
.fly-cart-bubble {
    position: fixed;
    z-index: 9999999;
    pointer-events: none;
    border-radius: 50%;
    overflow: hidden;
    width: 60px;
    height: 60px;
    background: #ffffff;
    border: 3px solid #FFD12F;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25), 0 0 20px rgba(255, 209, 47, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform, opacity;
}
.fly-cart-bubble img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.cart-bounce-pop {
    animation: cartBouncePop 0.65s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}
@keyframes cartBouncePop {
    0% { transform: scale(1); }
    35% { transform: scale(1.35) rotate(-10deg); color: #FF6B00; }
    65% { transform: scale(1.2) rotate(8deg); }
    85% { transform: scale(0.95) rotate(-2deg); }
    100% { transform: scale(1); }
}

.cart-badge-bounce {
    animation: badgeBounce 0.55s ease-out !important;
}
@keyframes badgeBounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.6); background: #EF4444; color: #FFF; box-shadow: 0 0 14px rgba(239, 68, 68, 0.7); }
    100% { transform: scale(1); }
}

.cart-plus-one {
    position: fixed;
    z-index: 9999999;
    pointer-events: none;
    font-size: 0.85rem;
    font-weight: 900;
    color: #15803d;
    background: #dcfce7;
    border: 1px solid #86efac;
    padding: 2px 8px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    animation: floatUpFade 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes floatUpFade {
    0% { transform: translate(-50%, 0) scale(0.6); opacity: 0; }
    30% { transform: translate(-50%, -10px) scale(1.15); opacity: 1; }
    80% { transform: translate(-50%, -24px) scale(1); opacity: 0.9; }
    100% { transform: translate(-50%, -36px) scale(0.85); opacity: 0; }
}

/* Toast Notification */
.product-toast {
    position: fixed;
    bottom: 84px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    background: #111315;
    color: #FFFFFF;
    padding: 12px 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    font-weight: 800;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}
.product-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.product-toast i {
    font-size: 1.1rem;
    color: #FFD12F;
}
.product-toast.success i {
    color: #10B981;
}

/* Wishlist Active */
.extra-action-btn.active-wishlist {
    color: #EF4444 !important;
}
.extra-action-btn.active-wishlist i {
    color: #EF4444 !important;
}
