/**
 * ValvePro Theme - Responsive Styles
 * 
 * @package ValvePro
 */

/* ============================================
   TABLET (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    /* Grid adjustments */
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Product detail */
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ============================================
   MOBILE LANDSCAPE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Typography */
    body {
        font-size: 15px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    /* Layout */
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    /* Grid */
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Header */
    .header-top {
        display: none;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        z-index: 1000;
        transition: left 0.3s ease;
        padding: 2rem;
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-link {
        display: block;
        padding: 0.5rem 0;
        border-bottom: 1px solid #eee;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .search-box {
        display: none;
    }
    
    /* Hero */
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    /* Page Header */
    .page-header {
        padding: 1.5rem 0;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    /* Cards */
    .card-image {
        height: 150px;
    }
    
    .product-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.5rem;
    }
    
    /* Product Detail */
    .product-gallery-placeholder {
        height: 280px;
        font-size: 4rem;
    }
    
    /* Forms */
    .form-row-2 {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    /* Buttons */
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    /* Inquiry Panel */
    .inquiry-panel {
        width: 100%;
        max-width: 100%;
    }
    
    /* Contact Page */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    /* Category Nav */
    .category-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 1rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .category-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* ============================================
   MOBILE PORTRAIT (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    /* Grid - Single column */
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: 1fr;
    }
    
    /* Header */
    .logo-text {
        font-size: 1rem;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    /* Hero */
    .hero h1 {
        font-size: 1.5rem;
    }
    
    /* Products */
    .card-image {
        height: 180px;
    }
    
    .product-price {
        font-size: 1.25rem;
    }
    
    /* Product Detail */
    .product-title {
        font-size: 1.5rem;
    }
    
    #price-value {
        font-size: 2rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
    }
    
    /* Specs */
    .spec-selector-section {
        padding: 1rem;
    }
    
    .spec-option {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Forms */
    input, select, textarea {
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    /* Inquiry Cart */
    .inquiry-cart {
        bottom: 1rem;
        right: 1rem;
    }
    
    .inquiry-cart-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .header,
    .footer,
    .inquiry-cart,
    .inquiry-panel,
    .overlay,
    .btn,
    .menu-toggle {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #003366;
        --color-gray: #666;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   DARK MODE (optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    :root {
        --color-white: #1a1a1a;
        --color-dark: #ffffff;
        --color-light-gray: #2a2a2a;
        --color-gray: #444;
        --color-medium-gray: #aaa;
        --color-accent: #1e3a5f;
    }
    
    body {
        background: #121212;
        color: #e0e0e0;
    }
    
    .card {
        background: #1e1e1e;
    }
    
    .form-control {
        background: #2a2a2a;
        color: #fff;
        border-color: #444;
    }
    */
}
