/* ==========================================
   Maxnor Shop - Product Detail Page Styles
   ========================================== */

.product-detail-page {
    padding: 24px 0 60px;
    background: var(--bg-light);
    min-height: 60vh;
}

/* Loading */
.product-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    gap: 16px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Error */
.product-error {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-box {
    text-align: center;
    padding: 60px 20px;
}

.error-box i {
    font-size: 3.5rem;
    color: #f59e0b;
    margin-bottom: 16px;
}

.error-box h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.error-box p {
    color: var(--text-muted);
    margin-bottom: 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .fa-chevron-right {
    font-size: 0.6rem;
    opacity: 0.4;
}

.breadcrumb span {
    color: var(--text-dark);
    font-weight: 600;
}

/* === Product Detail Grid === */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
}

/* Image Section - Optimized for Landscape Banners */
.product-detail-image {
    position: static;
    width: 100%;
}

.image-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    border: 1px solid var(--border);
    position: relative;
    width: 100%;
    cursor: zoom-in;
    transition: box-shadow 0.2s ease;
}

.image-wrapper:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    display: block;
}

/* Info Section */
.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-detail-info h1 {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.3;
}

/* === Short Description Highlights Box (Reference Image 1) === */
.product-features-box {
    background: #f0f7ff;
    border: 1px solid #d0e7ff;
    border-radius: 12px;
    padding: 16px 20px;
}

.product-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.94rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.5;
}

.feature-check-icon {
    color: #0284c7;
    font-weight: 800;
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* === Pricing Section (Reference Image 1) === */
.product-price-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.product-price-symbol {
    font-size: 1.7rem;
    font-weight: 800;
    color: #0284c7;
}

.product-price-current {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0284c7;
    line-height: 1;
}

.product-price-regular {
    font-size: 1.15rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 600;
}

.product-stock-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.badge-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-stock.in-stock {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.badge-stock.stock-out {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.stock-indicator-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

.badge-sold {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 50px;
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #ffedd5;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-sold i {
    color: #ea580c;
}

/* === Duration / Plan Variations Section (Matching Reference Image) === */
.product-plans-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0 16px;
    padding: 0;
}

.plans-label {
    font-size: 0.78rem;
    font-weight: 800;
    color: #334155;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.plans-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.plan-btn {
    padding: 8px 20px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.plan-btn:hover {
    border-color: #0284c7;
    color: #0284c7;
    background: #f0f9ff;
}

.plan-btn.active {
    border-color: #0284c7;
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25), 0 2px 4px rgba(2, 132, 199, 0.1);
}

/* === Quantity Picker & Buy Now Row (Reference Image 1) === */
.purchase-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.quantity-picker {
    display: inline-flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    height: 48px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-qty {
    width: 44px;
    height: 100%;
    background: transparent;
    border: none;
    color: #475569;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-qty:hover:not(:disabled) {
    background: #f1f5f9;
    color: #0284c7;
}

.btn-qty:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.qty-display {
    min-width: 44px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    user-select: none;
}

.btn-buy-primary {
    flex: 1;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #16a34a;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}

.btn-buy-primary:hover:not(:disabled) {
    background: #15803d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
}

.btn-buy-primary:disabled,
.btn-buy-primary.disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* === Trust / Perks Checklist & Live Chat (Side by Side) === */
.product-perks-query-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 28px;
    margin-top: 6px;
}

.product-perks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.perk-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 500;
}

.perk-item i {
    color: #16a34a;
    font-size: 0.82rem;
}

.query-action-row {
    margin: 0;
    display: flex;
    align-items: center;
}

.btn-whatsapp-query {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(37, 211, 102, 0.08);
    color: #15803d;
    border: 1.5px solid #25d366;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-whatsapp-query:hover {
    background: #25d366;
    color: #ffffff;
}

/* === Description Section (Reference Image 2) === */
.product-description-section {
    margin-top: 40px;
}

.description-section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.desc-pipe {
    color: #0284c7;
    font-weight: 900;
    font-size: 1.5rem;
    line-height: 1;
}

.description-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.description-body {
    padding: 32px;
    font-size: 0.94rem;
    color: var(--text-body);
    line-height: 1.9;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.description-body p {
    margin-bottom: 12px;
}

/* === Responsive === */
@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .product-detail-image {
        position: static;
        width: 100%;
    }

    .image-wrapper {
        border-radius: 12px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        border: 1px solid var(--border);
        width: 100%;
    }

    .image-wrapper img {
        min-height: unset;
        max-height: unset;
        width: 100%;
        height: auto;
        object-fit: contain;
        display: block;
    }

    .product-detail-info h1 {
        font-size: 1.4rem;
    }

    .detail-price {
        font-size: 1.6rem;
    }

    .detail-actions {
        flex-direction: column;
    }

    .btn-order-now,
    .btn-whatsapp-contact {
        width: 100%;
        justify-content: center;
    }

    .description-body {
        padding: 20px;
        font-size: 0.88rem;
    }
}

@media (max-width: 480px) {
    .product-detail-page {
        padding: 16px 0 40px;
    }

    .product-detail-info h1 {
        font-size: 1.2rem;
    }

    .detail-price {
        font-size: 1.4rem;
    }

    .detail-price-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .trust-badges {
        flex-direction: column;
        gap: 10px;
    }

    .product-perks-query-row {
        gap: 16px;
    }

    .btn-whatsapp-query {
        padding: 9px 16px;
        font-size: 0.82rem;
    }

    .breadcrumb {
        font-size: 0.75rem;
    }

    .description-header {
        padding: 14px 18px;
    }

    .description-body {
        padding: 16px;
        font-size: 0.85rem;
    }
}

/* === Fullscreen Image Lightbox === */
.image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.image-lightbox.active {
    display: flex;
    opacity: 1;
}

.image-lightbox img {
    max-width: 98%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    object-fit: contain;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: none;
    font-size: 2rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
    z-index: 100000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.35);
}
