/*
 * Storefront redesign — Phase 5: Product Details Page
 * ---------------------------------------------------------------------------
 * Additive stylesheet, loaded only on the product details page via its own
 * @push('css') stack (see details.blade.php). Reads colors/spacing/radius
 * from theme-tokens.css (Phase 2). Restyles existing elements cosmetically
 * (color/spacing/radius/shadow only) and adds new classes for the sections
 * introduced in this phase (price card, stock badge, bulk CTA, trust cards).
 * It does not touch the gallery slider, thumbnail click-to-slide, quantity
 * stepper, or variant-selector JS — those keep working off their original
 * classes/ids.
 */

.main-details-page {
    background: var(--surface-bg-soft);
    padding-top: var(--space-6);
    padding-bottom: var(--space-2);
}

/* ---------------------------------------------------------------------- */
/* Gallery (left column)                                                  */
/* ---------------------------------------------------------------------- */

.pdp-gallery {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-5);
}

.pdp-gallery .details_slider {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.dimage_item img {
    border-radius: var(--radius-md);
}

.indicator_thumb {
    margin-top: var(--space-4);
}

.indicator-item {
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.indicator-item:hover {
    border-color: var(--brand-primary);
}

.product-details-discount-badge span.sale-badge-text {
    background-color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

/* ---------------------------------------------------------------------- */
/* Info column (right column)                                            */
/* ---------------------------------------------------------------------- */

.pdp-info {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-5) var(--space-6);
    font-family: var(--font-base);
}

.pdp-info .breadcrumb ul li a,
.pdp-info .breadcrumb ul li span {
    color: var(--text-muted);
    font-size: 13px;
}

.pdp-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--text-strong);
    text-transform: none !important;
    margin-bottom: var(--space-2) !important;
}

.pdp-rating {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4) !important;
}

.pdp-rating i {
    color: #f5a623;
}

.pdp-rating .all-reviews-button {
    color: var(--brand-primary);
    font-size: 13px;
    margin-left: var(--space-2);
}

/* Pricing card ---------------------------------------------------------- */

.pdp-price-card {
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-4);
}

.pdp-price-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.pdp-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
}

.pdp-badge--save {
    background: rgba(184, 134, 59, 0.12);
    color: var(--brand-primary-dark);
}

.pdp-badge--offer {
    background: var(--color-danger);
    color: #fff;
}

.pdp-price-card__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 4px 0;
}

.pdp-price-card__row--current {
    padding-top: var(--space-2);
    border-top: 1px dashed var(--surface-border);
    margin-top: var(--space-2);
    flex-wrap: wrap;
    gap: var(--space-2);
}

.pdp-price-card__label {
    font-size: 13px;
    color: var(--text-muted);
}

.pdp-price-card__value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-body);
}

.pdp-price-card__value--old {
    text-decoration: line-through;
    color: var(--text-muted);
    font-weight: 500;
}

.pdp-price-card__value--current {
    font-size: 28px;
    font-weight: 800;
    color: var(--brand-primary-dark);
}

.pdp-discount-pill {
    background: var(--nav-bg);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
}

.pdp-stock {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-3);
    font-size: 13px;
    font-weight: 600;
}

.pdp-stock--in {
    color: var(--color-success);
}

.pdp-stock--out {
    color: var(--color-danger);
}

/* Flash Deal state ------------------------------------------------------- */
/* Additive only — the non-flash-deal price card markup/classes above are
   completely unchanged, this just adds a state for when Product Details
   resolves an active FlashDealProduct server-side. */

.pdp-price-card--flash {
    border-color: var(--color-danger);
    background: linear-gradient(180deg, rgba(192, 57, 43, 0.06), var(--surface-bg-soft) 60%);
}

.pdp-badge--flash {
    background: var(--color-danger);
    color: #fff;
}

.pdp-price-card__row--flash {
    border-top-style: solid;
}

.pdp-price-card__value--flash {
    color: var(--color-danger);
}

.pdp-flash-countdown {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: var(--space-3);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    background: var(--nav-bg);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.pdp-flash-countdown__label {
    color: var(--nav-text-muted, #a7a9b2);
}

.pdp-flash-countdown__value {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: 0.02em;
}

/* style.css paints the round badge circle via
   .product-details-discount-badge span.sale-badge-text { background-color:
   #173495 } — this overrides it for the flash variant only, matching the
   same selector depth so it applies regardless of stylesheet load order. */
.product-details-discount-badge .sale-badge--flash span.sale-badge-text {
    background-color: var(--color-danger);
}

@media (max-width: 576px) {
    .pdp-flash-countdown {
        flex-wrap: wrap;
        font-size: 12px;
    }
}

/* Actions ---------------------------------------------------------------- */

.pdp-actions.d-flex {
    gap: var(--space-3);
}

.pdp-actions .add_cart_btn,
.pdp-actions .order_now_btn {
    border-radius: var(--radius-md) !important;
    height: 50px !important;
    font-size: 15px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.pdp-actions .order_now_btn {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.pdp-actions .order_now_btn:hover,
.pdp-actions .order_now_btn:active {
    background-color: var(--brand-primary-dark) !important;
    border-color: var(--brand-primary-dark) !important;
}

.pdp-actions .add_cart_btn {
    background-color: var(--surface-bg) !important;
    color: var(--nav-bg) !important;
    border: 1px solid var(--nav-bg) !important;
}

.pdp-actions .add_cart_btn:hover,
.pdp-actions .add_cart_btn:active {
    background-color: var(--nav-bg) !important;
    color: #fff !important;
    border-color: var(--nav-bg) !important;
}

.pdp-btn--whatsapp {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: 48px;
    background-color: #25d366 !important;
    border-color: #25d366 !important;
    color: #fff !important;
    border-radius: var(--radius-md) !important;
    font-weight: 700;
    text-transform: none !important;
}

.pdp-btn--whatsapp:hover {
    background-color: #1ebc59 !important;
    color: #fff !important;
}

.call_now_btn {
    border-radius: var(--radius-md) !important;
}

.pdp-payment-strip {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    background: var(--surface-bg-soft);
    border: 1px dashed var(--surface-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-body);
}

.pdp-payment-strip i {
    color: var(--brand-primary);
}

/* Variant selectors ------------------------------------------------------ */

.selector-item_radio:checked + .selector-item_label {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}

.color_inner .selector .selector-item label {
    border-color: var(--surface-border);
}

/* ---------------------------------------------------------------------- */
/* Bulk / wholesale CTA                                                    */
/* ---------------------------------------------------------------------- */

.pdp-bulk-cta {
    margin-top: var(--space-6);
}

.pdp-bulk-cta__inner {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    box-shadow: var(--shadow-sm);
}

.pdp-bulk-cta__icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--surface-bg-soft);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.pdp-bulk-cta__text {
    flex: 1 1 auto;
    min-width: 200px;
}

.pdp-bulk-cta__text h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-strong);
    margin: 0 0 2px;
}

.pdp-bulk-cta__text p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.pdp-bulk-cta__btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    background: #25d366;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    transition: background var(--transition-fast);
}

.pdp-bulk-cta__btn:hover {
    background: #1ebc59;
    color: #fff;
}

/* ---------------------------------------------------------------------- */
/* Trust section                                                          */
/* ---------------------------------------------------------------------- */

.pdp-trust-section {
    margin-top: var(--space-6);
}

.pdp-trust-section__title {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: var(--space-5);
}

.pdp-trust-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--space-4);
}

.pdp-trust-card {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.pdp-trust-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(184, 134, 59, 0.12);
    color: var(--brand-primary-dark);
    font-size: 18px;
    margin-bottom: var(--space-3);
}

.pdp-trust-card h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 4px;
}

.pdp-trust-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* ---------------------------------------------------------------------- */
/* Description / reviews / related (cosmetic only)                        */
/* ---------------------------------------------------------------------- */

.description-nav-wrapper {
    margin-top: var(--space-6);
}

.desc-nav-ul li a {
    color: var(--text-muted);
}

.desc-nav-ul li.active a,
.desc-nav-ul li:hover a {
    color: var(--brand-primary);
}

.details-action-box {
    background: var(--surface-bg);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-4);
}

.review-card {
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.review_star i {
    color: #f5a623;
}

.related-title h5 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-strong);
}

.related-product-section .product_item_inner .sale-badge-box {
    background-color: var(--brand-primary);
}

.related-product-section .pro_name a {
    color: var(--text-strong);
}

.related-product-section .pro_price p {
    color: var(--brand-primary-dark);
    font-weight: 700;
}

/* ---------------------------------------------------------------------- */
/* Responsive                                                             */
/* ---------------------------------------------------------------------- */

@media only screen and (min-width: 768px) and (max-width: 991px) {
    .pdp-trust-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media only screen and (max-width: 767px) {
    .main-details-page {
        padding-top: var(--space-4);
    }
    .pdp-gallery,
    .pdp-info {
        padding: var(--space-4);
        border-radius: var(--radius-md);
    }
    .pdp-price-card__value--current {
        font-size: 22px;
    }
    .pdp-trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pdp-bulk-cta__inner {
        flex-wrap: wrap;
        text-align: center;
        justify-content: center;
    }
    .pdp-bulk-cta__text {
        text-align: center;
        min-width: 100%;
        order: 2;
    }
    .pdp-bulk-cta__btn {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}
