/* ========================================
   Try‑On Button Layout Fixes (external)
   ======================================== */
.nbr-tryon-container {
    margin: 20px 0;
    padding: 15px;
    background: #f0f8ff;
    border: 2px solid #4285f4;
    border-radius: 8px;
    clear: both;
    display: block;
    width: 100%;
    box-sizing: border-box;
    float: none;
}

.nbr-tryon-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    width: 100%;
}

.nbr-tryon-content {
    margin-top: 10px;
    width: 100%;
    display: block;
}

.nbr-tryon-button {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin: 10px 0;
}

/* Ensure product page elements stay aligned */
.single-product .product .quantity,
.single-product .product .single_add_to_cart_button,
.single-product .product .button {
    clear: none;
    float: none;
    display: inline-block;
    vertical-align: middle;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .nbr-tryon-container {
        margin: 15px 0;
    }
    .nbr-tryon-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .nbr-toggle-icon {
        margin-top: 5px;
    }
}

/* ========================================
   Lens Wizard Modal & Step Styles (Plugin)
   ======================================== */
.wlp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.wlp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999998;
}

.wlp-modal-content {
    position: relative;
    z-index: 999999;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    margin: 5vh auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.wlp-modal-open {
    overflow: hidden !important;
}

/* Modal Header */
.wlp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
    background: #fff;
}

.wlp-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
}

.wlp-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0;
    margin: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.wlp-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* Progress Steps */
.wlp-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #fafafa;
    border-bottom: 1px solid #eaeaea;
    flex-shrink: 0;
}

.wlp-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.wlp-step-number {
    display: inline-block;
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.wlp-step.active .wlp-step-number,
.wlp-step.completed .wlp-step-number {
    background: #00bfa6;
    color: #fff;
}

.wlp-step-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.wlp-step.active .wlp-step-label {
    color: #00bfa6;
    font-weight: 600;
}

/* Scrollable Content Area */
.wlp-step-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 24px;
    background: #fff;
}

/* Step headings */
.wlp-step-content h3 {
    margin: 0 0 15px 0;
    font-size: 20px;
    color: #000051;
}

/* Power Type Options */
.wlp-power-type-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid #eaeaea;
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.wlp-power-type-option:hover {
    border-color: #00bfa6;
    background: #f0fdfa;
}

.wlp-power-type-option.selected {
    border-color: #00bfa6;
    background: #e6f7f2;
    box-shadow: 0 4px 12px rgba(0, 191, 166, 0.15);
}

.wlp-option-icon {
    font-size: 32px;
    margin-right: 16px;
    min-width: 48px;
    text-align: center;
}

.wlp-option-icon img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

.wlp-option-content {
    flex: 1;
}

.wlp-option-content h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.wlp-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #e8f0fe;
    color: #1967d2;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.wlp-option-content p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.wlp-option-arrow {
    font-size: 20px;
    color: #00bfa6;
    margin-left: 12px;
}

/* Lens Package Card */
.wlp-package-card {
    border: 2px solid #eaeaea;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 15px;
    position: relative;
    background: #fff;
}

.wlp-package-card:hover,
.wlp-package-card.selected {
    border-color: #00bfa6;
    background: #f0fdfa;
    box-shadow: 0 4px 12px rgba(0, 191, 166, 0.15);
}

.wlp-package-badge {
    position: absolute;
    top: -10px;
    left: 20px;
    background: #ffd700;
    color: #000;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.wlp-package-image {
    text-align: center;
    margin-bottom: 15px;
}

.wlp-package-image img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    background: #fff;
    padding: 5px;
}

.wlp-package-header h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #1a1a1a;
}

.wlp-package-features {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.wlp-package-warranty {
    color: #00bfa6;
    font-size: 14px;
    margin-bottom: 10px;
}

.wlp-package-price {
    font-size: 20px;
    font-weight: bold;
    color: #1a1a1a;
}

/* Upload Box */
.wlp-upload-box {
    border: 2px dashed #eaeaea;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    background: #f9f9f9;
}

.wlp-upload-box h4 {
    margin: 0 0 10px 0;
    color: #1a1a1a;
    font-size: 16px;
}

.wlp-upload-box p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

#wlp-upload-progress {
    margin-top: 10px;
    color: #00bfa6;
}

/* Variant Step */
.wlp-variants-container {
    padding: 10px 0;
}

.wlp-variant-attribute {
    margin-bottom: 25px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}

.wlp-attribute-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 15px;
}

.wlp-attribute-label .required {
    color: #ff0000;
    margin-left: 4px;
}

/* Dropdown styling */
.wlp-variant-dropdown {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    transition: border-color 0.2s;
}

.wlp-variant-dropdown:focus {
    outline: none;
    border-color: #00bfa6;
}

/* Radio buttons styling */
.wlp-radio-label {
    display: block;
    margin: 8px 0;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.wlp-radio-label:hover {
    background: #f5f5f5;
}

.wlp-radio-label input[type="radio"] {
    margin-right: 8px;
}

/* Swatch styling */
.wlp-swatch-item {
    display: inline-block;
    margin: 5px 10px 5px 0;
    padding: 8px 16px;
    background: #fff;
    border: 2px solid #eaeaea;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-width: 60px;
}

.wlp-swatch-item.selected {
    border-color: #00bfa6;
    background: #e6f7f2;
    color: #00bfa6;
    font-weight: 600;
}

.wlp-swatch-image {
    max-width: 40px;
    max-height: 40px;
    display: block;
    margin: 0 auto 5px;
    border-radius: 4px;
}

/* Modal Footer */
.wlp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #eaeaea;
    background: #fff;
    flex-shrink: 0;
}

.wlp-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 40px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-width: 120px;
}

.wlp-btn-primary {
    background: #000051;
    color: #fff;
}

.wlp-btn-primary:hover {
    background: #000080;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 80, 0.2);
}

.wlp-btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.wlp-btn-secondary:hover {
    background: #d0d0d0;
    transform: translateY(-2px);
}

.wlp-btn-success {
    background: #00bfa6;
    color: #fff;
}

.wlp-btn-success:hover {
    background: #00a891;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 191, 166, 0.3);
}

/* ========================================
   Product Page Button Styles - Stacked Layout
   ======================================== */

/* Container for all custom buttons */
.wlp-button-container {
    margin: 20px 0;
    width: 100%;
}

/* SELECT LENSES button (always full width) */
#wlp-select-lenses-btn,
.wlp-select-lenses-btn {
    width: 100%;
    margin-bottom: 15px;
    background: #000051;
    color: #fff;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    display: block;
}

#wlp-select-lenses-btn:hover,
.wlp-select-lenses-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Configuration summary (appears after lenses are selected) */
#wlp-configuration-summary {
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.wlp-summary-text {
    font-weight: 600;
}

#wlp-edit-selection-btn {
    background: #f0f0f1;
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

/* Notice for included lenses */
.wlp-included-notice {
    color: #28a745;
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Actions row – block container (buttons stack) */
.wlp-actions-row {
    margin: 15px 0;
    display: block;
}

/* Base styles for BUY FRAME ONLY and BUY NOW buttons */
#wlp-buy-now-btn,
#wlp-frame-only-btn {
    width: 100%;
    margin-bottom: 15px;
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    display: block;
}

#wlp-frame-only-btn {
    background: #6c757d;
    color: #fff;
}

#wlp-buy-now-btn {
    background: #00bfa6;
    color: #fff;
}

#wlp-buy-now-btn:hover,
#wlp-frame-only-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* ========================================
   Global Form Alignment & Quantity Selector
   ======================================== */

/* Force entire cart form to left-align its children */
.woocommerce div.product form.cart {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 15px !important;
    width: 100% !important;
}

/* WhatsApp button container – left align */
.wsm-buttons {
    text-align: left !important;
    width: 100% !important;
}
.wsm-buttons a {
    display: inline-block !important;
}
.wsm-buttons img {
    display: inline-block !important;
    vertical-align: middle;
}

/* Quantity selector – left align & stretchable */
.quantity {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    width: auto !important;
    min-width: 140px;
    flex: 0 1 auto !important;
}

.quantity .number-button {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
    border: none !important;                /* Invisible border */
    border-radius: 4px;
    overflow: hidden;
    width: 100% !important;
    max-width: 200px;
}

.quantity .number-button .minus,
.quantity .number-button .plus {
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0 !important;
    background: #f5f5f5;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: normal !important;         /* Remove bold */
    transition: background 0.2s;
}

.quantity .number-button .minus:hover,
.quantity .number-button .plus:hover {
    background: #e0e0e0;
}

.quantity .number-button .qty {
    flex: 1 1 auto !important;
    height: 40px !important;
    min-width: 60px;
    border: none !important;
    border-left: none !important;            /* Invisible divider */
    border-right: none !important;
    text-align: center !important;
    -moz-appearance: textfield;
    margin: 0 !important;
    padding: 0 5px !important;
    box-sizing: border-box;
}

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

/* Add to Cart and Buy Now buttons – left align */
.single_add_to_cart_button,
.ts-buy-now-button {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* Hide default buttons when lens power is enabled (fallback) */
.wlp-enabled .single_add_to_cart_button,
.wlp-enabled .ts-buy-now-button {
    display: none !important;
}

/* Mobile stacking – keep left alignment */
@media (max-width: 768px) {
    .woocommerce div.product form.cart {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .single_add_to_cart_button,
    .ts-buy-now-button,
    .quantity {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* ========================================
   Additional Utility Styles
   ======================================== */

/* Need help link */
.wlp-need-help {
    text-align: right;
    margin: 10px 0 20px 0;
}

.wlp-need-help a {
    color: #00bfa6;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.wlp-need-help a:hover {
    color: #008f7a;
    text-decoration: underline;
}

/* Entry method spacing */
.wlp-entry-method-selection {
    margin-top: 10px;
}

/* Force scrollbar when needed (modal content) */
.wlp-step-content {
    overflow-y: auto !important;
    flex-grow: 1 !important;
    min-height: 0;
}

/* Ensure modal content respects height constraints */
.wlp-modal-content {
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Make sure step content doesn't overflow footer */
.wlp-modal-footer {
    flex-shrink: 0;
}

/* Force step content visibility when active */
.wlp-step-content[data-step="0"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
}

/* Ensure step 0 container has proper height */
#wlp-step-0.wlp-step-content {
    min-height: 200px;
}

/* Mobile modal adjustments */
@media (max-width: 640px) {
    .wlp-modal-content {
        max-width: 95%;
        height: 90vh;
        margin: 10px auto;
    }
    .wlp-step-content {
        padding: 15px;
    }
    .wlp-modal-header h2 {
        font-size: 20px;
    }
    .wlp-modal-close {
        font-size: 24px;
    }
}