/* ============================================================================
   RESPONSIVE CSS - TUMOTOCAR
   Optimizado para tablets (768px) y móviles (480px)
   ========================================================================== */

/* ============================================================================
   TABLETS (768px y menos)
   ========================================================================== */

@media (max-width: 768px) {
    
    /* Tipografía */
    h1 { font-size: 32px; }
    h2 { font-size: 24px; }
    h3 { font-size: 20px; }
    h4 { font-size: 18px; }
    
    body {
        font-size: 13px;
    }
    
    /* Header */
    .site-header {
        padding: 12px 0;
    }
    
    .logo-container img {
        max-height: 50px;
    }
    
    .main-nav {
        display: none; /* Activar menú hamburguesa */
    }
    
    /* Hero Banner */
    .hero-banner {
        min-height: 350px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content .subtitle {
        font-size: 16px;
    }
    
    /* Beneficios */
    .benefits-section {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        padding: 40px 15px;
    }
    
    .benefit-item {
        padding: 15px;
    }
    
    .benefit-item .icon {
        font-size: 36px;
    }
    
    /* Categorías */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 40px 15px;
    }
    
    .category-card img {
        height: 180px;
    }
    
    /* Productos Grid */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 20px 0;
    }
    
    .product-card {
        border-radius: 6px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-title {
        font-size: 12px;
        min-height: 30px;
    }
    
    .product-price {
        font-size: 16px;
    }
    
    .product-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* Página Individual de Producto */
    .single-product {
        padding: 15px 0;
    }
    
    .single-product .product-images {
        margin-bottom: 20px;
    }
    
    .product-thumbnails {
        gap: 8px;
    }
    
    .product-thumbnails img {
        width: 60px;
        height: 60px;
    }
    
    .product-details h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .product-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .product-price-single {
        font-size: 24px;
    }
    
    .product-specs {
        padding: 15px;
        margin: 15px 0;
    }
    
    .quantity-selector {
        margin: 15px 0;
    }
    
    /* Sidebar */
    .sidebar {
        margin-top: 30px;
        padding: 15px;
    }
    
    .filter-widget {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }
    
    /* Carrito */
    .woocommerce-cart-form table {
        font-size: 12px;
    }
    
    .woocommerce-cart-form th,
    .woocommerce-cart-form td {
        padding: 10px;
    }
    
    .cart-totals {
        max-width: 100%;
        margin-left: 0;
        margin-top: 20px;
    }
    
    /* Checkout */
    .form-row input,
    .form-row select,
    .form-row textarea {
        padding: 10px;
        font-size: 16px; /* Prevenir zoom en iOS */
    }
    
    /* Footer */
    .site-footer {
        padding: 40px 15px 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }
    
    /* Botones */
    .button,
    button {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Carrito Flotante */
    #floating-cart {
        width: 100%;
        right: -100%;
    }
    
    #open-cart-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* ============================================================================
   MÓVILES (480px y menos)
   ========================================================================== */

@media (max-width: 480px) {
    
    /* Tipografía */
    h1 { font-size: 24px; }
    h2 { font-size: 20px; }
    h3 { font-size: 16px; }
    
    body {
        font-size: 12px;
    }
    
    p {
        margin: 10px 0;
    }
    
    /* General */
    * {
        padding: 0;
    }
    
    .container,
    .content {
        padding: 15px;
        margin: 0;
        width: 100%;
    }
    
    /* Header */
    .site-header {
        padding: 10px 0;
    }
    
    .header-inner {
        padding: 0 15px;
    }
    
    .logo-container img {
        max-height: 40px;
    }
    
    .cart-icon,
    .search-icon {
        padding: 0 10px;
    }
    
    /* Hero Banner */
    .hero-banner {
        min-height: 250px;
        padding: 20px;
    }
    
    .hero-content h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .hero-content .subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .hero-content .btn {
        font-size: 14px;
        padding: 12px 24px;
    }
    
    /* Beneficios */
    .benefits-section {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 30px 0;
    }
    
    .benefit-item {
        padding: 12px 0;
    }
    
    .benefit-item .icon {
        font-size: 32px;
        margin-bottom: 10px;
    }
    
    .benefit-item h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .benefit-item p {
        font-size: 11px;
    }
    
    /* Categorías */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 25px 0;
    }
    
    .category-card img {
        height: 150px;
    }
    
    .category-card-overlay {
        padding: 15px;
    }
    
    .category-card-overlay h3 {
        font-size: 14px;
    }
    
    /* Productos Grid */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px 0;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .product-title {
        font-size: 11px;
        min-height: 24px;
    }
    
    .product-price {
        font-size: 14px;
        margin: 8px 0;
    }
    
    .product-rating {
        font-size: 10px;
    }
    
    .product-actions {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .product-actions button {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    /* Página Individual de Producto */
    .single-product {
        padding: 0;
    }
    
    .product-details {
        padding: 0;
    }
    
    .product-details h1 {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .product-meta {
        flex-direction: column;
        gap: 5px;
        margin: 10px 0;
    }
    
    .product-price-single {
        font-size: 20px;
        margin: 15px 0;
    }
    
    .product-specs {
        padding: 12px;
        margin: 12px 0;
    }
    
    .product-specs li {
        padding: 6px 0;
    }
    
    .quantity-selector {
        margin: 12px 0;
    }
    
    .quantity-selector button {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .quantity-selector input {
        width: 45px;
        padding: 6px;
    }
    
    /* Botones */
    .button,
    button,
    input[type="button"],
    input[type="submit"],
    a.btn {
        padding: 10px 15px;
        font-size: 12px;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .product-actions {
        display: flex;
        flex-direction: column;
    }
    
    /* Sidebar */
    .sidebar {
        margin-top: 20px;
        padding: 12px;
    }
    
    .filter-widget {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    
    .filter-widget h3 {
        font-size: 14px;
    }
    
    .filter-widget label {
        padding: 6px 0;
        font-size: 11px;
    }
    
    /* Carrito */
    .woocommerce-cart-form table {
        font-size: 11px;
    }
    
    .woocommerce-cart-form th,
    .woocommerce-cart-form td {
        padding: 8px 5px;
    }
    
    .woocommerce-cart-form th {
        padding: 8px 5px;
    }
    
    .cart-totals {
        max-width: 100%;
        margin-left: 0;
        margin-top: 15px;
        padding: 15px;
    }
    
    .cart-totals table td {
        padding: 8px 0;
        font-size: 12px;
    }
    
    .cart-totals .order-total {
        font-size: 18px;
    }
    
    /* Checkout */
    .woocommerce-checkout-form {
        padding: 15px;
    }
    
    .form-row {
        margin-bottom: 15px;
    }
    
    .form-row label {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .form-row input,
    .form-row select,
    .form-row textarea {
        padding: 10px;
        font-size: 16px; /* Importante para evitar zoom en iOS */
        border-radius: 4px;
    }
    
    /* Footer */
    .site-footer {
        padding: 30px 15px 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .footer-widget h3 {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .footer-widget li {
        margin-bottom: 8px;
    }
    
    .footer-widget a {
        font-size: 12px;
    }
    
    .footer-bottom {
        padding-top: 15px;
        font-size: 11px;
    }
    
    /* Carrito Flotante */
    #floating-cart {
        width: 100%;
        right: -100%;
    }
    
    #floating-cart-items {
        max-height: calc(100vh - 250px);
    }
    
    #open-cart-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
        right: 10px;
        bottom: 10px;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        padding: 10px 0;
        font-size: 10px;
    }
    
    /* Mensajes */
    .woocommerce-message,
    .woocommerce-error {
        padding: 12px 15px;
        margin-bottom: 15px;
        font-size: 11px;
    }
    
    /* Tabla de Envíos */
    .envios-info table {
        font-size: 11px;
    }
    
    .envios-info table td {
        padding: 8px;
    }
}

/* ============================================================================
   EXTRA PEQUEÑOS (Menos de 320px - Vintage Phones)
   ========================================================================== */

@media (max-width: 320px) {
    
    h1 { font-size: 18px; }
    h2 { font-size: 16px; }
    
    body { font-size: 11px; }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 16px;
    }
    
    .hero-content .subtitle {
        font-size: 12px;
    }
}

/* ============================================================================
   ORIENTACIÓN LANDSCAPE MÓVIL
   ========================================================================== */

@media (max-width: 768px) and (orientation: landscape) {
    
    .hero-banner {
        min-height: 300px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================================
   UTILIDADES
   ========================================================================== */

/* Mostrar/Ocultar elementos según pantalla */
.hide-mobile {
    display: none !important;
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
    
    .hide-mobile {
        display: block !important;
    }
}

/* Espaciado responsive */
@media (max-width: 768px) {
    .mb-lg { margin-bottom: 20px; }
    .mt-lg { margin-top: 20px; }
    .p-lg { padding: 20px; }
}

@media (max-width: 480px) {
    .mb-lg { margin-bottom: 12px; }
    .mt-lg { margin-top: 12px; }
    .p-lg { padding: 12px; }
}
