/**
 * ShopMobile Pro - Responsive Styles
 * Media queries y estilos adaptativos
 */

/* ==========================================================================
   Mobile First Base (320px - 767px)
   Los estilos base ya están optimizados para móvil
   ========================================================================== */

/* ==========================================================================
   Tablets (768px y superior)
   ========================================================================== */

@media (min-width: 768px) {
    
    /* Header */
    .header-top {
        font-size: 0.9375rem;
    }

    .header-main {
        padding: 1.25rem 0;
    }

    .custom-logo {
        max-height: 70px;
    }

    .desktop-nav {
        display: block;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .header-actions {
        gap: 1.5rem;
    }

    /* Search */
    .header-search {
        padding: 1.5rem 0;
    }

    .search-field {
        padding: 1rem 1.25rem;
    }

    /* Footer */
    .footer-widgets-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }

    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    /* Content */
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .post-content {
        padding: 2rem;
    }

    .post-title {
        font-size: 1.75rem;
    }

}

/* ==========================================================================
   Desktop (1024px y superior)
   ========================================================================== */

@media (min-width: 1024px) {
    
    /* Header */
    .header-main-content {
        gap: 2rem;
    }

    .primary-menu {
        gap: 2.5rem;
    }

    .primary-menu a {
        font-size: 1.0625rem;
    }

    /* Footer */
    .footer-widgets {
        padding: 4rem 0;
    }

    .footer-widgets-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }

    .footer-bottom {
        padding: 2rem 0;
    }

    /* Content */
    .posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }

    .site-content {
        padding: 4rem 0;
    }

}

/* ==========================================================================
   Large Desktop (1440px y superior)
   ========================================================================== */

@media (min-width: 1440px) {
    
    .header-main {
        padding: 1.5rem 0;
    }

    .primary-menu {
        gap: 3rem;
    }

    .footer-widgets {
        padding: 5rem 0;
    }

    .posts-grid {
        gap: 3.5rem;
    }

}

/* ==========================================================================
   Landscape Mobile (orientación horizontal)
   ========================================================================== */

@media (max-height: 500px) and (orientation: landscape) {
    
    .mobile-navigation {
        width: 240px;
    }

    .mobile-nav-header {
        padding: 1rem;
    }

    .mobile-nav-content {
        padding: 0.5rem;
    }

    .mobile-menu a {
        padding: 0.75rem;
    }

}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    
    .site-header,
    .site-footer,
    .back-to-top,
    .mobile-navigation,
    .mini-cart-overlay,
    .header-search {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000000;
    }

    a {
        text-decoration: underline;
    }

    img {
        max-width: 100%;
        page-break-inside: avoid;
    }

}

/* ==========================================================================
   Accessibility - 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;
    }

}

/* ==========================================================================
   Dark Mode Support (opcional)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    
    /* Descomentar para habilitar modo oscuro automático
    
    body {
        background-color: #111827;
        color: #f9fafb;
    }

    .site-header {
        background-color: #1f2937;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .post-card {
        background-color: #1f2937;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .post-title a {
        color: #f9fafb;
    }

    .search-field,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        background-color: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }

    */

}

/* ==========================================================================
   High Contrast Mode
   ========================================================================== */

@media (prefers-contrast: high) {
    
    .button,
    button,
    input[type="submit"] {
        border: 2px solid currentColor;
    }

    a {
        text-decoration: underline;
    }

}

/* ==========================================================================
   Touch Device Optimizations
   ========================================================================== */

@media (hover: none) and (pointer: coarse) {
    
    /* Aumentar área de toque en dispositivos táctiles */
    .button,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remover hover effects en táctiles */
    .post-card:hover {
        transform: none;
    }

    .post-card:hover .post-thumbnail img {
        transform: none;
    }

}

/* ==========================================================================
   Responsive Tables
   ========================================================================== */

@media (max-width: 767px) {
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

}

/* ==========================================================================
   Responsive Embeds
   ========================================================================== */

.wp-block-embed,
.wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.wp-block-embed iframe,
.wp-block-embed object,
.wp-block-embed embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Responsive Images
   ========================================================================== */

img {
    height: auto;
    max-width: 100%;
}

/* ==========================================================================
   Container Queries (experimental)
   ========================================================================== */

@supports (container-type: inline-size) {
    
    .post-card {
        container-type: inline-size;
    }

    @container (min-width: 400px) {
        .post-content {
            padding: 2rem;
        }
    }

}
