/* apnet-single-product.css
 * JustBloom Premium Single Product Page
 * Phase 1: Foundation Layout + CSS Override Hardening
 */

/* =============================================
   CSS Variables
   ============================================= */
:root {
    /* === Exact values from justbloomflorist.my-design.md === */
    --jb-sp-font: "Josefin Sans", sans-serif;
    --jb-sp-primary: #75A47F;
    /* primary */
    --jb-sp-secondary: #62544C;
    /* secondary (also on-surface / body text) */
    --jb-sp-tertiary: #DC7F74;
    /* tertiary / error / coral accent */
    --jb-sp-neutral: #FFFFFF;
    /* neutral / surface */
    --jb-sp-surface: #FFFFFF;
    --jb-sp-on-surface: #62544C;
    /* text on white backgrounds */
    --jb-sp-muted: #E5E7EB;
    --jb-sp-error: #DC7F74;
    --jb-sp-border: #E5E7EB;
    --jb-sp-radius: 8px;
    /* rounded.lg */
    --jb-sp-radius-sm: 4px;
    /* rounded.sm */
    --jb-sp-transition: 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

/* =============================================
   Page Wrapper + Container (max 1140px)
   ============================================= */
.jb-single-product-page {
    padding: 30px 0 60px;
    font-family: var(--jb-sp-font);
    color: var(--jb-sp-text);
}

/* Enforce 1140px desktop max-width, identical to Category page */
.jb-single-product-page .jb-container {
    max-width: 1140px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* =============================================
   Two-Column Layout (60/40 Grid)
   ============================================= */
.jb-sp-layout {
    display: grid;
    grid-template-columns: 60fr 40fr;
    gap: 48px;
    align-items: start;
    margin-bottom: 60px;
}

/* =============================================
   Gallery Column (Left)
   ============================================= */
.jb-sp-gallery-col {
    position: sticky;
    top: 100px;
}

.jb-sp-main-image-wrap {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--jb-sp-radius);
    background: var(--jb-sp-muted);
    margin-bottom: 12px;
}

.jb-sp-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity var(--jb-sp-transition);
}

/* Thumbnail Strip */
.jb-sp-thumb-strip {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.jb-sp-thumb {
    width: 72px;
    height: 90px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--jb-sp-transition);
    flex-shrink: 0;
}

.jb-sp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.jb-sp-thumb.active,
.jb-sp-thumb:hover {
    border-color: var(--jb-sp-primary);
}

/* =============================================
   Info Column (Right)
   ============================================= */
.jb-sp-info-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- WooCommerce Notices (Success/Error/Info) ---
   Repositioned and styled as elegant bars */
.jb-single-product-page .woocommerce-notices-wrapper {
    margin-bottom: 0;
}

.jb-single-product-page .woocommerce-message,
.jb-single-product-page .woocommerce-error,
.jb-single-product-page .woocommerce-info {
    margin: 0 0 10px 0 !important;
    padding: 14px 20px !important;
    background: #fdfdfd !important;
    border: 1px solid var(--jb-sp-border) !important;
    border-left: 3px solid var(--jb-sp-primary) !important;
    border-radius: var(--jb-sp-radius-sm) !important;
    color: var(--jb-sp-secondary) !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}

.jb-single-product-page .woocommerce-error {
    border-left-color: var(--jb-sp-tertiary) !important;
}

.jb-single-product-page .woocommerce-message::before,
.jb-single-product-page .woocommerce-info::before,
.jb-single-product-page .woocommerce-error::before {
    display: none !important;
    /* Remove native icons */
}

.jb-single-product-page .woocommerce-message .button,
.jb-single-product-page .woocommerce-info .button {
    font-size: 11px !important;
    padding: 6px 12px !important;
    background: var(--jb-sp-primary) !important;
    color: white !important;
    text-transform: uppercase !important;
    border-radius: 4px !important;
    margin-left: 15px !important;
    float: none !important;
}

/* Breadcrumbs */
.jb-sp-breadcrumbs .woocommerce-breadcrumb {
    font-family: var(--jb-sp-font) !important;
    font-size: 13px !important;
    color: var(--jb-sp-text-light) !important;
}

.jb-sp-breadcrumbs .woocommerce-breadcrumb a {
    color: var(--jb-sp-text-light) !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.jb-sp-breadcrumbs .woocommerce-breadcrumb a:hover {
    color: var(--jb-sp-primary) !important;
}

/* Title */
.jb-single-product-page .jb-sp-title {
    font-family: var(--jb-sp-font) !important;
    font-size: 28px !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    color: var(--jb-sp-secondary) !important;
    /* #62544C per design.md */
    margin: 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Divider */
.jb-sp-divider {
    border: none !important;
    border-top: 1px solid var(--jb-sp-border) !important;
    margin: 0 !important;
    background: none !important;
}

/* Short Description */
.jb-sp-short-description {
    font-size: 14px;
    /* body-sm */
    font-weight: 300;
    line-height: 21px;
    letter-spacing: 0.2px;
    color: var(--jb-sp-secondary);
    /* #62544C */
}

.jb-sp-short-description p {
    margin: 0 0 8px;
}

/* Price */
.jb-sp-price {
    font-family: var(--jb-sp-font);
}

.jb-sp-price .price {
    font-size: 26px !important;
    font-weight: 600 !important;
    color: var(--jb-sp-secondary) !important;
    /* #62544C */
    font-family: var(--jb-sp-font) !important;
}

.jb-sp-price .price del {
    font-size: 16px !important;
    color: var(--jb-sp-muted) !important;
}

.jb-sp-price .price ins {
    text-decoration: none !important;
    color: var(--jb-sp-tertiary) !important;
    /* coral #DC7F74 */
}

/* =============================================
   Message on Card
   — Heavy !important to defeat Elementor/WooCommerce/Theme overrides
   ============================================= */
.jb-sp-message-card-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jb-sp-label {
    font-family: var(--jb-sp-font) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--jb-sp-text) !important;
    letter-spacing: 0.3px;
    display: flex !important;
    align-items: center;
    gap: 6px;
    /* Ensure label is not hidden by Elementor */
    visibility: visible !important;
    opacity: 1 !important;
}

.jb-sp-label i {
    color: var(--jb-sp-primary) !important;
    font-size: 14px !important;
}

/* Textarea — all properties !important to win CSS specificity wars */
.jb-single-product-page #jb-message-on-card,
.jb-single-product-page textarea.jb-sp-textarea,
.jb-sp-message-card-wrap textarea {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-family: var(--jb-sp-font) !important;
    font-size: 14px !important;
    /* body-sm */
    font-weight: 300 !important;
    line-height: 21px !important;
    letter-spacing: 0.2px !important;
    padding: 12px 14px !important;
    /* input.padding from design.md */
    border: 1px solid var(--jb-sp-border) !important;
    border-radius: var(--jb-sp-radius-sm) !important;
    /* rounded.sm = 4px */
    resize: vertical !important;
    transition: border-color var(--jb-sp-transition) !important;
    /* ——— Colour fixes — defeat Elementor/WooCommerce/WebKit overrides ——— */
    color: var(--jb-sp-on-surface) !important;
    /* #62544C */
    background-color: var(--jb-sp-surface) !important;
    /* #FFFFFF per design.md input */
    background: var(--jb-sp-surface) !important;
    -webkit-text-fill-color: #62544C !important;
    /* Webkit/Safari specific */
    box-shadow: none !important;
    opacity: 1 !important;
}

.jb-single-product-page #jb-message-on-card:focus,
.jb-single-product-page textarea.jb-sp-textarea:focus,
.jb-sp-message-card-wrap textarea:focus {
    outline: none !important;
    border-color: var(--jb-sp-primary) !important;
    background-color: var(--jb-sp-surface) !important;
    background: var(--jb-sp-surface) !important;
    color: var(--jb-sp-on-surface) !important;
    -webkit-text-fill-color: #62544C !important;
    box-shadow: 0 0 0 3px rgba(117, 164, 127, 0.15) !important;
}

/* Placeholder — always readable */
.jb-single-product-page #jb-message-on-card::placeholder,
.jb-sp-message-card-wrap textarea::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #9ca3af !important;
}

/* =================================================================
   WAPF (WooCommerce Advanced Product Fields) Input Override
   Selector from plugin: .wapf-field-input input, select, textarea
   ================================================================= */
.jb-single-product-page .wapf-field-input input[type="email"],
.jb-single-product-page .wapf-field-input input[type="number"],
.jb-single-product-page .wapf-field-input input[type="text"],
.jb-single-product-page .wapf-field-input input[type="url"],
.jb-single-product-page .wapf-field-input select,
.jb-single-product-page .wapf-field-input textarea {
    font-family: var(--jb-sp-font) !important;
    font-size: 14px !important;
    /* body-sm */
    font-weight: 300 !important;
    line-height: 21px !important;
    letter-spacing: 0.2px !important;
    color: #62544C !important;
    /* on-surface from design.md */
    -webkit-text-fill-color: #62544C !important;
    background-color: #FFFFFF !important;
    background: #FFFFFF !important;
    border: 1px solid var(--jb-sp-border) !important;
    border-radius: var(--jb-sp-radius-sm) !important;
    padding: 12px 14px !important;
    box-shadow: none !important;
    opacity: 1 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.jb-single-product-page .wapf-field-input input[type="email"]:focus,
.jb-single-product-page .wapf-field-input input[type="number"]:focus,
.jb-single-product-page .wapf-field-input input[type="text"]:focus,
.jb-single-product-page .wapf-field-input input[type="url"]:focus,
.jb-single-product-page .wapf-field-input select:focus,
.jb-single-product-page .wapf-field-input textarea:focus {
    border-color: var(--jb-sp-primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(117, 164, 127, 0.15) !important;
}

.jb-single-product-page .wapf-field-input input::placeholder,
.jb-single-product-page .wapf-field-input textarea::placeholder {
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af !important;
    opacity: 1 !important;
}

.jb-sp-char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--jb-sp-text-light);
}

/* =============================================
   Add to Cart Area
   ============================================= */
.jb-sp-add-to-cart-wrap {
    /* display: flex; */
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.jb-sp-add-to-cart-wrap .quantity {
    display: inline-flex;
    align-items: center;
}

/* Quantity input override */
.jb-sp-add-to-cart-wrap input[type="number"].qty {
    font-family: var(--jb-sp-font) !important;
    font-size: 14px !important;
    color: var(--jb-sp-text) !important;
    background: #ffffff !important;
    border: 1px solid var(--jb-sp-border) !important;
    border-radius: var(--jb-sp-radius) !important;
    padding: 10px 12px !important;
    width: 70px !important;
    text-align: center !important;
    box-shadow: none !important;
    -webkit-text-fill-color: var(--jb-sp-text) !important;
}

.jb-sp-add-to-cart-wrap .single_add_to_cart_button {
    font-family: var(--jb-sp-font) !important;
    background: var(--jb-sp-primary) !important;
    color: white !important;
    border: none !important;
    padding: 14px 32px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    border-radius: var(--jb-sp-radius) !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    transition: background var(--jb-sp-transition), transform 0.2s ease !important;
    box-shadow: none !important;
    flex-grow: 1;
}

.jb-sp-add-to-cart-wrap .single_add_to_cart_button:hover {
    background: var(--jb-sp-secondary) !important;
    transform: translateY(-2px) !important;
    color: white !important;
}

/* --- Variable Product Dropdowns & Table --- */
.jb-single-product-page table.variations {
    width: 100% !important;
    border: none !important;
    margin-bottom: 10px !important;
    background: none !important;
}

.jb-single-product-page table.variations td {
    display: block !important;
    /* Stack for boutique feel */
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

.jb-single-product-page table.variations label {
    display: block !important;
    font-family: var(--jb-sp-font) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--jb-sp-secondary) !important;
    margin-bottom: 6px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jb-single-product-page table.variations select {
    width: 100% !important;
    max-width: 100% !important;
    font-family: var(--jb-sp-font) !important;
    font-size: 14px !important;
    padding: 10px 14px !important;
    border: 1px solid var(--jb-sp-border) !important;
    border-radius: var(--jb-sp-radius-sm) !important;
    background: #ffffff !important;
    color: var(--jb-sp-secondary) !important;
    margin-bottom: 15px !important;
    box-shadow: none !important;
    cursor: pointer;
}

.jb-single-product-page .reset_variations {
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--jb-sp-tertiary) !important;
    text-decoration: none !important;
    margin-left: 10px;
}

/* Variation Price Block */
.jb-single-product-page .woocommerce-variation-price {
    margin-bottom: 15px !important;
}

.jb-single-product-page .woocommerce-variation-price .price {
    font-size: 20px !important;
    color: var(--jb-sp-secondary) !important;
}

/* Stock Status */
.jb-single-product-page .stock {
    font-family: var(--jb-sp-font) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin: 5px 0 15px !important;
    display: flex !important;
    align-items: center;
    gap: 6px;
}

.jb-single-product-page .in-stock {
    color: var(--jb-sp-primary) !important;
}

.jb-single-product-page .out-of-stock {
    color: var(--jb-sp-tertiary) !important;
}

/* Product Meta (SKU/Categories) */
.jb-single-product-page .product_meta {
    border-top: 1px solid var(--jb-sp-border);
    padding-top: 15px;
    font-size: 12px;
    color: var(--jb-sp-text-light);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.jb-single-product-page .product_meta .sku_wrapper {
    display: none !important;
}

/* Hide SKU */
.jb-single-product-page .product_meta span {
    font-weight: 500;
}

.jb-single-product-page .product_meta a {
    color: var(--jb-sp-secondary);
    text-decoration: none;
}

.jb-single-product-page .product_meta a:hover {
    color: var(--jb-sp-primary);
}

/* "View cart" link — appears inline after successful add-to-cart
   Styled as a secondary pill button per design.md */
.jb-sp-add-to-cart-wrap .added_to_cart,
.jb-single-product-page .added_to_cart {
    display: inline-flex !important;
    align-items: center !important;
    font-family: var(--jb-sp-font) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    letter-spacing: 0.3px !important;
    color: var(--jb-sp-secondary) !important;
    /* #62544C — secondary */
    -webkit-text-fill-color: var(--jb-sp-secondary) !important;
    text-decoration: none !important;
    padding: 8px 16px !important;
    border: 1px solid var(--jb-sp-secondary) !important;
    border-radius: var(--jb-sp-radius-sm) !important;
    /* rounded.sm = 4px */
    background: transparent !important;
    transition: background var(--jb-sp-transition), color var(--jb-sp-transition) !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    line-height: 1 !important;
}

.jb-sp-add-to-cart-wrap .added_to_cart:hover,
.jb-single-product-page .added_to_cart:hover {
    background: var(--jb-sp-secondary) !important;
    color: white !important;
    -webkit-text-fill-color: white !important;
    border-color: var(--jb-sp-secondary) !important;
}

/* =============================================
   Accordions
   ============================================= */
.jb-sp-accordions {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--jb-sp-border);
    border-radius: var(--jb-sp-radius);
    overflow: hidden;
}

.jb-sp-accordion+.jb-sp-accordion {
    border-top: 1px solid var(--jb-sp-border);
}

.jb-sp-acc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.jb-sp-acc-header:hover {
    background: #f9fafb;
}

.jb-sp-acc-title {
    font-family: var(--jb-sp-font);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--jb-sp-text);
}

.jb-sp-acc-title i {
    color: var(--jb-sp-primary);
    width: 16px;
    text-align: center;
}

.jb-sp-acc-icon {
    color: var(--jb-sp-text-light);
    font-size: 12px;
    transition: transform var(--jb-sp-transition);
}

.jb-sp-accordion.is-open .jb-sp-acc-icon {
    transform: rotate(180deg);
}

.jb-sp-acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--jb-sp-transition);
}

.jb-sp-accordion.is-open .jb-sp-acc-body {
    max-height: 600px;
}

.jb-sp-acc-content {
    padding: 0 20px 20px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--jb-sp-text-light);
}

.jb-sp-acc-content h4 {
    font-family: var(--jb-sp-font) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: var(--jb-sp-text) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 8px;
}

.jb-sp-acc-content h4:first-child {
    margin-top: 0;
}

/* Delivery List */
.jb-sp-delivery-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.jb-sp-delivery-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.jb-sp-delivery-list li i {
    color: var(--jb-sp-primary);
    margin-top: 3px;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

/* WhatsApp Link */
.jb-sp-whatsapp-link {
    color: #25D366 !important;
    text-decoration: none !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s ease;
}

.jb-sp-whatsapp-link:hover {
    opacity: 0.8;
    color: #25D366 !important;
}

/* Size Table */
.jb-sp-size-intro {
    font-weight: 600;
    color: var(--jb-sp-text);
    margin-bottom: 12px;
}

.jb-sp-size-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.jb-sp-size-table th,
.jb-sp-size-table td {
    text-align: left !important;
    padding: 8px 12px !important;
    border-bottom: 1px solid var(--jb-sp-border) !important;
}

.jb-sp-size-table thead th {
    font-weight: 700 !important;
    color: var(--jb-sp-text) !important;
    background: #f9fafb !important;
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.jb-sp-size-table tbody tr:last-child td {
    border-bottom: none !important;
}

.jb-sp-size-note {
    font-size: 12px;
    color: var(--jb-sp-text-light);
    margin-top: 12px;
}

/* =============================================
   Global Notice
   ============================================= */
.jb-sp-global-notice {
    background: #f7f9f7;
    border: 1px solid var(--jb-sp-muted);
    border-left: 3px solid var(--jb-sp-primary);
    border-radius: var(--jb-sp-radius);
    padding: 16px 20px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--jb-sp-text-light);
}

.jb-sp-global-notice p {
    margin: 0 0 8px;
}

.jb-sp-global-notice p:last-child {
    margin-bottom: 0;
}

/* =============================================
   Full-Width Sections (Tabs & Related)
   ============================================= */
.jb-sp-tabs-section {
    margin-bottom: 80px;
}

/* Centered & Clean Tabs Navigation */
.jb-single-product-page .woocommerce-tabs ul.tabs {
    display: flex !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 0 40px 0 !important;
    border: none !important;
    background: none !important;
    overflow: visible !important;
}

.jb-single-product-page .woocommerce-tabs ul.tabs::before,
.jb-single-product-page .woocommerce-tabs ul.tabs::after {
    display: none !important;
}

.jb-single-product-page .woocommerce-tabs ul.tabs li {
    background: none !important;
    border: none !important;
    margin: 0 20px !important;
    padding: 0 0 10px 0 !important;
    border-radius: 0 !important;
    list-style: none;
}

.jb-single-product-page .woocommerce-tabs ul.tabs li a {
    font-family: var(--jb-sp-font) !important;
    font-size: 15px !important;
    /* label-md */
    font-weight: 400 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: var(--jb-sp-secondary) !important;
    padding: 0 !important;
    transition: color 0.3s ease;
}

.jb-single-product-page .woocommerce-tabs ul.tabs li.active {
    border-bottom: 2px solid var(--jb-sp-primary) !important;
}

.jb-single-product-page .woocommerce-tabs ul.tabs li.active a {
    color: var(--jb-sp-primary) !important;
}

/* Tab Panels */
.jb-single-product-page .woocommerce-Tabs-panel {
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.jb-single-product-page .woocommerce-Tabs-panel h2 {
    display: none !important;
    /* Hide redundant internal title */
}

/* Attributes Table (Additional Information) */
.jb-single-product-page .shop_attributes {
    width: 100% !important;
    max-width: 800px;
    margin: 0 auto !important;
    border: none !important;
}

.jb-single-product-page .shop_attributes tr {
    border-bottom: 1px solid var(--jb-sp-border) !important;
}

.jb-single-product-page .shop_attributes th,
.jb-single-product-page .shop_attributes td {
    padding: 15px 10px !important;
    border: none !important;
    background: none !important;
    font-family: var(--jb-sp-font) !important;
    font-size: 14px !important;
    font-style: normal !important;
}

.jb-single-product-page .shop_attributes th {
    width: 200px;
    font-weight: 600 !important;
    color: var(--jb-sp-secondary) !important;
}

.jb-single-product-page .shop_attributes td {
    color: var(--jb-sp-text-light) !important;
}

.jb-single-product-page .shop_attributes tr:last-child {
    border-bottom: none !important;
}

.jb-sp-related-section {
    margin-bottom: 60px;
}

/* =============================================
   Section Header (used by Related Products)
   ============================================= */
.jb-sp-section-header {
    text-align: center;
    margin-bottom: 36px;
}

.jb-sp-section-title {
    font-family: var(--jb-sp-font) !important;
    font-size: 23px !important;
    /* headline-md */
    font-weight: 400 !important;
    letter-spacing: 0px !important;
    color: var(--jb-sp-secondary) !important;
    text-transform: uppercase !important;
    margin: 0 0 12px !important;
}

/* Elegant center divider line */
.jb-sp-section-divider {
    width: 48px;
    height: 2px;
    background: var(--jb-sp-primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* =============================================
   Related Products — Premium Grid (4 cols)
   Reuses apnet-product-grid.css card system
   ============================================= */
.jb-sp-related-products .apnet-product-grid.apnet-grid-4col {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
}

/* Tablet: 2 columns */
@media (max-width: 992px) {
    .jb-sp-related-products .apnet-product-grid.apnet-grid-4col {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
}

/* Mobile: 2 columns (keep compact) */
@media (max-width: 480px) {
    .jb-sp-related-products .apnet-product-grid.apnet-grid-4col {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}

/* =============================================
   PHASE 3: MAGNIFIER LENS
   ============================================= */

/* Make the image wrap a magnifier anchor */
.jb-sp-main-image-wrap {
    cursor: zoom-in;
}

.jb-sp-magnifier {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid var(--jb-sp-border);
    border-radius: var(--jb-sp-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    background-repeat: no-repeat;
    pointer-events: none;
    /* Don't block mousemove events */
    opacity: 0;
    z-index: 10;
    transition: opacity 0.15s ease;
    overflow: hidden;
}

/* =============================================
   PHASE 3: LIGHTBOX
   ============================================= */
.jb-sp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.jb-sp-lightbox.is-open {
    opacity: 1;
    pointer-events: all;
}

/* Backdrop */
.jb-sp-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Image wrap */
.jb-sp-lb-image-wrap {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jb-sp-lb-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--jb-sp-radius);
    transition: opacity 0.2s ease;
    display: block;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

/* Close button */
.jb-sp-lb-close {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 3;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s ease !important;
    line-height: 1;
}

.jb-sp-lb-close:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

/* Nav arrows */
.jb-sp-lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    width: 48px;
    height: 48px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease !important;
}

.jb-sp-lb-nav:hover {
    background: rgba(255, 255, 255, 0.28) !important;
}

.jb-sp-lb-prev {
    left: 24px;
}

.jb-sp-lb-next {
    right: 24px;
}

/* Dot indicators */
.jb-sp-lb-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 8px;
}

.jb-sp-lb-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.jb-sp-lb-dot.active {
    background: white;
    transform: scale(1.25);
}

/* =============================================
   PHASE 3: MOBILE STICKY BAR
   ============================================= */
.jb-sp-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: white;
    border-top: 1px solid var(--jb-sp-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.jb-sp-sticky-bar.is-visible {
    transform: translateY(0);
}

.jb-sp-sticky-price {
    font-family: var(--jb-sp-font);
    font-size: 18px;
    font-weight: 600;
    color: var(--jb-sp-secondary);
    white-space: nowrap;
}

.jb-sp-sticky-btn {
    flex: 1;
    display: block;
    text-align: center;
    font-family: var(--jb-sp-font) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    color: white !important;
    background: var(--jb-sp-primary) !important;
    border-radius: var(--jb-sp-radius-sm) !important;
    padding: 14px 20px !important;
    cursor: pointer;
    transition: background 0.2s ease;
    -webkit-text-fill-color: white !important;
}

.jb-sp-sticky-btn:hover {
    background: var(--jb-sp-secondary) !important;
}

/* Only show sticky bar on mobile */
@media (min-width: 769px) {
    .jb-sp-sticky-bar {
        display: none !important;
    }
}

/* =============================================
   RESPONSIVE BREAKPOINTS
   ============================================= */

/* --- Tablet (768px – 992px) ---
   Side-by-side but narrower. Gallery smaller at 45/55 */
@media (min-width: 769px) and (max-width: 992px) {
    .jb-sp-layout {
        grid-template-columns: 45fr 55fr;
        gap: 32px;
    }

    .jb-sp-gallery-col {
        top: 80px;
    }

    .jb-single-product-page .jb-sp-title {
        font-size: 22px !important;
    }

    .jb-sp-thumb {
        width: 60px;
        height: 75px;
    }

    .jb-sp-add-to-cart-wrap .single_add_to_cart_button {
        padding: 12px 20px !important;
    }
}

/* --- Mobile (≤ 768px) ---
   Single column. Gallery scrolls inline. */
@media (max-width: 768px) {
    .jb-sp-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 40px;
    }

    /* Gallery: Un-sticky, swipeable on mobile */
    .jb-sp-gallery-col {
        position: relative;
        top: 0;
    }

    /* Smaller thumbnails row, always visible without scroll */
    .jb-sp-thumb-strip {
        gap: 6px;
    }

    .jb-sp-thumb {
        width: 58px;
        height: 72px;
    }

    /* Title */
    .jb-single-product-page .jb-sp-title {
        font-size: 20px !important;
    }

    /* Info section gap tighter on small screens */
    .jb-sp-info-col {
        gap: 16px;
    }

    /* Price */
    .jb-sp-price .price {
        font-size: 22px !important;
    }

    /* Add to Cart: Stack vertically on very small screens */
    .jb-sp-add-to-cart-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .jb-sp-add-to-cart-wrap input[type="number"].qty {
        width: 100% !important;
        text-align: left !important;
    }

    .jb-sp-add-to-cart-wrap .single_add_to_cart_button {
        width: 100% !important;
        text-align: center !important;
        padding: 16px 20px !important;
        font-size: 15px !important;
    }

    /* Accordion: slightly looser for touch targets */
    .jb-sp-acc-header {
        padding: 18px 16px;
    }

    .jb-sp-acc-content {
        padding: 0 16px 16px;
    }

    /* Size table: allow horizontal scroll on very small screens */
    .jb-sp-size-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Full-width sections */
    .jb-sp-tabs-section,
    .jb-sp-related-section {
        margin-bottom: 40px;
    }
}

/* --- Small Mobile (≤ 480px) --- */
@media (max-width: 480px) {
    .jb-single-product-page .jb-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .jb-single-product-page .jb-sp-title {
        font-size: 18px !important;
    }

    .jb-sp-thumb {
        width: 50px;
        height: 62px;
    }
}