/* ============================================
   MAGORA – Responsive Design
   ============================================ */

/* Tablet: 1024px and below */
@media (max-width: 1024px) {
    :root {
        --container-padding: 1.25rem;
    }

    .main-nav { display: none; }
    .mobile-menu-btn { display: flex; }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-2xl);
    }

    .hero-subtitle { margin-left: auto; margin-right: auto; }

    .hero-ctas { justify-content: center; }

    .hero-stats { justify-content: center; }

    .hero-visual { display: none; }

    .hero-scroll-indicator { display: none; }

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

    .category-large {
        grid-row: span 1;
        min-height: 260px;
    }

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

    .story-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .story-visual { display: none; }

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

    .steps-grid {
        flex-wrap: wrap;
        gap: var(--space-lg);
    }

    .step-connector { display: none; }

    .local-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

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

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

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

    .footer-brand {
        grid-column: span 3;
    }

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

/* Tablet: 768px and below */
@media (max-width: 768px) {
    :root {
        --space-4xl: 4rem;
        --space-5xl: 5rem;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

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

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

    .review-card {
        min-width: 300px;
        max-width: 300px;
    }

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .footer-brand {
        grid-column: span 2;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

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

    .about-floating-card {
        right: var(--space-md);
        bottom: -15px;
    }

    .dropdown-menu { display: none; }

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

    .map-placeholder {
        height: 300px;
    }
}

/* Mobile: 640px and below */
@media (max-width: 640px) {
    :root {
        --container-padding: 1rem;
        --space-4xl: 3rem;
        --space-5xl: 3.5rem;
    }

    .announcement-bar { font-size: 0.75rem; padding: 0.5rem; }

    .header-inner { height: 64px; }
    .logo-name { font-size: 1.4rem; }
    .logo-tagline { font-size: 0.55rem; }

    .header-actions { gap: 0; }
    .header-icon-btn { width: 38px; height: 38px; }

    .hero {
        min-height: auto;
        padding: var(--space-3xl) 0;
    }

    .hero-content {
        padding: var(--space-xl) 0;
    }

    .hero-badge {
        font-size: 0.7rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        gap: var(--space-lg);
    }

    .hero-stat-number {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

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

    .category-card {
        min-height: 200px;
    }

    .category-card h3 {
        font-size: 1.1rem;
    }

    .category-card p {
        font-size: 0.78rem;
    }

    .product-filters {
        gap: var(--space-xs);
    }

    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.78rem;
    }

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

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

    .product-card-name {
        font-size: 0.88rem;
    }

    .price-current {
        font-size: 1rem;
    }

    .offer-card {
        padding: var(--space-xl);
    }

    .offer-card h3 {
        font-size: 1.2rem;
    }

    .steps-grid {
        flex-direction: column;
        align-items: center;
    }

    .step-card {
        max-width: 100%;
    }

    .review-card {
        min-width: 280px;
        max-width: 280px;
        padding: var(--space-xl);
    }

    .social-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

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

    .trust-card { padding: var(--space-md); }
    .trust-card h4 { font-size: 0.82rem; }
    .trust-card p { font-size: 0.72rem; }
    .trust-icon { width: 52px; height: 52px; font-size: 1.1rem; }

    .contact-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .contact-form-wrapper {
        padding: var(--space-xl);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .footer-brand {
        grid-column: span 1;
        text-align: center;
    }

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

    .footer-links-group,
    .footer-contact-group {
        text-align: center;
    }

    .footer-contact-item {
        justify-content: center;
    }

    .footer-links-group a:hover {
        padding-left: 0;
    }

    .whatsapp-float {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
        bottom: 1rem;
        right: 1rem;
    }

    .back-to-top {
        width: 42px;
        height: 42px;
        bottom: 1rem;
        left: 1rem;
    }

    .modal {
        max-width: 100%;
        border-radius: var(--radius-xl);
        margin: var(--space-md);
    }

    .modal-body {
        padding: var(--space-xl);
    }

    .loading-logo .logo-name {
        font-size: 2.5rem;
    }
}

/* Mobile: 480px and below */
@media (max-width: 480px) {
    .hero {
        padding: var(--space-2xl) 0;
    }

    .hero-content {
        padding: var(--space-md) 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: center;
    }

    .hero-ctas .btn {
        width: 100%;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--space-md);
    }

    .hero-stat-divider {
        width: 40px;
        height: 1px;
    }

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

    .category-card {
        min-height: 180px;
    }

    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }

    .product-card-info {
        padding: var(--space-sm) var(--space-md);
    }

    .product-card-name {
        font-size: 0.82rem;
        margin-bottom: 0.25rem;
    }

    .product-card-rating {
        margin-bottom: 0.25rem;
    }

    .stars { font-size: 0.65rem; }
    .rating-count { font-size: 0.65rem; }

    .price-current { font-size: 0.9rem; }
    .price-original { font-size: 0.75rem; }

    .product-card-actions-overlay {
        opacity: 1;
        transform: translateX(0);
        top: var(--space-sm);
        right: var(--space-sm);
    }

    .product-action-btn {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }

    .product-card-bottom {
        opacity: 1;
        transform: translateY(0);
    }

    .product-card-bottom .btn {
        padding: 0.5rem;
        font-size: 0.7rem;
    }

    .local-map { order: -1; }

    .map-placeholder {
        height: 240px;
    }

    .about-image-main {
        margin-bottom: var(--space-xl);
    }

    .about-img-placeholder {
        height: 300px;
    }

    .whatsapp-tooltip { display: none; }

    .toast {
        min-width: auto;
        max-width: calc(100vw - 2rem);
    }
}

/* Fixed header padding */
@media (min-width: 1025px) {
    body {
        padding-top: 0;
    }
}

/* Ensure body has space for mobile nav */
@media (max-width: 1024px) {
    .header {
        position: sticky;
        top: 0;
    }
}

/* Print styles */
@media print {
    .header, .footer, .whatsapp-float, .back-to-top,
    .announcement-bar, .search-overlay, .mobile-menu,
    .modal-overlay, .toast-container, .loading-screen {
        display: none !important;
    }

    .hero { min-height: auto; padding: 2rem 0; }
    .section { padding: 2rem 0; }
}
