/* Light Theme - Clean and Simple */

/* Alpine.js x-cloak - hide elements until Alpine is ready */
[x-cloak] {
    display: none !important;
}

/* Custom Size Layout - Horizontal on Desktop */
.frame-custom-size-row {
    display: flex !important;
    align-items: center !important; /* Changed from flex-end to center */
    gap: 12px !important;
}

.frame-size-input-group {
    flex: 1;
    min-width: 0;
}

.frame-size-input-group label {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 6px; /* Reduced from 4px */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 14px; /* Fixed height so labels align even if empty */
    line-height: 14px;
}

.frame-size-inputs-inline {
    display: flex;
    gap: 6px;
}

.frame-size-inputs-inline input[type="number"],
.frame-size-inputs-inline input[type="text"] {
    flex: 3;
    padding: 8px 12px !important;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 20px !important; /* More rounded to match pill buttons */
    color: #333 !important;
    font-size: 14px !important;
    height: 40px !important;
    box-sizing: border-box !important;
    opacity: 0.3; /* 30% opacity when empty */
}

/* Full opacity only when has value (not on focus if empty) */
.frame-size-inputs-inline input[type="number"].has-value,
.frame-size-inputs-inline input[type="text"].has-value {
    opacity: 1;
}

.frame-size-inputs-inline input[type="number"]:focus,
.frame-size-inputs-inline input[type="text"]:focus {
    outline: none;
    border-color: #000;
}

.frame-size-inputs-inline select {
    flex: 1;
    min-width: 50px;
    padding: 8px 6px !important; /* Reduce horizontal padding for better centering */
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 20px !important; /* More rounded to match pill buttons */
    color: #333 !important;
    font-size: 13px !important;
    height: 40px !important;
    box-sizing: border-box !important;
    text-align: center !important; /* Center the / symbol */
    text-align-last: center !important; /* Center selected option */
}

.frame-size-inputs-inline select option {
    text-align: center !important;
}

.frame-size-inputs-inline select:focus {
    outline: none;
    border-color: #000;
}

.times-horizontal {
    color: #999;
    font-size: 18px;
    user-select: none;
    margin-top: 20px !important; /* Match label height to align with inputs */
}

.frame-unit-toggle-inline {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    /* Add margin-top to match label height + margin of input groups */
    margin-top: 20px !important; /* 14px label height + 6px margin-bottom */
}

/* When unit toggle is inline with standard size dropdown, no margin needed */
.frame-unit-toggle-inline.no-margin {
    margin-top: 0 !important;
}

.frame-unit-toggle-inline button {
    padding: 0 20px !important; /* Horizontal padding for auto-width */
    background: #fff;
    border: 1px solid #ddd !important;
    color: #666;
    border-radius: 20px !important; /* More rounded to match pill buttons */
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
    height: 40px !important;
    box-sizing: border-box !important;
    line-height: 38px !important; /* Center text vertically */
    white-space: nowrap !important; /* Keep text on one line */
    flex-shrink: 0 !important; /* Don't shrink buttons */
}

.frame-unit-toggle-inline button:hover {
    border-color: #000;
}

.frame-unit-toggle-inline button.active {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

/* Mobile: Vertical Layout */
@media (max-width: 768px) {
    .frame-custom-size-row {
        flex-direction: column;
        align-items: flex-start !important; /* Align all children to the left */
        gap: 15px;
    }
    
    /* Move unit toggle to the top on mobile and align left */
    .frame-custom-size-row .frame-unit-toggle-inline {
        order: -1; /* Moves it to the beginning */
        justify-content: flex-start !important;
        width: auto;
        margin-top: 0 !important;
    }
    
    .frame-size-input-group {
        width: 100%;
    }
    
    .times-horizontal {
        display: none;
    }
    
    .frame-unit-toggle-inline {
        padding-bottom: 0;
        justify-content: flex-start !important;
        margin-top: 0 !important; /* Reset margin on mobile */
    }
    
    .frame-unit-toggle-inline button {
        flex: 0 0 auto;
        min-width: 50px;
    }
}

/* Color Swatches - Small and Elegant */
.frame-color-swatches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.frame-color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 4px; /* Reduced horizontal padding for tighter layout */
    border-radius: 6px;
    transition: all 0.15s;
    width: 60px; /* Fixed width ensures perfect alignment */
    box-sizing: border-box;
}

.frame-color-swatch:hover {
    background: #f5f5f5;
}

.frame-configurator .color-circle,
.tv-frame-configurator .color-circle {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    border-radius: 50% !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s !important;
    background-size: cover !important;
    background-position: center !important;
}

.frame-configurator .frame-color-swatch.selected .color-circle,
.tv-frame-configurator .frame-color-swatch.selected .color-circle {
    border-color: #000 !important;
    border-width: 2px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    transform: scale(1.1) !important;
}

.color-name {
    font-size: 11px;
    color: #666;
    text-align: center;
    max-width: 60px;
    word-wrap: break-word;
    line-height: 1.2;
    height: 26px; /* Fixed height to accommodate 2 lines (11px * 1.2 * 2 ≈ 26px) */
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame-color-swatch.selected .color-name {
    color: #000;
    font-weight: 500;
}

/* Mat Width Options - Circular Swatches like Colors */
.frame-mat-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start; /* Top alignment so images line up at the top */
}

.frame-mat-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.15s;
    flex: 0 0 calc(25% - 9px); /* 25% width minus gap spacing */
    max-width: calc(25% - 9px);
}

.frame-mat-option:hover {
    background: #f5f5f5;
}

.mat-visual {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f5;
    border: 2px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.frame-mat-option.selected .mat-visual {
    border-color: #000;
    border-width: 2.5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
}

.mat-visual.no-mat {
    background: repeating-linear-gradient(
        45deg,
        #f5f5f5,
        #f5f5f5 8px,
        #e8e8e8 8px,
        #e8e8e8 16px
    );
}

.mat-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.mat-label {
    font-size: 12px;
    color: #333;
    font-weight: 700; /* Changed from 600 to 700 for bolder text */
    text-align: center;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mat-name {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

.frame-mat-option.selected .mat-label {
    color: #000;
}

.frame-mat-option.selected .mat-name {
    font-weight: 600;
    color: #000;
}

.mat-recommended {
    font-size: 8px; /* Changed from 9px to 8px for smaller text */
    color: #666;
    font-style: italic;
    text-align: center;
}

.frame-mat-option.selected .mat-recommended {
    color: #000;
    font-weight: 500;
}

.mat-price {
    font-size: 10px;
    color: #999;
}

/* Mobile: Even smaller, all in one row */
@media (max-width: 768px) {
    .frame-mat-options {
        gap: 6px;
        justify-content: space-between;
    }
    
    .frame-mat-option {
        flex: 0 0 auto;
        padding: 3px;
        gap: 4px;
    }
    
    .mat-visual {
        width: 55px;
        height: 55px;
        border-width: 1.5px;
    }
    
    .frame-mat-option.selected .mat-visual {
        border-width: 2px;
        transform: scale(1.03);
    }
    
    .mat-label {
        font-size: 11px;
        line-height: 1.1;
    }
    
    .mat-name {
        font-size: 10px;
        line-height: 1.2;
    }
    
    .mat-recommended {
        font-size: 8px;
    }
}

/* Standard Size Dropdown */
.frame-standard-size-select {
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
}

.frame-standard-size-select:focus {
    outline: none;
    border-color: #000;
}

/* Frame select dropdown (for Frame Width, etc) */
.frame-select {
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    cursor: pointer;
}

.frame-select:focus {
    outline: none;
    border-color: #000;
}

/* Generic Dropdown Select */
.frame-select-dropdown {
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    cursor: pointer;
}

.frame-select-dropdown:focus {
    outline: none;
    border-color: #000;
}

/* Size Type Toggle */
.frame-size-type-toggle {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.frame-size-type-btn {
    flex: 1;
    padding: 14px 24px;
    background: #fff !important;
    border: 2px solid #ddd !important;
    color: #666 !important;
    border-radius: 100px !important; /* Force pill shape */
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: none !important; /* Remove any theme shadows */
}

.frame-size-type-btn:hover {
    border-color: #000 !important;
    background: #f5f5f5 !important;
}

.frame-size-type-btn.active {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

/* Matched Size Display */
.frame-matched {
    margin-top: 10px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
}

.frame-matched strong {
    color: #000;
}

/* Price Summary Updates */
.price-included {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

/* Checkbox for Mat Options */
.frame-mat-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px; /* Space after checkbox before expanding sections */
    margin-top: 0;
}

.frame-mat-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.frame-mat-checkbox label {
    font-size: 14px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0 !important; /* Remove any bottom margin from label */
}

/* Unified checkbox sizing for all checkboxes in configurator */
.frame-configurator input[type="checkbox"] {
    width: 14px !important;
    height: 14px !important;
    cursor: pointer !important;
    flex-shrink: 0; /* Prevent checkbox from shrinking */
}

/* Unified radio button sizing for all radio buttons in configurator */
.frame-configurator input[type="radio"] {
    width: 14px !important;
    height: 14px !important;
    cursor: pointer !important;
    flex-shrink: 0;
}

/* Display Style / Add-ons options container */
.frame-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.frame-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.frame-options label input[type="checkbox"] {
    margin: 0 !important;
}

/* Mat Width Section Wrapper */
.frame-mat-width-section {
    margin-top: 12px;
}

.frame-mat-width-section .frame-label {
    margin-bottom: 10px;
}

/* Tooltip Button */
.frame-tooltip-btn {
    background: transparent !important; /* Remove background */
    color: #666;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 14px; /* Slightly larger icon */
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-left: 4px;
}

.frame-tooltip-btn:hover {
    background: transparent !important; /* Keep transparent on hover */
    color: #000; /* Darken icon on hover */
    transform: scale(1.1);
}

/* Tooltip Popup - Desktop: Next to icon, Mobile: Center overlay */
div.frame-configurator .frame-tooltip-popup,
.frame-configurator .frame-tooltip-popup,
.frame-tooltip-popup {
    position: fixed !important; /* Changed from absolute to fixed for better positioning */
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    padding: 20px !important;
    max-width: 350px !important;
    width: max-content !important;
    z-index: 99999 !important;
    animation: tooltipFadeIn 0.2s ease !important;
    pointer-events: auto !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
}

/* Mobile: Center with overlay */
@media (max-width: 768px) {
    div.frame-configurator .frame-tooltip-popup,
    .frame-configurator .frame-tooltip-popup,
    .frame-tooltip-popup {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        max-width: 95% !important;
        width: auto !important;
    }
    
    /* Add backdrop on mobile */
    .frame-tooltip-popup::before {
        content: '' !important;
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.3) !important;
        z-index: -1 !important;
        border-radius: 0 !important;
    }
}

/* Override any pseudo-elements that might add gray overlays */
.frame-tooltip-popup::after {
    display: none !important;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.frame-tooltip-content {
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

.frame-tooltip-content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}


/* =========================
   STYLING FIXES
   ========================= */

/* Label Improvements - Bigger and More Spacing */
/* Field Group - Base Container */
.frame-field-group {
    margin-bottom: 24px; /* Consistent spacing between all sections */
}

.frame-label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px; /* Increased from 10px for more breathing room */
    margin-top: 0; /* Removed extra top margin - using field-group margin instead */
    display: flex;
    align-items: center;
    gap: 8px;
}

/* First field group shouldn't have extra top margin */
.frame-field-group:first-child {
    margin-top: 0;
}

/* Info message style (for informational notices) */
.frame-info-message {
    background: #e3f2fd;
    border-left: 3px solid #2196f3;
    padding: 10px 12px;
    font-size: 13px;
    color: #1565c0;
    border-radius: 4px;
    margin: 0;
}

/* Price Summary - Table Layout */
.frame-price-summary {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.frame-price-summary .price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
    font-size: 14px;
}

.frame-price-summary .price-line:last-child {
    border-bottom: none;
}

.frame-price-summary .price-line span:first-child {
    color: #333; /* Changed from #666 to darker */
    font-weight: 500;
}

.frame-price-summary .price-line span:last-child {
    color: #333;
    font-weight: 600;
}

.frame-price-summary .price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0 0 0;
    margin-top: 10px;
    border-top: 2px solid #ddd;
    font-size: 16px;
    font-weight: 700;
}

.frame-price-summary .price-total span:first-child {
    color: #000;
}

.frame-price-summary .price-total span:last-child {
    color: #2a2a2a;
    font-size: 20px;
}

/* Add to Cart Button - Matches Size Type Toggle Style */
.frame-btn-add {
    width: 100%;
    padding: 16px 32px !important;
    background: #000 !important;
    border: 2px solid #000 !important;
    color: #fff !important;
    border-radius: 100px !important; /* Pill shape */
    cursor: pointer;
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: none !important;
    margin-top: 20px;
}

.frame-btn-add:hover:not(.disabled) {
    background: #333 !important;
    border-color: #333 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.frame-btn-add.disabled {
    background: #ccc !important;
    border-color: #ccc !important;
    color: #888 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Error Message */
.frame-error {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 12px 16px;
    color: #c33;
    font-size: 14px;
    font-weight: 500;
    margin-top: 15px;
    text-align: center;
}

/* Artwork Thickness Field */
.frame-helper-text {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.frame-helper-text strong {
    color: #333;
    font-weight: 600;
}

.frame-artwork-thickness-input {
    display: flex;
    align-items: center;
    gap: 12px;
}

.frame-text-input {
    flex: 1;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    transition: border-color 0.2s;
}

.frame-text-input:focus {
    outline: none;
    border-color: #000;
}

.frame-text-input::placeholder {
    color: #999;
}

.frame-max-label {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    font-weight: 500;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .frame-btn-add {
        font-size: 15px !important;
        padding: 14px 28px !important;
    }
    
    .frame-artwork-thickness-input {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .frame-artwork-thickness-input .frame-text-input {
        width: 100%;
        height: 40px !important; /* Match size input height */
        padding: 8px 12px !important;
        font-size: 14px !important;
        border-radius: 20px !important; /* Match pill style */
    }
}

/* Size validation error messages */
.frame-size-error {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #ffebee;
    border-radius: 8px;
    border-left: 3px solid #d32f2f;
    font-weight: 500;
}

/* Discount styling in price breakdown */
.price-discount {
    color: #2e7d32 !important;
    font-weight: 600;
}

.price-discount span {
    color: #2e7d32 !important;
}

/* Engraving text field styling */
.frame-engraving-field {
    margin-top: 15px;
}

.frame-engraving-input {
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    transition: border-color 0.2s;
}

.frame-engraving-input:focus {
    outline: none;
    border-color: #000;
}

.frame-engraving-input::placeholder {
    color: #999;
}

.frame-engraving-helper {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
    line-height: 1.4;
}

/* Engraving Sections */
.frame-engraving-section {
    margin-top: 15px;
    padding: 0;
    background: none;
    border-radius: 0;
    border: none;
}

.frame-engraving-section .frame-label {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px; /* Match main labels */
    font-weight: 600; /* Match main labels */
    color: #333;
}

/* "Add your text" heading */
.frame-engraving-heading {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.frame-engraving-fields {
    display: flex;
    flex-direction: column;
    gap: 0; /* No gap - spacing controlled by field-row margin-bottom */
}

.frame-engraving-field-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px; /* Reduced from 16px for tighter spacing */
}

.frame-engraving-field-row > label {
    font-size: 16px !important; /* Match main label size */
    font-weight: 600 !important; /* Match main label weight */
    color: #333 !important;
    display: block !important;
    margin-bottom: 6px !important; /* Reduced from 8px */
}

/* Top and Bottom label styling - same as all field labels */
.frame-engraving-field-row label:first-child {
    font-size: 16px !important;
    font-weight: 600 !important;
}

.frame-engraving-field-row input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 30px !important; /* Pill shape */
    color: #333;
    font-size: 14px;
    transition: border-color 0.2s;
}

.frame-engraving-field-row input[type="text"]:focus {
    outline: none;
    border-color: #000;
}

.frame-engraving-field-row input[type="text"]::placeholder {
    color: #999;
}

.frame-engraving-field-row select {
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 30px !important; /* Pill shape */
    color: #333;
    font-size: 14px;
    cursor: pointer;
}

.frame-engraving-field-row select:focus {
    outline: none;
    border-color: #000;
}

.frame-engraving-orientation {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.frame-engraving-orientation label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #333;
    cursor: pointer;
}

.frame-engraving-orientation label span {
    font-size: 14px !important;
    font-weight: 400 !important;
}

.frame-engraving-orientation input[type="radio"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.frame-char-count {
    font-size: 11px;
    color: #999;
    margin-top: -4px;
}

/* Quantity and Add to Cart inline section */
.frame-add-to-cart-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.frame-quantity-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 25%;
    min-width: 200px;
}

.frame-quantity-inline .frame-label {
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
}

.frame-quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.frame-qty-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #333;
    background: white;
    border-radius: 18px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame-qty-btn:hover {
    background: #333;
    color: white;
}

.frame-qty-input {
    width: 60px;
    height: 36px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 600;
}

.frame-qty-input:focus {
    outline: none;
    border-color: #333;
}

.frame-btn-add {
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .frame-add-to-cart-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .frame-quantity-inline {
        justify-content: center;
    }
    
    .frame-engraving-section {
        padding: 15px;
    }
    
    .frame-engraving-orientation {
        flex-direction: column;
        gap: 10px;
    }
}
/* Fix quantity/button layout for new structure */
.frame-configurator .frame-add-to-cart-section {
    display: block !important;
    width: 100% !important;
}

.frame-configurator .frame-quantity-inline {
    flex: 1 !important;
    min-width: auto !important;
    width: 100% !important;
    display: block !important;
}

.frame-configurator .frame-quantity-inline > div {
    width: 100% !important;
}

/* Match quantity input height to button height */
.frame-qty-input {
    height: 52px !important; /* 16px top + 16px bottom padding + ~20px line height */
    border-radius: 26px !important; /* Half of height for pill shape */
    padding: 0 16px !important;
}

/* Center align quantity input and button vertically */
.frame-quantity-inline > div {
    align-items: center !important;
}

/* Remove margin-top from button when in inline layout */
.frame-quantity-inline .frame-btn-add {
    margin-top: 0 !important;
}

/* =========================
   LOADING SPINNER
   ========================= */

.frame-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    min-height: 300px;
}

.frame-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.frame-loading p {
    color: #666;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .frame-loading {
        padding: 40px 20px;
        min-height: 200px;
    }
    
    .frame-spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }
    
    .frame-loading p {
        font-size: 14px;
    }
}
