/**
 * Display Planet Theme - Responsive Styles
 * Mobile-first approach
 * 
 * @package Display_Planet
 * @since 1.0.0
 */

/* ==========================================================================
   TABLET & MOBILE STYLES (max-width: 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .nav-menu {
        gap: 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   TABLET STYLES (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --spacing-xl: 2rem;
        --container-padding: 1rem;
    }
    
    /* Header */
    .top-bar-content {
        font-size: 0.75rem;
    }
    
    .top-bar-left,
    .top-bar-right {
        gap: 1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
    }
    
    .header-content {
        gap: 1rem;
    }
    
    .site-branding-text .site-title {
        font-size: 1.25rem;
    }
    
    /* Hero */
    .hero-content {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .button {
        width: 100%;
        text-align: center;
    }
    
    /* Sections */
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Categories */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .category-image {
        width: 80px;
        height: 80px;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    /* Footer */
    .footer-widgets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom-content {
        gap: 1rem;
    }
    
    .footer-menu {
        gap: 1rem;
        font-size: 0.8125rem;
    }
    
    .trust-badges {
        gap: 1rem;
    }
    
    /* Newsletter */
    .newsletter-input-group {
        flex-direction: column;
    }
    
    .newsletter-input-group button {
        width: 100%;
    }
    
    /* Specifications table */
    .specs-table th,
    .specs-table td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* ==========================================================================
   MOBILE STYLES (max-width: 480px)
   ========================================================================== */

@media (max-width: 480px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-lg: 1.5rem;
        --font-size-base: 15px;
    }
    
    /* Header */
    .top-bar {
        display: none;
    }
    
    .site-branding-text .site-title {
        font-size: 1.125rem;
    }
    
    .site-description {
        display: none;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .search-toggle,
    .menu-toggle,
    .cart-link {
        padding: 0.25rem;
    }
    
    /* Hero */
    .hero-content {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
    }
    
    /* Sections */
    .section-padding {
        padding: 1.5rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.9375rem;
    }
    
    /* Categories */
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .category-card {
        display: flex;
        align-items: center;
        text-align: left;
        gap: 1rem;
    }
    
    .category-image {
        width: 60px;
        height: 60px;
        margin: 0;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }
    
    /* Features */
    .feature-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .feature-title {
        font-size: 1.125rem;
    }
    
    .feature-description {
        font-size: 0.9375rem;
    }
    
    /* Footer */
    .footer-widgets-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-menu {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .trust-badges {
        flex-direction: column;
        gap: 1rem;
    }
    
    .payment-methods {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Mobile navigation */
    .mobile-navigation {
        width: 100%;
    }
    
    /* Back to top */
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    /* Typography */
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9375rem; }
    
    /* Buttons */
    .button,
    .btn,
    button[type="submit"],
    input[type="submit"] {
        padding: 0.625rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    /* Forms */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="number"],
    input[type="tel"],
    textarea,
    select {
        padding: 0.625rem;
        font-size: 0.9375rem;
    }
    
    /* Specifications table */
    .phone-specifications {
        padding: 1rem;
    }
    
    .specs-table {
        font-size: 0.8125rem;
    }
    
    .specs-table th,
    .specs-table td {
        padding: 0.375rem;
        display: block;
        width: 100%;
    }
    
    .specs-table th {
        font-weight: 700;
        margin-top: 0.5rem;
    }
    
    .specs-table td {
        margin-bottom: 0.75rem;
        border-bottom: 1px solid var(--color-border);
    }
    
    .specs-table tr:last-child td {
        margin-bottom: 0;
    }
}

/* ==========================================================================
   LANDSCAPE ORIENTATION
   ========================================================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero-content {
        padding: 2rem 0;
    }
    
    .mobile-navigation {
        padding: 1rem;
    }
    
    .mobile-menu a {
        padding: 0.5rem 0;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .top-bar,
    .site-header,
    .header-search,
    .mobile-navigation,
    .back-to-top,
    .site-footer,
    .newsletter-section {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    .container {
        max-width: 100%;
    }
}

/* ==========================================================================
   HIGH CONTRAST MODE
   ========================================================================== */

@media (prefers-contrast: high) {
    :root {
        --color-border: #000;
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.5);
        --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.6);
    }
    
    .button,
    .btn {
        border-width: 3px;
    }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

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