/**
 * VanHaren ProductDetailRevamp — Product Page Styles
 * Module: VanHaren_ProductDetailRevamp
 */

/* =========================================================
   Reviews — override CDN/theme alignment issues
   ========================================================= */
.product-info-main .product-reviews-summary .reviews-actions .action.add,
.bundle-options-container .product-reviews-summary .reviews-actions .action.add {
    display: inline-block !important;
}
.product-info-main .product-reviews-summary {
    text-align: left !important;
    margin: 0 0 8px !important;
    float: left !important;
    width: 100% !important;
    clear: both;
}
.product-info-main .product-reviews-summary .reviews-actions {
    text-align: left !important;
    display: block !important;
    margin-bottom: 20px;
}
.product-reviews-summary .reviews-actions .action.add::before {
    display: none !important;
}
.product-reviews-summary.empty .reviews-actions::before,
.product-reviews-summary.empty .reviews-actions::after,
.product-info-main .product-reviews-summary.empty::after {
    display: none !important;
}
.product-info-main .product-reviews-summary.empty {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* =========================================================
   Product title
   ========================================================= */
.catalog-product-view .product-info-main .page-title-wrapper .page-title .base {
    font-size: 2.6rem;
    line-height: 1.2;
    font-weight: 700;
    color: #0f224c;
    display: block;
}

/* =========================================================
   Price card — Figma design
   gradient card, label, big price, excl. strikethrough, VAT badge
   ========================================================= */
.catalog-product-view .product-info-main .product-info-price {
    background: linear-gradient(to bottom right, #f8fafc, rgba(241, 245, 249, 0.5));
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    margin: 16px 0 20px;
    max-width: 360px;
}

/* "Price (Incl. Tax)" label */
.catalog-product-view .product-info-main .product-info-price::before {
    content: "Price (Incl. Tax)";
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

/* Price row: big price + strikethrough excl. + VAT badge pushed right */
.catalog-product-view .product-info-main .price-box {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0;
}

.catalog-product-view .product-info-main .price-box .price-container {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    flex: 1;
}

/* Hide "As low as" label */
.catalog-product-view .product-info-main .price-label {
    display: none;
}

/* Main incl. tax price — big and bold */
.catalog-product-view .product-info-main .price-wrapper.price-including-tax .price {
    font-size: 3.6rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

/* Remove old inline VAT badge from ::after */
.catalog-product-view .product-info-main .price-wrapper.price-including-tax::after {
    display: none !important;
}

/* Excl. tax price — strikethrough, muted */
.catalog-product-view .product-info-main .price-wrapper.price-excluding-tax {
    display: flex;
    align-items: baseline;
}
.catalog-product-view .product-info-main .price-wrapper.price-excluding-tax::before {
    display: none;
}
.catalog-product-view .product-info-main .price-wrapper.price-excluding-tax .price {
    font-size: 1.6rem;
    font-weight: 400;
    color: #94a3b8;
    text-decoration: line-through;
}

/* VAT Included badge — pushed to the right */
.catalog-product-view .product-info-main .price-box::after {
    content: "Incl. VAT";
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #f0fdf4;
    border-radius: 50px;
    border: 1px solid #bbf7d0;
    color: #15803d;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
    line-height: 1;
}

.catalog-product-view .product-info-main .price-box .old-price .price {
    font-size: 1.6rem;
    color: #94a3b8;
    font-weight: 400;
    text-decoration: line-through;
}

/* =========================================================
   Format selector (filter_format swatch attribute)
   ========================================================= */
.swatch-attribute.filter_format {
    margin-bottom: 24px;
}

.swatch-attribute.filter_format .swatch-attribute-label,
.swatch-attribute.filter_format .swatch-attribute-selected-option {
    display: none;
}

.swatch-attribute.filter_format .swatch-attribute-options {
    position: relative;
    display: inline-flex;
    background: #f3f4f6;
    border-radius: 20px;
    padding: 6px;
    gap: 4px;
}

.swatch-attribute.filter_format .swatch-option.text {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.025em;
    color: #6b7280;
    border-radius: 16px;
    border: none !important;
    cursor: pointer;
    transition: color 0.3s;
    background: transparent !important;
    outline: none;
    min-width: 0;
    justify-content: center;
    margin: 0 !important;
    box-shadow: none !important;
    white-space: nowrap;
}

.swatch-attribute.filter_format .swatch-option.text:hover {
    color: #374151;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

.swatch-attribute.filter_format .swatch-option.text.selected {
    color: #ffffff;
    font-weight: 500;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Sliding indicator — navy gradient */
.bk-format__indicator {
    position: absolute;
    top: 6px;
    height: calc(100% - 12px);
    background: linear-gradient(to right bottom, rgb(29, 61, 124), rgb(20, 48, 94));
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(20, 48, 94, 0.35);
    transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 0;
}

/* Icons in format options */
.bk-format__icon {
    display: inline-flex;
    flex-shrink: 0;
}

.bk-format__icon svg {
    width: 20px;
    height: 20px;
}

/* =========================================================
   Meta badges — enterprise grid (Figma MetadataBadge pattern)
   ========================================================= */
.bk-meta {
    margin: 0 0 20px;
}

.bk-meta__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.bk-meta__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bk-meta__badge-icon {
    width: 26px;
    height: 26px;
    background: rgba(29, 61, 124, 0.08);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #1d3d7c;
}

.bk-meta__badge-icon svg {
    width: 14px;
    height: 14px;
}

.bk-meta__badge-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
}

.bk-meta__badge-label {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.bk-meta__badge-value {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.bk-meta__badge-value--mono {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.02em;
}

/* In Stock */
.bk-meta__badge--instock .bk-meta__badge-icon {
    background: rgba(34, 197, 94, 0.10);
    color: #16a34a;
}
.bk-meta__badge--instock .bk-meta__badge-value {
    color: #15803d;
}

/* Out of Stock */
.bk-meta__badge--outofstock .bk-meta__badge-icon {
    background: rgba(239, 68, 68, 0.10);
    color: #dc2626;
}
.bk-meta__badge--outofstock .bk-meta__badge-value {
    color: #dc2626;
}

/* Preview — navy accent, hover lift */
.bk-meta__badge--preview {
    cursor: pointer;
}
.bk-meta__badge--preview:hover {
    border-color: #1d3d7c;
    box-shadow: 0 2px 10px rgba(29, 61, 124, 0.12);
    text-decoration: none;
}
.bk-meta__badge-icon--preview {
    background: rgba(29, 61, 124, 0.10);
    color: #1d3d7c;
}
.bk-meta__badge--preview .bk-meta__badge-label {
    color: #1d3d7c;
}
.bk-meta__badge--preview .bk-meta__badge-value {
    color: #1d3d7c;
}

/* =========================================================
   Detail row (series, pages, edition)
   ========================================================= */
.bk-meta__details {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    margin: 0 0 16px;
    padding: 0;
}

.bk-meta__detail {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}

.bk-meta__detail-label {
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.bk-meta__detail-value {
    color: #334155;
    margin: 0;
}

.bk-meta__author-link {
    color: #334155;
    text-decoration: underline;
    text-decoration-color: rgba(51, 65, 85, 0.35);
    text-underline-offset: 2px;
    transition: color 0.15s, text-decoration-color 0.15s;
}
.bk-meta__author-link:hover {
    color: #1e40af;
    text-decoration-color: #1e40af;
}

/* =========================================================
   Quantity label
   ========================================================= */
.bk-qty-label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 8px;
}

/* =========================================================
   Qty field + ATC layout — flex row
   ========================================================= */
.catalog-product-view .product-info-main .box-tocart .fieldset {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.catalog-product-view .product-info-main .box-tocart .field.qty {
    flex-shrink: 0;
    margin-bottom: 0;
}

.catalog-product-view .product-info-main .box-tocart .actions {
    flex: 0.5;
    min-width: 180px;
    margin-bottom: 0;
}

/* Remove theme border on qty-wrapper */
.product-info-main .qty-wrapper,
.bundle-options-container .qty-wrapper {
    border: none !important;
    border-radius: 0 !important;
}

/* =========================================================
   Qty pill input + QuantitySwitcher arrows
   ========================================================= */
.catalog-product-view .product-info-main .field.qty .control {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border-radius: 50px;
    padding: 4px;
    gap: 2px;
    width: fit-content;
}

.catalog-product-view .product-info-main .field.qty .control .qty-arrow,
.catalog-product-view .product-info-main .field.qty .control .qty-plus,
.catalog-product-view .product-info-main .field.qty .control .qty-minus,
.catalog-product-view .product-info-main .field.qty .qty-dec,
.catalog-product-view .product-info-main .field.qty .qty-inc {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    cursor: pointer;
    color: #334155;
    font-size: 18px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0,0,0,0.10);
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.catalog-product-view .product-info-main .field.qty .control .qty-arrow:hover,
.catalog-product-view .product-info-main .field.qty .control .qty-plus:hover,
.catalog-product-view .product-info-main .field.qty .control .qty-minus:hover,
.catalog-product-view .product-info-main .field.qty .qty-dec:hover,
.catalog-product-view .product-info-main .field.qty .qty-inc:hover {
    background: #0f224c;
    color: #ffffff;
}

.catalog-product-view .product-info-main .field.qty .input-text.qty {
    width: 48px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: #0f224c;
    padding: 0;
    -moz-appearance: textfield;
    box-shadow: none;
}

.catalog-product-view .product-info-main .field.qty .input-text.qty::-webkit-inner-spin-button,
.catalog-product-view .product-info-main .field.qty .input-text.qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* =========================================================
   Add to Cart button — navy gradient
   ========================================================= */
.catalog-product-view .product-info-main .action.tocart.primary,
.catalog-product-view .product-info-main .action.primary.tocart {
    background: #FFB700;
    border: none;
    border-radius: 50px;
    color: #0f224c;
    font-size: 15px;
    font-weight: 700;
    padding: 0 32px;
    height: 48px;
    line-height: 1;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Align cart icon with text */
.catalog-product-view .product-info-main .action.tocart.primary::before,
.catalog-product-view .product-info-main .action.primary.tocart::before {
    display: block;
    line-height: 1;
    font-size: 18px;
    height: 18px;
    margin-top: 2px;
}

.catalog-product-view .product-info-main .action.tocart.primary:hover,
.catalog-product-view .product-info-main .action.primary.tocart:hover {
    background: #1d3d7c;
    color: #ffffff !important;
    opacity: 1;
    transform: translateY(-1px);
}

.catalog-product-view .product-info-main .action.tocart.primary:disabled,
.catalog-product-view .product-info-main .action.primary.tocart:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    opacity: 1;
}

/* =========================================================
   Download PDF button
   ========================================================= */
.bk-pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    margin-top: 12px;
    padding: 8px 16px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s;
}
.bk-pdf-btn:hover,
.bk-pdf-btn:focus {
    background: #f5b800;
    color: #0f172a;
    box-shadow: 0 3px 12px rgba(245, 184, 0, 0.25);
    text-decoration: none;
}
.bk-pdf-btn svg {
    flex-shrink: 0;
    transition: none;
}

/* =========================================================
   Trust badges — enterprise pill style (matches bk-meta badges)
   ========================================================= */
.bk-postcart {
    margin-top: 20px;
}

.bk-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bk-trust__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    white-space: nowrap;
}

.bk-trust__icon {
    width: 26px;
    height: 26px;
    background: rgba(34, 197, 94, 0.10);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #16a34a;
}

.bk-trust__icon svg {
    width: 14px;
    height: 14px;
}

.bk-trust__label {
    font-size: 13px !important;
    font-weight: 600;
    color: #1e293b;
}

/* Trust badge tooltip */
.bk-trust__q {
    /* zero-width absolute — doesn't affect flex item sizing at all */
    position: absolute;
    top: 3px;
    right: 5px;
    width: 13px;
    height: 13px;
    background: #cbd5e1;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 13px;
    text-align: center;
    border-radius: 50%;
    cursor: help;
    z-index: 10;
}
.bk-trust__item {
    position: relative;
}
.bk-trust__tip-text {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 7px;
    white-space: normal;
    width: 230px;
    line-height: 1.5;
    z-index: 200;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.bk-trust__tip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #0f172a;
}
.bk-trust__q:hover .bk-trust__tip-text {
    display: block;
}

/* =========================================================
   Mobile — ≤ 767px
   ========================================================= */
@media (max-width: 767px) {

    /* Title */
    .catalog-product-view .product-info-main .page-title-wrapper .page-title .base {
        font-size: 2.2rem;
    }

    /* Price card */
    .catalog-product-view .product-info-main .product-info-price {
        padding: 16px;
        border-radius: 18px;
        margin: 12px 0 16px;
    }
    .catalog-product-view .product-info-main .price-wrapper.price-including-tax .price {
        font-size: 2.8rem;
    }
    .catalog-product-view .product-info-main .price-box::after {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Meta badges — tighter on mobile */
    .bk-meta__grid {
        gap: 5px;
    }
    .bk-meta__badge {
        padding: 6px 10px;
        gap: 6px;
    }
    .bk-meta__badge-icon {
        width: 22px;
        height: 22px;
        border-radius: 5px;
    }
    .bk-meta__badge-icon svg {
        width: 12px;
        height: 12px;
    }
    .bk-meta__badge-value {
        font-size: 12px;
    }
    .bk-meta__badge-label {
        font-size: 9px;
    }

    /* Format selector — full width */
    .swatch-attribute.filter_format .swatch-attribute-options {
        width: 100%;
    }
    .swatch-attribute.filter_format .swatch-option.text {
        flex: 1;
        padding: 14px 16px;
        font-size: 14px;
    }

    /* Qty + ATC — stack qty small, button fills rest */
    .catalog-product-view .product-info-main .box-tocart .fieldset {
        gap: 10px;
    }
    .catalog-product-view .product-info-main .box-tocart .actions {
        flex: 1;
        min-width: 0;
    }
    .catalog-product-view .product-info-main .action.tocart.primary,
    .catalog-product-view .product-info-main .action.primary.tocart {
        font-size: 14px;
        padding: 0 20px;
    }

    /* Trust badges — wrap on mobile */
    .bk-trust {
        gap: 5px;
    }
    .bk-trust__item {
        padding: 6px 10px;
        gap: 6px;
    }
    .bk-trust__icon {
        width: 22px;
        height: 22px;
        border-radius: 5px;
    }
    .bk-trust__icon svg {
        width: 12px;
        height: 12px;
    }
    .bk-trust__label {
        font-size: 12px;
    }

}
