/* ========================================
   ANTOJITOS VEGANOS - ESTILOS RESPONSIVE
   ======================================== */

/* ========================================
   BREAKPOINTS
   ======================================== */

/* 1. XL - Extra Large (1200px+) */
/* 2. LG - Large (992px - 1199px) */
/* 3. MD - Medium (768px - 991px) */
/* 4. SM - Small (576px - 767px) */
/* 5. XS - Extra Small (< 576px) */

/* ========================================
   SCROLLBAR PERSONALIZADA
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-600);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-700);
}

/* ========================================
   TABLAS RESPONSIVE
   ======================================== */

.responsive-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.responsive-table table {
    min-width: 600px;
    width: 100%;
}

/* ========================================
   GRID RESPONSIVE
   ======================================== */

/* Grid automático responsive */
.grid-responsive {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ========================================
   HEADER RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .nav-list {
        gap: 20px;
    }
    
    .nav-list a {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 8px 0;
    }
    
    .header-inner {
        flex-wrap: nowrap;
        justify-content: space-between;
    }
    
    .menu-toggle {
        display: flex !important;
    }
    
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        gap: 10px;
        border-top: 2px solid var(--primary-100);
    }
    
    .nav-list.active {
        display: flex;
    }
    
    .nav-list li {
        width: 100%;
    }
    
    .nav-list a {
        display: block;
        padding: 12px 16px;
        border-radius: var(--border-radius-sm);
        transition: background var(--transition-fast);
        font-size: 1rem;
    }
    
    .nav-list a:hover {
        background: var(--primary-100);
    }
    
    .nav-cart {
        padding: 12px 16px;
    }
}

/* ========================================
   HERO RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .hero {
        padding: 60px 0 40px;
        min-height: auto;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-image-wrapper {
        order: 1;
    }
    
    .hero-description {
        margin: 0 auto 32px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .float-card {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 0 30px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-title-sub {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 32px;
    }
    
    .hero-buttons .btn,
    .hero-buttons .btn-outline-light {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-title-sub {
        font-size: 1.5rem;
    }
    
    .hero-badge {
        font-size: 0.8rem;
        padding: 4px 14px;
    }
}

/* ========================================
   CATEGORÍAS RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 576px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-card {
        padding: 20px 12px;
    }
    
    .category-icon {
        font-size: 2rem;
    }
    
    .category-name {
        font-size: 0.95rem;
    }
    
    .category-desc {
        font-size: 0.75rem;
        display: none;
    }
}

/* ========================================
   PRODUCTOS RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .product-info {
        padding: 16px;
    }
    
    .product-name {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
    
    .product-description {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .btn-add-to-cart {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .btn-wishlist {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .product-card {
        border-radius: var(--border-radius-sm);
    }
    
    .product-image {
        padding-top: 100%;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-name {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .btn-add-to-cart {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .btn-wishlist {
        width: 100%;
        height: 34px;
    }
    
    .product-badge {
        font-size: 0.65rem;
        padding: 2px 10px;
        top: 8px;
        right: 8px;
    }
}

/* ========================================
   PROMO BANNER RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .promo-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .promo-description {
        margin: 0 auto 24px;
        max-width: 100%;
    }
    
    .promo-features {
        grid-template-columns: repeat(3, 1fr);
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .promo-banner {
        padding: 40px 0;
    }
    
    .promo-title {
        font-size: 1.8rem;
    }
    
    .promo-emoji {
        font-size: 4rem;
    }
    
    .promo-features {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 250px;
    }
    
    .promo-feature {
        padding: 12px;
    }
    
    .promo-feature span:first-child {
        font-size: 1.5rem;
    }
}

/* ========================================
   BLOG RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .blog-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .blog-card {
        max-width: 100%;
    }
    
    .blog-image {
        padding-top: 50%;
    }
    
    .blog-meta {
        font-size: 0.75rem;
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ========================================
   NEWSLETTER RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .newsletter-section {
        padding: 60px 0;
    }
    
    .newsletter-wrapper {
        padding: 0 20px;
    }
    
    .newsletter-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .newsletter-form .form-group {
        flex-direction: column;
    }
    
    .newsletter-form input[type="email"] {
        width: 100%;
    }
    
    .newsletter-form .btn {
        width: 100%;
    }
    
    .newsletter-form .form-check {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }
}

/* ========================================
   FOOTER RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 40px 0 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-description {
        max-width: 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .footer-payments {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-social {
        justify-content: center;
    }
    
    .footer-social a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .footer-payments span {
        font-size: 0.8rem;
        padding: 2px 10px;
    }
}

/* ========================================
   CARRITO RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .carrito-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .carrito-resumen {
        position: static;
        order: 2;
    }
    
    .carrito-items {
        order: 1;
    }
}

@media (max-width: 768px) {
    .carrito-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }
    
    .carrito-item-imagen {
        width: 120px;
        height: 120px;
    }
    
    .carrito-item-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .carrito-item-precio {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .carrito-item {
        padding: 12px 0;
    }
    
    .carrito-item-imagen {
        width: 100px;
        height: 100px;
    }
    
    .carrito-item-nombre {
        font-size: 0.95rem;
    }
    
    .precio-unitario {
        font-size: 0.95rem;
    }
    
    .btn-cantidad {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .input-cantidad {
        width: 40px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .btn-eliminar {
        font-size: 1.2rem;
    }
    
    .carrito-resumen {
        padding: 16px;
    }
    
    .resumen-fila {
        font-size: 0.9rem;
    }
    
    .resumen-fila.total {
        font-size: 1.1rem;
    }
}

/* ========================================
   CHECKOUT RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .checkout-form .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .checkout-steps {
        flex-direction: column;
        gap: 8px;
    }
    
    .checkout-step {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .checkout-form {
        padding: 0;
    }
    
    .checkout-form .form-group {
        margin-bottom: 16px;
    }
    
    .checkout-form label {
        font-size: 0.9rem;
    }
    
    .checkout-form input,
    .checkout-form select,
    .checkout-form textarea {
        font-size: 0.9rem;
        padding: 10px 14px;
    }
}

/* ========================================
   EVENTOS RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .eventos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .eventos-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .evento-card {
        padding: 20px;
    }
    
    .evento-precio {
        font-size: 1.5rem;
    }
}

/* ========================================
   BLOG DETAIL RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .blog-detail .blog-header h1 {
        font-size: 1.8rem;
    }
    
    .blog-detail .blog-content {
        font-size: 1rem;
    }
    
    .blog-detail .blog-content img {
        max-width: 100%;
        height: auto;
    }
}

/* ========================================
   PANEL ADMIN RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    .admin-sidebar {
        width: 200px;
    }
    
    .admin-content {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        width: 60px;
    }
    
    .admin-sidebar .sidebar-text {
        display: none;
    }
    
    .admin-content {
        margin-left: 60px;
    }
    
    .admin-header {
        padding: 12px 16px 12px 76px;
    }
}

@media (max-width: 480px) {
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 8px;
    }
    
    .admin-content {
        margin-left: 0;
        padding: 16px;
    }
    
    .admin-header {
        padding: 12px 16px;
    }
}

/* ========================================
   MODALES RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        padding: 20px;
        max-width: 100%;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        margin: 10px;
        padding: 16px;
    }
}

/* ========================================
   TABLAS RESPONSIVE (ADMIN)
   ======================================== */

@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive table {
        min-width: 600px;
        font-size: 0.85rem;
    }
    
    .table-responsive table th,
    .table-responsive table td {
        padding: 8px 12px;
    }
}

/* ========================================
   FORMULARIOS RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .form-label {
        font-size: 0.9rem;
    }
    
    .form-control {
        font-size: 0.95rem;
        padding: 10px 14px;
    }
    
    .form-select {
        font-size: 0.95rem;
        padding: 10px 14px;
    }
}

/* ========================================
   BOTONES RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .btn-lg {
        padding: 12px 28px;
        font-size: 1rem;
    }
    
    .btn-sm {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .btn-block-mobile {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   IMÁGENES RESPONSIVE
   ======================================== */

.img-responsive {
    max-width: 100%;
    height: auto;
}

.img-fluid {
    width: 100%;
    height: auto;
}

/* ========================================
   TIPOGRAFÍA RESPONSIVE
   ======================================== */

@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 1.8rem; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.2rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }
    
    body {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }
    
    body {
        font-size: 14px;
    }
}

/* ========================================
   SPACING RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .section-padding {
        padding: 40px 0;
    }
    
    .section-padding-lg {
        padding: 60px 0;
    }
    
    .section-padding-sm {
        padding: 20px 0;
    }
}

@media (max-width: 480px) {
    .section-padding {
        padding: 30px 0;
    }
    
    .section-padding-lg {
        padding: 40px 0;
    }
}

/* ========================================
   UTILIDADES RESPONSIVE
   ======================================== */

/* Ocultar en móvil */
.hide-mobile {
    display: block;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Ocultar en desktop */
.hide-desktop {
    display: none;
}

@media (max-width: 768px) {
    .hide-desktop {
        display: block !important;
    }
}

/* Text alignment responsive */
@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center !important;
    }
    
    .text-left-mobile {
        text-align: left !important;
    }
    
    .text-right-mobile {
        text-align: right !important;
    }
}

/* Flex responsive */
@media (max-width: 768px) {
    .flex-column-mobile {
        flex-direction: column !important;
    }
    
    .flex-wrap-mobile {
        flex-wrap: wrap !important;
    }
    
    .gap-mobile {
        gap: 12px !important;
    }
}

/* Width responsive */
@media (max-width: 768px) {
    .w-100-mobile {
        width: 100% !important;
    }
    
    .max-w-100-mobile {
        max-width: 100% !important;
    }
}

/* Margin responsive */
@media (max-width: 768px) {
    .m-0-mobile { margin: 0 !important; }
    .mt-0-mobile { margin-top: 0 !important; }
    .mb-0-mobile { margin-bottom: 0 !important; }
    .mt-1-mobile { margin-top: 8px !important; }
    .mb-1-mobile { margin-bottom: 8px !important; }
    .mt-2-mobile { margin-top: 16px !important; }
    .mb-2-mobile { margin-bottom: 16px !important; }
}

/* Padding responsive */
@media (max-width: 768px) {
    .p-0-mobile { padding: 0 !important; }
    .pt-0-mobile { padding-top: 0 !important; }
    .pb-0-mobile { padding-bottom: 0 !important; }
    .p-1-mobile { padding: 8px !important; }
    .p-2-mobile { padding: 16px !important; }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .header,
    .footer,
    .hero {
        background: white !important;
    }
    
    a {
        text-decoration: none !important;
        color: black !important;
    }
}

/* ========================================
   DARK MODE (Opcional)
   ======================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a2e;
        --bg-secondary: #16213e;
        --text-primary: #e0e0e0;
        --text-secondary: #a0a0a0;
    }
}

/* ========================================
   ACCESIBILIDAD - 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;
    }
}

/* ========================================
   SOPORTE PARA TOUCH DEVICES
   ======================================== */

@media (hover: none) {
    .product-card:hover {
        transform: none !important;
    }
    
    .product-card:hover .product-image img {
        transform: none !important;
    }
    
    .btn:hover {
        transform: none !important;
    }
    
    .product-quick-view {
        display: none !important;
    }
    
    /* Aumentar tamaño de elementos táctiles */
    .btn,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn-add-to-cart {
        min-height: 44px;
    }
}

/* ========================================
   ORIENTACIÓN LANDSCAPE EN MÓVIL
   ======================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 30px 0;
    }
    
    .hero-image-wrapper {
        max-height: 300px;
        overflow: hidden;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        gap: 12px;
    }
    
    .stat-number {
        font-size: 1.2rem;
    }
}

/* ========================================
   PANTALLAS MUY PEQUEÑAS (Smartwatches, etc.)
   ======================================== */

@media (max-width: 320px) {
    .container {
        padding: 0 12px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .category-card {
        padding: 12px;
    }
    
    .category-icon {
        font-size: 1.5rem;
    }
    
    .category-name {
        font-size: 0.85rem;
    }
}