/* ==========================================================================
   Product Detail Page: Luxury Bento & Glassmorphism Design
   ========================================================================== */

.product-detail-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 4rem;
}

@media (min-width: 992px) {
    .product-detail-container {
        grid-template-columns: 1.05fr 1.25fr;
        gap: 3rem;
        align-items: start;
    }
}

/* --------------------------------------------------------------------------
   Breadcrumb Navigation
   -------------------------------------------------------------------------- */
.detail-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 30px;
    padding: 0.5rem 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    backdrop-filter: blur(8px);
}

.detail-breadcrumb a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.detail-breadcrumb a:hover {
    color: #f39c12;
}

.detail-breadcrumb .sep {
    color: #4b5563;
    font-size: 0.75rem;
}

.detail-breadcrumb .current {
    color: #e5e7eb;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Left: Photo Gallery Bento Box
   -------------------------------------------------------------------------- */
.product-gallery-wrapper {
    position: sticky;
    top: 2rem;
}

.product-main-image-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(165deg, #1c1c27 0%, #111118 100%);
    border: 1px solid rgba(243, 156, 18, 0.25);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(243, 156, 18, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-main-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-main-image-card:hover img {
    transform: scale(1.04);
}

/* Floating Badges on top of Main Image */
.gallery-badges-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 5;
}

.gallery-badge {
    background: rgba(12, 12, 18, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.gallery-badge.badge-stock-in {
    border-color: rgba(46, 204, 113, 0.6);
    color: #2ecc71;
}

.gallery-badge.badge-stock-low {
    border-color: rgba(243, 156, 18, 0.6);
    color: #f39c12;
}

.gallery-badge.badge-stock-out {
    border-color: rgba(231, 76, 60, 0.6);
    color: #e74c3c;
}

/* Thumbnails Ribbon */
.gallery-thumbnails-strip {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding: 0.25rem;
    scrollbar-width: thin;
}

.gallery-thumbnails-strip::-webkit-scrollbar {
    height: 4px;
}
.gallery-thumbnails-strip::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.gallery-thumb-item {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #191924;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.gallery-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb-item:hover {
    border-color: rgba(243, 156, 18, 0.6);
    transform: translateY(-2px);
}

.gallery-thumb-item.active {
    border-color: #f39c12;
    box-shadow: 0 0 16px rgba(243, 156, 18, 0.55);
    transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   Right: Product Details Info Bento Box
   -------------------------------------------------------------------------- */
.product-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 0;
}

.product-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.product-meta-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    color: #9ca3af;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.product-meta-chip strong {
    color: #e5e7eb;
}

/* --------------------------------------------------------------------------
   Live Price & Interactive Calculator Bento Card
   -------------------------------------------------------------------------- */
.price-calc-card {
    background: linear-gradient(165deg, rgba(28, 28, 38, 0.85) 0%, rgba(18, 18, 26, 0.95) 100%);
    border: 1px solid rgba(243, 156, 18, 0.3);
    border-radius: 24px;
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(243, 156, 18, 0.08);
}

.unit-price-display {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
}

.current-unit-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: #f39c12;
    text-shadow: 0 0 16px rgba(243, 156, 18, 0.35);
}

.old-unit-price {
    font-size: 1.35rem;
    color: #ef4444;
    text-decoration: line-through;
    opacity: 0.8;
}

.savings-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.5);
    color: #2ecc71;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    margin-top: 0.25rem;
}

/* --------------------------------------------------------------------------
   Wholesale Tiers Bento Grid (B2B)
   -------------------------------------------------------------------------- */
.wholesale-tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
}

.wholesale-tier-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    padding: 0.85rem 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.wholesale-tier-card:hover {
    border-color: rgba(243, 156, 18, 0.5);
    background: rgba(243, 156, 18, 0.08);
    transform: translateY(-2px);
}

.wholesale-tier-card.tier-active {
    border-color: #f39c12;
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.18), rgba(230, 126, 34, 0.25));
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.35);
    transform: scale(1.03);
}

.tier-label {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 0.3rem;
}

.wholesale-tier-card.tier-active .tier-label {
    color: #f39c12;
    font-weight: 700;
}

.tier-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
}

.wholesale-tier-card.tier-active .tier-price {
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   Upsell Alert & B2B Banner
   -------------------------------------------------------------------------- */
.upsell-alert {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.15), rgba(230, 126, 34, 0.2));
    border: 1px solid rgba(243, 156, 18, 0.45);
    border-radius: 16px;
    padding: 0.75rem 1.1rem;
    color: #f39c12;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.1);
}

.b2b-promo-banner {
    background: linear-gradient(135deg, rgba(28, 28, 38, 0.9), rgba(18, 18, 26, 0.95));
    border: 1px solid rgba(243, 156, 18, 0.35);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   Quantity Controls & Action Buttons
   -------------------------------------------------------------------------- */
.detail-qty-stepper {
    display: inline-flex;
    align-items: center;
    background: rgba(12, 12, 18, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 4px 6px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4);
}

.detail-qty-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #f39c12;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.detail-qty-btn:hover:not(:disabled) {
    background: rgba(243, 156, 18, 0.25);
    transform: scale(1.1);
}

.detail-qty-btn:active:not(:disabled) {
    transform: scale(0.9);
}

.detail-qty-btn:disabled {
    color: #555;
    cursor: not-allowed;
}

.detail-qty-input {
    width: 60px;
    text-align: center;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    outline: none;
    -moz-appearance: textfield;
}

.detail-qty-input::-webkit-outer-spin-button,
.detail-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-add-cart-main {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border: none;
    color: #121216;
    border-radius: 30px;
    padding: 0.95rem 1.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(243, 156, 18, 0.45);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-add-cart-main:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(243, 156, 18, 0.65);
    filter: brightness(1.08);
}

.btn-add-cart-main:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.btn-quick-buy-detail {
    background: rgba(18, 18, 26, 0.9);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(243, 156, 18, 0.7);
    color: #f39c12;
    border-radius: 30px;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-quick-buy-detail:hover:not(:disabled) {
    background: #f39c12;
    color: #121216;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(243, 156, 18, 0.5);
}

.btn-quick-buy-detail:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

/* --------------------------------------------------------------------------
   Trust & Benefits Bento Grid (3 micro cards)
   -------------------------------------------------------------------------- */
.detail-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 576px) {
    .detail-benefits-grid {
        grid-template-columns: 1fr;
    }
}

.benefit-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.benefit-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(243, 156, 18, 0.4);
    transform: translateY(-2px);
}

.benefit-icon {
    font-size: 1.35rem;
    color: #f39c12;
    flex-shrink: 0;
}

.benefit-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: #ffffff;
    margin-bottom: 0.1rem;
}

.benefit-sub {
    font-size: 0.72rem;
    color: #9ca3af;
    line-height: 1.25;
}

/* --------------------------------------------------------------------------
   Description Bento Box
   -------------------------------------------------------------------------- */
.product-description-bento {
    background: linear-gradient(165deg, rgba(28, 28, 38, 0.6) 0%, rgba(18, 18, 26, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.product-description-box {
    position: relative;
    font-size: 1rem;
    line-height: 1.75;
    color: #d1d5db;
    max-height: 160px;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.product-description-box.is-expanded {
    max-height: 2500px;
}

.product-description-box:not(.is-expanded)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(to bottom, transparent, rgba(18, 18, 26, 0.98));
    pointer-events: none;
}

.btn-toggle-description {
    background: rgba(243, 156, 18, 0.1);
    border: 1px solid rgba(243, 156, 18, 0.3);
    color: #f39c12;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    transition: all 0.2s ease;
}

.btn-toggle-description:hover {
    background: rgba(243, 156, 18, 0.25);
    border-color: #f39c12;
}
