/* ============================================
   ZAZ Foods - Responsive Styles
   ============================================ */

/* ============================================
   Large Devices (Tablets - 992px to 1199px)
   ============================================ */

@media (max-width: 1199px) {
    :root {
        --container-max-width: 960px;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-2xl);
    }

    .footer-column:first-child {
        grid-column: 1 / -1;
    }

    .hero-slider {
        height: 550px;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }

    .hero-description {
        font-size: var(--font-size-md);
    }

    .hero-content {
        max-width: 600px;
    }
}

/* ============================================
   Medium Devices (Tablets - 768px to 991px)
   ============================================ */

@media (max-width: 991px) {
    :root {
        --container-max-width: 720px;
        --header-height: 70px;
    }

    /* Hero Slider */
    .hero-slider {
        height: 500px;
    }

    .hero-content {
        max-width: 500px;
        padding: 40px 0;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-description {
        font-size: var(--font-size-md);
    }

    .btn-large {
        padding: var(--spacing-md) var(--spacing-xl);
        font-size: var(--font-size-md);
    }

    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-md);
    }

    .slider-prev {
        left: 15px;
    }

    .slider-next {
        right: 15px;
    }

    /* Sticky Header */
    .header-sticky .main-navigation {
        box-shadow: var(--shadow-md);
    }

    /* Header */
    .header-top {
        display: none;
    }

    .nav-menu-wrapper {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 80%;
        max-width: 400px;
        height: calc(100vh - var(--header-height));
        background: var(--color-white);
        padding: var(--spacing-xl);
        overflow-y: auto;
        transition: left var(--transition-base);
        z-index: var(--z-fixed);
        box-shadow: var(--shadow-xl);
    }

    .nav-menu-wrapper.active {
        left: 0;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .nav-item {
        border-bottom: 1px solid var(--color-bg-light);
    }

    .nav-link {
        padding: var(--spacing-md) 0;
        justify-content: space-between;
    }

    .nav-link::after {
        display: none;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: var(--spacing-lg);
        display: none;
        margin-top: var(--spacing-sm);
    }

    .nav-item.dropdown.active .dropdown-menu {
        display: block;
    }

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

    /* Hero Section */
    .hero-slide {
        height: 500px;
    }

    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-md);
    }

    .slider-prev {
        left: 15px;
    }

    .slider-next {
        right: 15px;
    }

    .slider-indicators .indicator {
        width: 10px;
        height: 10px;
    }

    .slider-indicators .indicator.active {
        width: 12px;
        height: 12px;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-description {
        font-size: var(--font-size-md);
    }

    .hero-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .hero-features {
        margin-top: 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .feature-item {
        padding: var(--spacing-md);
    }

    /* Products & Blog */
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    /* About Section */
    .about-content-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .about-text .section-title {
        text-align: center;
    }

    .about-features {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    /* Newsletter */
    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form .form-group {
        flex-direction: column;
    }

    .newsletter-form input[type="email"] {
        width: 100%;
    }

    .newsletter-form .btn-white {
        width: 100%;
    }

    /* Footer */
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }

    .footer-bottom-links {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Section Padding */
    .section-padding {
        padding: var(--spacing-2xl) 0;
    }
}

/* ============================================
   Small Devices (Phones - 576px to 767px)
   ============================================ */

@media (max-width: 767px) {
    :root {
        --container-max-width: 540px;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    /* Typography */
    h1 {
        font-size: var(--font-size-4xl);
    }

    h2 {
        font-size: var(--font-size-3xl);
    }

    h3 {
        font-size: var(--font-size-xl);
    }

    /* Header */
    .nav-wrapper {
        gap: var(--spacing-md);
    }

    .site-logo img {
        max-height: 40px;
    }

    .header-actions {
        gap: var(--spacing-sm);
    }

    .search-toggle,
    .mobile-menu-toggle,
    .wishlist-link,
    .cart-link {
        width: 35px;
        height: 35px;
        font-size: var(--font-size-md);
    }

    /* Hero */
    .hero-slider {
        height: 450px;
    }

    .hero-slide {
        height: 450px;
    }

    .hero-content {
        max-width: 100%;
        padding: 30px 0;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
        margin-bottom: var(--spacing-md);
    }

    .hero-description {
        font-size: var(--font-size-sm);
        margin-bottom: var(--spacing-lg);
    }

    .hero-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .btn-large {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-sm);
    }

    .slider-prev,
    .slider-next {
        display: none;
    }

    .slider-indicators {
        bottom: 15px;
    }

    /* Page Hero */
    .page-hero {
        height: 350px;
    }

    .page-hero-sm {
        height: 280px;
    }

    .page-hero-title {
        font-size: var(--font-size-3xl);
    }

    .page-hero-description {
        font-size: var(--font-size-md);
    }

    /* About Page */
    .story-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .story-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .story-image img {
        height: 400px;
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .certifications-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contact Page */
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Products Page */
    .products-layout {
        grid-template-columns: 1fr;
    }

    .products-sidebar {
        position: static;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Products */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .product-info {
        padding: var(--spacing-md);
    }

    .product-title {
        font-size: var(--font-size-sm);
    }

    .product-price {
        font-size: var(--font-size-md);
    }

    /* Section Titles */
    .section-title {
        font-size: var(--font-size-2xl);
    }

    .section-description {
        font-size: var(--font-size-md);
    }

    /* Testimonials */
    .testimonials-slider {
        padding: 0 40px;
    }

    .testimonials-track {
        flex-direction: column;
        gap: 16px;
        min-height: auto;
    }

    .testimonial-card {
        flex: 0 0 auto;
        width: 100%;
        max-width: 480px;
        padding: 32px 28px;
    }

    .testimonial-text {
        font-size: 15px;
    }

    .testimonial-author img {
        width: 56px;
        height: 56px;
    }

    .testimonial-prev,
    .testimonial-next {
        width: 44px;
        height: 44px;
    }

    .testimonial-prev {
        left: 0;
    }

    .testimonial-next {
        right: 0;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .footer-column:first-child {
        grid-column: auto;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-column {
        text-align: center;
    }

    .footer-column .contact-info p {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-description {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Back to Top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ============================================
   Extra Small Devices (Phones - up to 575px)
   ============================================ */

@media (max-width: 575px) {
    /* Typography */
    h1 {
        font-size: var(--font-size-3xl);
    }

    h2 {
        font-size: var(--font-size-2xl);
    }

    /* Header */
    .site-logo img {
        max-height: 35px;
    }

    /* Hero */
    .hero-slide {
        height: 350px;
    }

    .hero-title {
        font-size: var(--font-size-xl);
    }

    .hero-description {
        font-size: var(--font-size-sm);
    }

    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-actions {
        opacity: 1;
        transform: none;
        flex-direction: row;
        position: static;
        margin-top: var(--spacing-md);
        justify-content: center;
    }

    .product-action-btn {
        width: 35px;
        height: 35px;
    }

    /* Page Hero */
    .page-hero {
        height: 280px;
    }

    .page-hero-sm {
        height: 220px;
    }

    .page-hero-title {
        font-size: var(--font-size-2xl);
    }

    .page-hero-description {
        font-size: var(--font-size-sm);
    }

    /* About Page */
    .story-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .stat-number {
        font-size: var(--font-size-2xl);
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .process-timeline::before {
        left: 30px;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: var(--font-size-lg);
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .certifications-grid {
        grid-template-columns: 1fr;
    }

    .cta-actions {
        flex-direction: column;
    }

    /* Contact Page */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Products Page */
    .products-toolbar {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: stretch;
    }

    .products-controls {
        justify-content: space-between;
    }

    .sort-dropdown select {
        min-width: 150px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Blog Page */
    .featured-post-card {
        grid-template-columns: 1fr;
    }

    .featured-post-image {
        min-height: 280px;
    }

    .featured-post-content {
        padding: 24px;
    }

    .featured-post-title {
        font-size: 24px;
    }

    .featured-post-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .blog-toolbar {
        padding: 16px;
    }

    .blog-categories-filter {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .blog-card-image {
        height: 200px;
    }

    .blog-sidebar {
        gap: 24px;
    }

    .sidebar-widget {
        padding: 24px;
    }

    /* Homepage Sections */
    .mega-menu-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .category-item {
        flex: 0 0 calc(25% - 20px);
        min-width: 140px;
    }

    .promo-grid {
        grid-template-columns: 1fr;
    }

    .promo-banner-image {
        height: 240px;
    }

    .deal-card {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .deal-image {
        min-height: 320px;
    }

    .deal-content {
        padding: 36px;
    }

    .deal-title {
        font-size: 26px;
    }

    .current-price {
        font-size: 34px;
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .app-download-card {
        grid-template-columns: 1fr;
    }

    .app-download-image {
        min-height: 300px;
    }

    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* About */
    .about-features {
        grid-template-columns: 1fr;
    }

    /* Homepage Mobile */
    .mega-menu {
        display: none;
    }

    .category-carousel-wrapper {
        padding: 0 40px;
    }

    .category-item {
        flex: 0 0 calc(50% - 20px);
        min-width: 130px;
    }

    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .carousel-nav {
        width: 36px;
        height: 36px;
    }

    .promo-grid {
        grid-template-columns: 1fr;
    }

    .promo-banner-image {
        height: 200px;
    }

    .promo-title {
        font-size: 20px;
    }

    .deal-card {
        grid-template-columns: 1fr;
        border-radius: 20px;
    }

    .deal-image {
        min-height: 280px;
    }

    .deal-content {
        padding: 28px;
    }

    .deal-title {
        font-size: 22px;
    }

    .current-price {
        font-size: 28px;
    }

    .countdown-number {
        font-size: 22px;
        padding: 6px 12px;
        min-width: 50px;
    }

    .deal-actions {
        flex-direction: column;
    }

    .trust-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .trust-item {
        padding: 20px;
    }

    .trust-icon {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }

    .app-download-card {
        grid-template-columns: 1fr;
    }

    .app-download-content {
        padding: 32px 24px;
    }

    .app-title {
        font-size: 26px;
    }

    .app-features {
        grid-template-columns: 1fr;
    }

    .app-buttons {
        flex-direction: column;
    }

    .app-download-image {
        min-height: 250px;
    }

    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .newsletter-icon-large {
        font-size: 36px;
    }

    /* Fresh Arrivals - Keep 4 columns on tablet, 2 on mobile */
    .fresh-arrivals .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Testimonials */
    .testimonials-slider {
        padding: 0 50px;
    }

    .testimonial-card {
        flex: 0 0 calc(40% - 12px);
        padding: 32px 28px;
    }

    .testimonial-text {
        font-size: 15px;
    }

    .testimonial-author img {
        width: 48px;
        height: 48px;
    }

    .testimonial-prev,
    .testimonial-next {
        width: 40px;
        height: 40px;
    }

    .testimonial-indicators .indicator {
        width: 34px;
        height: 34px;
    }

    /* Newsletter */
    .newsletter-section {
        padding: var(--spacing-2xl) 0;
    }

    .newsletter-text h2 {
        font-size: var(--font-size-2xl);
    }

    /* Blog */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Footer */
    .footer-main {
        padding: var(--spacing-2xl) 0;
    }

    .footer-bottom {
        padding: var(--spacing-lg) 0;
    }

    .footer-bottom-content {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .footer-bottom-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .payment-methods {
        display: none;
    }

    /* Buttons */
    .btn {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-sm);
    }

    .btn-large {
        padding: var(--spacing-md) var(--spacing-xl);
    }

    /* Spacing */
    .section-padding {
        padding: var(--spacing-xl) 0;
    }

    /* Search Overlay */
    .search-container {
        padding: 0 var(--spacing-md);
    }

    .search-form {
        flex-direction: column;
    }

    .search-form input[type="search"] {
        padding: var(--spacing-md);
    }

    .search-submit {
        width: 100%;
        height: 50px;
    }

    .search-close {
        top: 10px;
        right: 10px;
    }

    /* Cart Dropdown */
    .cart-dropdown {
        width: 300px;
        right: -50px;
    }

    /* Mobile Navigation */
    .nav-menu-wrapper {
        width: 100%;
        max-width: none;
    }
}

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

@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
    }

    abbr[title]::after {
        content: " (" attr(title) ")";
    }

    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }

    pre {
        white-space: pre-wrap !important;
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }

    .site-header,
    .site-footer,
    .hero-section,
    .newsletter-section,
    .back-to-top,
    .search-overlay,
    .mobile-menu-toggle,
    .cart-widget,
    .wishlist-link {
        display: none !important;
    }

    body {
        font-size: 12pt;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}

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

@media (prefers-contrast: high) {
    :root {
        --color-primary: #000;
        --color-text: #000;
        --color-text-light: #333;
        --color-text-muted: #666;
    }

    .btn-primary {
        border: 2px solid var(--color-black);
    }

    a {
        text-decoration: underline;
    }
}

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