/* ===================================================================
   MOBILE RESPONSIVE STYLES - SIMPLIFIED (v2.1)
   =================================================================== */

/* --- Anti-zoom rules for all input fields --- */
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"], 
textarea, 
select {
    font-size: 16px !important; /* Prevent iOS zoom */
}

/* --- Global Product Page Constraint --- */
body.single-product div.product {
    /* overflow-x: hidden;  Let's handle this on the children */
}

@media (max-width: 1024px) {
    /* --- Ettore Theme Single Product Page Overrides --- */

    /* 
     * Use a high-specificity selector to override the theme's grid layout.
     * This forces the two columns (image and summary) to stack vertically on mobile.
     */
    #qodef-woo-page.qodef--single .qodef-woo-single-inner {
        grid-template-columns: 1fr !important; /* Force single column */
        gap: 20px !important; /* Add some vertical spacing */
    }

    /* Reset child elements to simply fill their parent grid cell and hide their own overflow */
    .single-product .qodef-woo-single-inner > .qodef-woo-single-image,
    .single-product .qodef-woo-single-inner > .summary.entry-summary {
        width: 100%;
        float: none;
        overflow-x: hidden; /* Contain overflow within this component */
    }

    /* --- FPD Container Fluidity --- */
    .fpd-product-designer-wrapper,
    .fpd-container {
        width: 100% !important;
        max-width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        box-sizing: border-box;
    }

    /* --- Accordion Tabs --- */
    .qodef-woo-accordion-tabs {
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden; /* Contain overflow within this component */
    }
}

@media (max-width: 768px) {
    /* --- General Container Adjustments --- */
    .d2-enhanced-container {
        padding: 20px 15px;
        margin-left: 0;
        margin-right: 0;
        border-width: 1px;
    }

    .d2-header h3 {
        font-size: 22px;
    }
    .d2-header p {
        font-size: 14px;
    }

    /* --- Preset Grid --- */
    .d2-presets-grid {
        /* Use 2 columns on most mobile devices for better spacing */
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .d2-preset-button {
        padding: 15px 10px;
        font-size: 12px;
    }

    /* --- Form Inputs & Buttons --- */
    .d2-prompt-input,
    .d2-text-input {
        font-size: 16px !important; /* Prevent mobile zoom */
        padding: 12px;
        /* Ensure consistent mobile behavior */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        zoom: 1;
    }
    
    /* Text input mobile-specific adjustments (inherits styling from desktop) */
    .d2-text-input {
        padding: 14px 60px 14px 16px; /* Match desktop padding */
    }
    
    .d2-generate-button {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }

    /* --- Action Section --- */
    .d2-action-section {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .d2-stats-panel {
        background: rgba(0,0,0,0.02);
        border-radius: 8px;
        padding: 10px;
        width: auto;
        justify-content: center;
    }
    
    .d2-stats-value {
        font-size: 28px;
    }

    /* --- Advanced Options --- */
    .d2-advanced-options {
        padding: 15px 10px;
    }
    
    .d2-mood-tag {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .d2-color-option {
        width: 30px;
        height: 30px;
    }

    /* --- Mobile Progress Overlay --- */
    .d2-overlay-content {
        padding: 25px 15px 15px;
        max-width: 95vw;
        box-sizing: border-box;
    }

    .d2-status-text {
        font-size: 18px;
    }
    
    .d2-status-message {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    /* --- Further fine-tuning for smaller screens --- */
    .d2-enhanced-container {
        padding: 15px 10px;
    }
    
    .d2-header h3 {
        font-size: 20px;
    }
    
    .d2-prompt-input,
    .d2-text-input {
        font-size: 16px !important; /* Consistent font size - prevents zoom */
    }

    .d2-generate-button {
        padding: 14px;
    }
} 