/* ================================================
   MODENLO FRAMER - PROFESSIONAL TWO-COLUMN LAYOUT
   Clean, modern order form design
   ================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color palette */
    --primary: #10B981;
    --primary-dark: #059669;
    --teal: #14B8A6;
    --teal-dark: #0D9488;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-tertiary: #9CA3AF;
    --border-color: #E5E7EB;
    --background: #FFFFFF;
    --surface: #F9FAFB;
    --blue-primary: #3B82F6;
    --blue-hover: #2563EB;
    --red-price: #EF4444;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--surface);
    color: var(--text-primary);
    line-height: 1.5;
}

.logo-image {
    height: 56px;
    width: auto;
    display: block;
    transition: transform 0.2s;
}

.logo-image:hover {
    transform: scale(1.05);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-8);
    margin-top: 88px;
}

.main-content {
    background: var(--background);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* ================================================
   PAGE HEADER
   ================================================ */

.framer-header {
    padding: var(--space-10) var(--space-10) 0;
    background: var(--background);
}

.framer-header .order-title {
    margin-bottom: 0;
}

/* ================================================
   TWO-COLUMN GRID LAYOUT
   ================================================ */

.framer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 800px;
}

.upload-preview-col {
    background: var(--surface);
    padding: var(--space-10);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.order-form-col {
    padding: var(--space-10);
    background: var(--background);
}

/* ================================================
   UPLOAD AREA
   ================================================ */

.upload-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.upload-dropzone {
    border: 3px dashed var(--blue-primary);
    border-radius: var(--radius-lg);
    background: var(--background);
    padding: var(--space-12);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    min-height: 400px;
}

.upload-dropzone:hover {
    background: #EFF6FF;
    border-color: var(--blue-hover);
}

.upload-dropzone svg {
    color: var(--blue-primary);
    margin-bottom: var(--space-6);
}

.upload-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.upload-or {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--space-4);
    font-weight: 500;
}

.choose-file-btn {
    background: var(--blue-primary);
    color: white;
    border: none;
    padding: var(--space-3) var(--space-8);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.choose-file-btn:hover {
    background: var(--blue-hover);
    transform: translateY(-1px);
}

.upload-help {
    margin-top: var(--space-6);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.6;
}

/* ================================================
   PREVIEW AREA
   ================================================ */

.preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.canvas-wrapper {
    flex: 1;
    background: white;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-color);
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#photoCanvas,
#cropOverlay {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

#photoCanvas {
    cursor: move;
    position: absolute;
}

#photoCanvas:active {
    cursor: grabbing;
}

#cropOverlay {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}

.change-image-btn {
    background: var(--background);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    align-self: center;
}

.change-image-btn:hover {
    border-color: var(--blue-primary);
    color: var(--blue-primary);
}

/* ================================================
   RESOLUTION WARNING
   ================================================ */

.resolution-warning {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-5);
    background: #FEF3C7;
    border: 2px solid #F59E0B;
    border-radius: var(--radius-lg);
}

.warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.warning-content {
    flex: 1;
}

.warning-content strong {
    display: block;
    color: #92400E;
    font-size: 1rem;
    margin-bottom: var(--space-2);
}

.warning-content p {
    color: #92400E;
    font-size: 0.875rem;
    line-height: 1.6;
}

.warning-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #92400E;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    flex-shrink: 0;
}

.warning-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* ================================================
   ORDER FORM
   ================================================ */

.order-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-8);
    letter-spacing: -0.02em;
}

.price-cart-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-10);
    padding-bottom: var(--space-8);
    border-bottom: 1px solid var(--border-color);
}

.price-display-main {
    display: flex;
    align-items: flex-start;
    gap: var(--space-1);
    color: var(--red-price);
}

.currency {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: var(--space-1);
}

.amount {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
}

.cents {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: var(--space-1);
}

.add-to-cart-main {
    background: var(--primary);
    color: white;
    border: none;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.025em;
}

.add-to-cart-main:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.add-to-cart-main:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
    transform: none;
}

/* ================================================
   FORM SECTIONS
   ================================================ */

.form-section {
    margin-bottom: var(--space-8);
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
    text-transform: uppercase;
}

.zoom-value {
    float: right;
    color: var(--text-primary);
    font-weight: 600;
}

.form-select {
    width: 100%;
    padding: var(--space-4);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--background);
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236B7280' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
    font-weight: 500;
}

.form-select:hover {
    border-color: var(--text-tertiary);
}

.form-select:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ================================================
   ZOOM SLIDER
   ================================================ */

.zoom-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: var(--radius-lg);
    outline: none;
    margin-bottom: var(--space-4);
}

.zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--blue-primary);
    border-radius: 50%;
    cursor: grab;
    transition: all 0.2s;
}

.zoom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.zoom-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
}

.zoom-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--blue-primary);
    border-radius: 50%;
    cursor: grab;
    border: none;
}

.reset-btn {
    background: var(--background);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn:hover {
    border-color: var(--blue-primary);
    color: var(--blue-primary);
}

/* ================================================
   SIZE BUTTON GRID - MODERN SELECTION
   ================================================ */

.size-button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-3);
}

.size-btn {
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    min-height: 80px;
}

.size-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.size-btn.active {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
    border-width: 3px;
}

.size-btn.active::after {
    content: '✓';
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.size-btn-label {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.size-btn-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

/* ================================================
   ORIENTATION ICON BUTTONS
   ================================================ */

.orientation-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.orientation-btn {
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.orientation-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.orientation-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    border-width: 3px;
}

.orientation-btn svg {
    stroke: currentColor;
}

.orientation-btn span {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.orientation-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ================================================
   ZOOM CONTROL WITH ICON RESET
   ================================================ */

.zoom-control-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.zoom-control-wrapper .zoom-slider {
    flex: 1;
    margin-bottom: 0;
}

.reset-icon-btn {
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.reset-icon-btn:hover {
    border-color: var(--blue-primary);
    color: var(--blue-primary);
    background: rgba(59, 130, 246, 0.05);
    transform: rotate(-45deg);
}

.reset-icon-btn:active {
    transform: rotate(-45deg) scale(0.95);
}

.reset-icon-btn svg {
    stroke: currentColor;
}

/* ================================================
   STICKY ADD TO CART CTA
   ================================================ */

.sticky-cta-wrapper {
    margin-top: var(--space-10);
    padding-top: var(--space-8);
    border-top: 2px solid var(--border-color);
}

.add-to-cart-cta {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 700;
    font-size: 1.125rem;
    box-shadow: var(--shadow-lg);
    letter-spacing: 0.025em;
}

.add-to-cart-cta:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

.add-to-cart-cta:active:not(:disabled) {
    transform: translateY(-1px);
}

.add-to-cart-cta:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
    opacity: 0.6;
}

.cta-text {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cta-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-weight: 700;
}

.cta-currency {
    font-size: 1rem;
}

.cta-amount {
    font-size: 1.5rem;
}

.cta-cents {
    font-size: 1rem;
}

/* ================================================
   MOUNT OPTIONS - IMAGE FOCUSED DESIGN
   ================================================ */

.mount-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mount-label {
    color: var(--text-secondary);
}

.mount-selected-name {
    color: var(--text-primary);
}

.mount-selected-price {
    color: var(--teal);
    margin-left: auto;
}

.mount-grid-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.mount-card {
    border: 3px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--background);
    position: relative;
}

.mount-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.mount-card.selected {
    border-color: var(--teal);
    box-shadow: 0 0 0 1px var(--teal);
}

.mount-card-image {
    width: 100%;
    aspect-ratio: 1;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.mount-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mount-card-image-placeholder {
    font-size: 3rem;
    opacity: 0.3;
}

.mount-card-label {
    position: absolute;
    bottom: var(--space-2);
    right: var(--space-2);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.mount-card-label svg {
    width: 12px;
    height: 12px;
}

.mount-card-name {
    padding: var(--space-3);
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* ================================================
   BUTTONS
   ================================================ */

.upload-new-btn {
    width: 100%;
    background: var(--background);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: var(--space-6);
}

.upload-new-btn:hover {
    border-color: var(--text-tertiary);
    background: var(--surface);
}

/* ================================================
   TOAST NOTIFICATION
   ================================================ */

.toast {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: var(--primary);
    color: white;
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    align-items: center;
    gap: var(--space-3);
    z-index: 10000;
    font-weight: 600;
    animation: slideIn 0.3s ease-out;
}

.toast.show {
    display: flex;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.hide {
    animation: slideOut 0.3s ease-in;
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 1024px) {
    .framer-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile: Upload preview appears FIRST, then form */
    .upload-preview-col {
        order: 1;
    }
    
    .order-form-col {
        order: 2;
    }
    
    .framer-header {
        padding: var(--space-8) var(--space-8) var(--space-4);
    }
    
    .framer-header .order-title {
        margin-bottom: var(--space-4);
        text-align: center;
    }
    
    .mount-grid-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: var(--space-4);
        margin-top: 70px;
    }
    
    .framer-header {
        padding: var(--space-6) var(--space-5) var(--space-3);
    }
    
    .upload-preview-col,
    .order-form-col {
        padding: var(--space-5);
    }
    
    .upload-preview-col {
        padding-top: var(--space-4);
    }
    
    /* Reorder elements on mobile */
    .order-form-col {
        display: flex;
        flex-direction: column;
    }
    
    /* Zoom control appears first (right after preview) */
    #zoomSection {
        order: 1;
    }
    
    /* Size and orientation follow zoom */
    .form-section {
        order: 2;
    }
    
    /* Mount sections come after form sections */
    #mountSection,
    #clockHandsSection,
    #frameOptionsSection {
        order: 3;
    }
    
    /* Upload button after mounts */
    .upload-new-btn {
        order: 4;
    }
    
    /* Sticky CTA stays at bottom (no order needed, naturally last) */
    .sticky-cta-wrapper {
        order: 5;
    }
    
    .order-title {
        font-size: 1.5rem;
    }
    
    .amount {
        font-size: 2.5rem;
    }
    
    .add-to-cart-main {
        width: 100%;
        font-size: 1rem;
        padding: 1rem var(--space-6);
    }
    
    /* Change mount grid to 3 columns on mobile */
    .mount-grid-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2);
    }
    
    .form-select {
        font-size: 1rem;
        padding: var(--space-4);
    }
    
    .zoom-slider {
        height: 8px;
    }
    
    .zoom-slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
    
    .zoom-slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: var(--space-2);
        margin-top: 60px;
    }
    
    .upload-preview-col,
    .order-form-col {
        padding: var(--space-4);
    }
    
    .upload-dropzone {
        padding: var(--space-6);
        min-height: 280px;
    }
    
    .upload-dropzone svg {
        width: 60px;
        height: 60px;
    }
    
    .upload-text {
        font-size: 1.1rem;
    }
    
    .choose-file-btn {
        padding: var(--space-3) var(--space-6);
        font-size: 0.95rem;
    }
    
    .order-title {
        font-size: 1.35rem;
        margin-bottom: var(--space-6);
    }
    
    .amount {
        font-size: 2rem;
    }
    
    .currency,
    .cents {
        font-size: 1.25rem;
    }
    
    .add-to-cart-main {
        padding: 0.95rem var(--space-5);
        font-size: 0.95rem;
    }
    
    .form-label {
        font-size: 0.7rem;
    }
    
    .mount-grid-cards {
        gap: var(--space-3);
    }
    
    .mount-card {
        border-width: 2px;
    }
    
    .mount-card-name {
        font-size: 0.8rem;
        padding: var(--space-2);
    }
    
    .canvas-wrapper {
        min-height: 300px;
    }
    
    .change-image-btn,
    .reset-btn,
    .upload-new-btn {
        font-size: 0.9rem;
        padding: var(--space-3) var(--space-5);
    }
}

/* Mobile Sticky CTA */
@media (max-width: 1024px) {
    .sticky-cta-wrapper {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: var(--space-4) var(--space-5);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 100;
        margin-top: 0;
    }
    
    .add-to-cart-cta {
        font-size: 1rem;
    }
    
    .cta-amount {
        font-size: 1.25rem;
    }
    
    /* Add padding to order-form-col to prevent content from hiding behind sticky button */
    .order-form-col {
        padding-bottom: 120px;
    }
    
    /* Size button grid - 2 columns on mobile */
    .size-button-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 360px) {
    .order-title {
        font-size: 1.25rem;
    }
    
    .amount {
        font-size: 1.75rem;
    }
    
    .add-to-cart-main {
        padding: 0.875rem var(--space-4);
        font-size: 0.9rem;
    }
    
    .sticky-cta-wrapper {
        padding: var(--space-3) var(--space-4);
    }
    
    .add-to-cart-cta {
        font-size: 0.95rem;
        padding: var(--space-4) var(--space-5);
    }
    
    .cta-text {
        font-size: 0.875rem;
    }
}
