/* CANES Pet Shop - Responsive Styles */

/* Tablet Styles (768px and below) */
@media (max-width: 768px) {
    :root {
        --container-padding: 1.5rem; /* Reduced padding for smaller screens but still adequate spacing */
    }
    
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--shadow);
        gap: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-link {
        padding: 1rem 2rem;
        border-bottom: 1px solid var(--accent-color);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--accent-color);
        margin: 0;
        padding-left: 2rem;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 6rem 1.5rem 4rem;
    }
    
    .hero-content {
        margin-right: 0;
        margin-bottom: 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-icon {
        font-size: 8rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .category-card {
        padding: 2rem 1.5rem;
    }
    
    .products-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .filter-buttons {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .about-image i {
        font-size: 8rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
        text-align: center;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .search-container {
        margin: 0 1.5rem;
        padding: 1.5rem;
    }
}

/* Mobile Styles (480px and below) */
@media (max-width: 480px) {
    :root {
        --container-padding: 1rem; /* Minimum padding for mobile but still providing breathing room */
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-logo h1 {
        font-size: 1.75rem;
    }
    
    .nav-logo .tagline {
        font-size: 0.8rem;
    }
    
    .nav-actions {
        gap: 0.5rem;
    }
    
    .hero {
        padding: 5rem 1rem 3rem;
        min-height: 80vh;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-card {
        padding: 1.5rem;
    }
    
    .category-card i {
        font-size: 2.5rem;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
        min-width: auto;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-card {
        margin: 0 auto;
        max-width: 350px;
    }
    
    .about-text p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .about-features {
        gap: 0.75rem;
    }
    
    .feature {
        font-size: 0.9rem;
    }
    
    .contact-item {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
    
    .footer-section {
        padding: 0 0.5rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .search-container {
        margin: 0 1rem;
        padding: 1rem;
    }
    
    .search-input {
        padding: 0.875rem;
        font-size: 1rem;
    }
}

/* Extra Small Mobile (320px and below) */
@media (max-width: 320px) {
    :root {
        --container-padding: 0.75rem; /* Minimal but still usable padding for very small screens */
    }
    
    .nav-container {
        padding: 0 0.75rem;
    }
    
    .hero {
        padding: 4rem 0.75rem 2rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .category-card h3 {
        font-size: 1.25rem;
    }
    
    .category-card p {
        font-size: 0.875rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .contact-form {
        padding: 1rem;
    }
    
    .footer-section {
        padding: 0 0.25rem;
    }
}

/* Large Desktop Styles (1400px and above) */
@media (min-width: 1400px) {
    :root {
        --container-padding: 3rem; /* More generous padding for large screens */
    }
    
    .container {
        max-width: 1400px;
    }
    
    .nav-container {
        padding: 0 3rem;
    }
    
    .hero {
        padding: 8rem 3rem 6rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.375rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
    
    .category-card {
        padding: 3rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 2.5rem;
    }
    
    .about-content {
        gap: 5rem;
    }
    
    .contact-content {
        gap: 5rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .nav-toggle,
    .search-overlay,
    .cart-sidebar,
    .cart-overlay,
    .hero-buttons,
    .filter-buttons,
    .add-to-cart,
    .contact-form,
    .social-links {
        display: none !important;
    }
    
    .hero {
        margin-top: 0;
        padding: 2rem 0;
        background: none !important;
    }
    
    .section-title {
        color: var(--text-dark) !important;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .category-card,
    .product-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
    
    .footer {
        background: none !important;
        color: var(--text-dark) !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #6b4423;
        --text-dark: #000000;
        --text-light: #333333;
        --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    .btn-secondary {
        border-width: 3px;
    }
    
    .nav-link::after {
        height: 3px;
    }
}

/* Dark Mode Support (if user prefers dark color scheme) */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #b8956f;
        --secondary-color: #2d2520;
        --accent-color: #3a332b;
        --text-dark: #f5f5f5;
        --text-light: #cccccc;
        --white: #1a1a1a;
        --shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }
    
    .header {
        background: #1a1a1a;
        border-bottom: 1px solid #333;
    }
    
    .dropdown-menu {
        background: #1a1a1a;
        border: 1px solid #333;
    }
    
    .product-card,
    .category-card,
    .contact-form {
        background: #222;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea,
    .search-input {
        background: #333;
        border-color: #555;
        color: #f5f5f5;
    }
    
    .cart-sidebar {
        background: #1a1a1a;
    }
/* Menú cerrado por defecto en mobile */
.nav-menu {
  display: none;
  flex-direction: column;
}

.nav-menu.active {
  display: flex;
}

/* Overlay de búsqueda cerrado por defecto */
.search-overlay {
  display: none;
  justify-content: center;
  align-items: center;
}

.search-overlay.active {
  display: flex;
}





}