/* Modal Base Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Desktop Two-Column Layout - Ray-Ban Style */
@media (min-width: 769px) {
    .modal-content {
        display: grid;
        grid-template-rows: 1fr;
        grid-template-columns: 50% 50%;
        height: 100vh;
    }

    /* Hide mobile header on desktop, use custom layout */
    .modal-header {
        display: none;
    }

    /* Progress Bar - visible at top of right column - BLACK like Ray-Ban */
    .progress-bar {
        position: absolute !important;
        top: 0 !important;
        left: 50% !important;
        width: 50% !important;
        height: 5px !important;
        z-index: 1000 !important;
        background-color: #e5e5e5 !important;
        display: block !important;
        margin: 0 !important;
    }

    .progress-bar .progress-fill {
        height: 100% !important;
        background-color: #000 !important;
        transition: width 0.3s ease;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
    }

    /* Left Column - Product Display */
    .product-summary {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        background: #fff;
        border-right: 1px solid #e5e5e5;
        position: relative;
        padding: 0;
        height: 100vh;
    }

    /* Logo in top-left of left column */
    .product-summary::before {
        content: '';
        position: absolute;
        top: 24px;
        left: 24px;
        width: 120px;
        height: 50px;
        background-image: url('/images/logo.png');
        background-size: contain;
        background-repeat: no-repeat;
        background-position: left center;
        z-index: 10;
    }

    .product-summary .product-image {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 100px 60px 120px;
        width: 100%;
        height: auto;
        margin: 0;
    }

    .product-summary .product-image img {
        width: 90%;
        max-width: none;
        height: auto;
        max-height: 60vh;
        object-fit: contain;
    }

    /* Product info at bottom-left - more padding to avoid cutoff */
    .product-summary .product-info {
        position: absolute;
        bottom: 50px;
        left: 32px;
        right: 32px;
        text-align: left;
        margin: 0;
        z-index: 10;
        display: block !important;
        padding-bottom: 10px;
    }

    .product-summary .product-info h3 {
        font-size: 14px;
        font-weight: 700;
        color: #000;
        text-transform: uppercase;
        letter-spacing: 0.3px;
        margin: 0 0 4px 0;
        display: block !important;
    }

    .product-summary .product-info .price {
        display: none !important;
    }

    .product-summary .product-info .frame-size {
        font-size: 13px;
        color: #666;
        display: block !important;
    }

    /* Right Column - Options */
    .modal-body {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        padding: 60px 24px 220px 24px;
        position: relative;
        height: 100vh;
        box-sizing: border-box;
    }

    /* Back button styling */
    .modal-body .modal-navigation {
        position: relative;
        margin-bottom: 20px;
        z-index: 20;
    }

    .modal-body .back-button {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #333;
        font-size: 14px;
        padding: 8px 0;
    }

    /* Close button - visible in top-right */
    .close-modal,
    #closeModal {
        position: fixed !important;
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        color: #666;
        background: #fff;
        border: 1px solid #e5e5e5;
        border-radius: 50%;
        cursor: pointer;
        z-index: 1001;
    }

    .close-modal:hover,
    #closeModal:hover {
        color: #000;
        border-color: #000;
    }

    /* Remove the pseudo-element close button */
    .modal-content::after {
        display: none;
    }

    /* Adjust modal body content area */
    .modal-body h2 {
        margin: 0 0 16px;
        padding-top: 0;
        font-size: 24px;
    }

    .modal-body .modal-subtitle {
        margin-bottom: 24px;
    }

    .modal-body .lens-options,
    .modal-body .prescription-options,
    .modal-body .prescription-form,
    .modal-body .review-selection {
        flex: 1;
        padding-bottom: 200px;
    }

    /* Desktop Price Bar - Bottom Right - matches Ray-Ban style */
    .desktop-price-bar {
        position: fixed;
        bottom: 0;
        left: 50%;
        right: 0;
        background: #fff;
        border-top: 1px solid #e5e5e5;
        padding: 20px 32px;
        display: flex;
        justify-content: flex-end;
        align-items: baseline;
        gap: 12px;
        z-index: 100;
    }

    .desktop-price-bar .price-label {
        font-size: 15px;
        font-weight: 400;
        color: #000;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .desktop-price-bar .original-price {
        font-size: 14px;
        color: #999;
        text-decoration: line-through;
    }

    .desktop-price-bar .current-price {
        font-size: 16px;
        font-weight: 600;
        color: #000;
    }

    /* Desktop prescription and selection actions - ensure buttons visible */
    .prescription-actions,
    .selection-actions {
        margin-bottom: 60px;
        padding-bottom: 20px;
    }

    .prescription-actions .btn-primary,
    .selection-actions .btn-primary,
    #addToCart {
        position: relative;
        z-index: 50;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Hide mobile price display by default (shown only on mobile via media query) */
.mobile-price-display {
    display: none;
}

.modal-logo {
    height: 30px;
    width: auto;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
}

.close-modal:hover {
    color: #000;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #e5e5e5;
    margin: 0;
    position: relative;
}

.progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #000;
    transition: width 0.3s ease;
    width: 0;
}

.progress-step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    color: #666;
}

.progress-step.active {
    background-color: #000;
    color: #fff;
}

.progress-line {
    flex: 1;
    height: 2px;
    background-color: #e5e5e5;
    max-width: 100px;
}

/* Modal Body */
.modal-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-body h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 500;
}

.modal-subtitle {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Lens Options */
.lens-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
    padding: 0;
}

.lens-option {
    display: flex;
    align-items: center;
    padding: 24px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    background-color: #fff;
    text-decoration: none;
    position: relative;
    gap: 16px;
}

.lens-option:hover {
    border: 2px solid #000;
    padding: 23px;
}

.lens-icon {
    width: 48px;
    height: 48px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lens-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lens-info {
    flex: 1;
}

.lens-info h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 500;
    color: #000;
}

.lens-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.lens-option i {
    color: #666;
    font-size: 16px;
    margin-left: 16px;
}

.lens-features {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.feature {
    display: flex;
    align-items: center;
    color: #000;
    font-size: 14px;
    line-height: 1.4;
}

.lens-tag {
    display: inline-block;
    background-color: #000;
    color: white;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 12px;
}

.lens-price {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.original-price {
    color: #666;
    text-decoration: line-through;
    font-size: 14px;
}

.price {
    color: #000;
    font-weight: 500;
    font-size: 16px;
}

/* Prescription Options */
.prescription-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.prescription-option {
    position: relative;
    width: 100%;
}

.option-button {
    width: 100%;
    text-align: left;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.option-button:hover {
    border-color: #000;
}

.option-button h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 500;
}

.option-button p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.recommended-tag {
    position: absolute;
    top: -8px;
    right: 16px;
    background: #000;
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.prescription-option.recommended .option-button {
    border-color: #000;
}

/* Confirmation Modal */
.confirmation-content {
    max-width: 400px;
    text-align: center;
    padding: 30px;
}

.confirmation-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Desktop Confirmation Modal Fixes */
@media (min-width: 769px) {

    #confirmationModal .modal-content,
    .confirmation-content {
        max-width: 450px;
        width: auto;
        height: auto;
        padding: 40px;
        margin: auto;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: block;
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    #confirmationModal .modal-content {
        max-width: 450px;
        width: auto;
        height: auto;
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .confirmation-buttons {
        flex-wrap: nowrap;
        margin-top: 24px;
    }

    .confirmation-buttons button {
        min-width: 150px;
        padding: 14px 28px;
        font-size: 14px;
    }
}

/* Prescription Input Screen Styles */
.modal-navigation {
    margin-bottom: 24px;
}

.back-button {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
}

.back-button:hover {
    color: #000;
}

.prescription-form {
    padding: 20px;
}

.eye-section {
    margin-bottom: 32px;
}

.eye-section h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
    color: #000;
}

.prescription-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    color: #666;
}

.pupillary-distance {
    margin-bottom: 25px;
}

.pd-row {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid #e5e5e5;
    padding: 10px;
}

.pd-label {
    font-weight: 500;
    flex: 1;
}

.pd-select {
    flex: 1;
}

.pd-table {
    width: 100%;
    border-collapse: collapse;
}

.pd-table th,
.pd-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #e5e5e5;
    background-color: #f8f9fa;
}

.pd-table th {
    font-weight: 600;
}

.pd-table td.pd-label {
    font-weight: 500;
}

.custom-select {
    position: relative;
    width: 100%;
}

.custom-select select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background-color: white;
    appearance: none;
    cursor: pointer;
}

.custom-select::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #333;
    pointer-events: none;
}

.prism-fields {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prism-fields h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.prism-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #e5e5e5;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.prism-row .eye-label {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.prism-row .custom-select {
    flex: 0 0 120px;
    max-width: 120px;
}

.prism-row .custom-select select {
    background-color: #f1f3f5;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.checkbox-inline input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.checkbox-inline label {
    font-weight: normal;
    margin: 0;
    line-height: 1.4;
}

.prescription-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
}

.prescription-info p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.prescription-info strong {
    color: #333;
}

.prescription-confirmation {
    margin: 25px 0;
}

.prescription-confirmation .checkbox-inline {
    align-items: flex-start;
}

.prescription-confirmation label {
    font-size: 14px;
    color: #666;
}

.info-icon {
    color: #666;
    font-size: 16px;
    margin-top: 2px;
    cursor: help;
}

.prescription-actions {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.how-to-read {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    display: block;
    margin-bottom: 25px;
}

.same-prescription-check {
    margin-bottom: 20px;
}

.prescription-table {
    width: 100%;
    margin-bottom: 30px;
}

.prescription-table table {
    width: 100%;
    border-collapse: collapse;
}

.prescription-table th,
.prescription-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.prescription-table th {
    font-weight: 600;
    color: #333;
}

.prescription-table td:first-child {
    font-weight: 500;
}

.btn-primary {
    background-color: #000;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #333;
}

.btn-secondary {
    background-color: #fff;
    color: #000;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: border-color 0.2s ease;
}

.btn-secondary:hover {
    border-color: #000;
}

/* Product Summary Styles */
.product-summary {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 24px;
}

.product-image {
    width: 80px;
    height: 80px;
    margin-right: 16px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    flex: 1;
}

.product-info h3 {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 4px;
    color: #000;
}

.product-info .price {
    font-size: 18px;
    font-weight: 500;
    color: #000;
    margin: 0;
}

/* Review Selection Screen */
.selection-summary {
    margin-top: 24px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 20px;
}

.product-details {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 16px;
}

.frame-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.frame-info h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 500;
}

.frame-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.selection-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    color: #666;
    font-size: 14px;
}

.total-price {
    font-size: 18px;
    font-weight: 500;
}

.action-buttons {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.action-buttons .btn-primary {
    min-width: 200px;
}

/* Review Screen Styles */
.selection-summary {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    background: #f8f8f8;
    border-radius: 8px;
}

.frame-info {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.frame-info img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 4px;
}

.frame-text h3 {
    margin: 0;
    font-size: 18px;
    color: #000;
}

.frame-text p {
    margin: 8px 0 0;
    color: #666;
}

.lens-info {
    border-top: 1px solid #ddd;
    padding-top: 24px;
}

.lens-info h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #000;
}

.lens-info p {
    margin: 0;
    color: #666;
}

#prescriptionDetail {
    margin-top: 16px;
}

.total-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: #f8f8f8;
    border-radius: 8px;
}

.total-price h3 {
    margin: 0;
    font-size: 16px;
    color: #000;
}

.total-price p {
    margin: 4px 0 0;
    font-size: 24px;
    font-weight: 600;
    color: #000;
}

.price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 15px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 14px;
}

.breakdown-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    color: #000;
    margin-top: 10px;
}

/* Lens Thickness Options */
.lens-thickness-options {
    margin-top: 16px;
}

.lens-thickness-label {
    display: block;
    font-size: 14px;
    color: #000;
    margin-bottom: 8px;
}

.lens-thickness-swatches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lens-thickness-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
}

.lens-thickness-swatch:hover {
    transform: scale(1.1);
}

.lens-thickness-swatch.selected {
    box-shadow: 0 0 0 2px #000;
}

/* Transitions Options */
.transitions-options {
    margin-top: 16px;
}

.transitions-label {
    display: block;
    font-size: 14px;
    color: #000;
    margin-bottom: 8px;
}

.transitions-swatches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.transitions-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
}

.transitions-swatch:hover {
    transform: scale(1.1);
}

.transitions-swatch.selected {
    box-shadow: 0 0 0 2px #000;
}

/* Color Options */
.color-options {
    margin-top: 16px;
}

.color-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
}

.color-swatches {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 44px;
    height: 44px;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s;
    background: none;
}

.color-swatch img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.selected {
    position: relative;
}

.color-swatch.selected::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid #000;
    border-radius: 50%;
}

.lens-continue {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lens-continue.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.lens-continue i {
    color: #fff;
    font-size: 20px;
}

@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        height: 100%;
        margin: 0;
        display: flex;
        flex-direction: column;
    }

    /* Mobile: Progress bar at the very top */
    .progress-bar {
        order: -2;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 4px !important;
        z-index: 1002 !important;
        margin: 0 !important;
    }

    /* Mobile: Redesigned header - price centered, X on right */
    .modal-header {
        order: -1;
        padding: 12px 16px;
        display: flex;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 4px;
        left: 0;
        right: 0;
        background: #fff;
        z-index: 1001;
        border-bottom: 1px solid #e5e5e5;
        min-height: 44px;
    }

    /* Mobile: Hide the logo */
    .modal-header .modal-logo {
        display: none !important;
    }

    /* Mobile: Show price bar centered */
    .modal-header .mobile-price-display {
        display: flex !important;
        flex-direction: row;
        align-items: baseline;
        justify-content: center;
        gap: 6px;
    }

    .modal-header .mobile-price-display .price-label {
        font-size: 11px;
        font-weight: 400;
        color: #666;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }

    .modal-header .mobile-price-display .original-price {
        font-size: 13px;
        color: #999;
        text-decoration: line-through;
    }

    .modal-header .mobile-price-display .current-price {
        font-size: 13px;
        font-weight: 600;
        color: #000;
    }

    /* Mobile: Close button positioned absolutely on the right */
    .modal-header .close-modal {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        color: #666;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        line-height: 1;
    }

    .modal-header .close-modal:hover {
        color: #000;
    }

    /* Mobile: Hide product summary section */
    .product-summary {
        display: none !important;
    }

    /* Mobile: Hide desktop price bar */
    .desktop-price-bar {
        display: none !important;
    }

    .modal-body {
        padding: 20px;
        padding-top: 70px;
        /* Account for fixed header */
        box-sizing: border-box;
    }

    .modal-body h2 {
        font-size: 20px;
    }

    .lens-options {
        gap: 12px;
        margin-top: 20px;
        padding: 0;
    }

    .lens-option {
        padding: 16px;
        margin: 0;
        box-sizing: border-box;
    }

    .lens-option:hover {
        padding: 15px;
    }

    .lens-icon {
        margin-right: 0;
        margin-bottom: 12px;
    }

    .prescription-inputs {
        grid-template-columns: repeat(2, 1fr);
    }

    .action-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .action-buttons .btn-primary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .modal-body h2 {
        font-size: 18px;
    }

    .modal-subtitle {
        font-size: 14px;
    }

    .lens-option {
        padding: 18px;
    }

    .lens-continue {
        position: static;
        transform: none;
        width: 100%;
        height: 44px;
        border-radius: 8px;
        margin-top: 12px;
    }

    .lens-continue i {
        font-size: 16px;
    }

    .prescription-inputs {
        grid-template-columns: 1fr;
    }

    .prescription-form {
        padding: 16px;
    }
}

.prescription-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.prescription-table th,
.prescription-table td {
    padding: 0.75rem;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.prescription-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.prescription-table td:first-child {
    font-weight: 500;
    background-color: #f9f9f9;
    text-align: left;
}

.pupillary-info {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-weight: 500;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.item-label {
    font-weight: 500;
    color: #333;
    flex: 0 0 120px;
}

.item-name {
    flex: 1;
    margin: 0 1rem;
    color: #666;
}

.item-price {
    font-weight: 500;
    color: #333;
}

.breakdown-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.total-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #000;
}

.lens-options-summary {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.price-breakdown {
    max-width: 600px;
    margin: 0 auto;
}