/**
 * Responsive CSS for Charlie Racconta
 * 
 * This file contains additional responsive styles to optimize the website for mobile devices.
 */

/* Base responsive adjustments */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* Mobile typography adjustments */
@media (max-width: 640px) {
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    p {
        font-size: 0.95rem !important;
    }
    
    .text-xl {
        font-size: 1.25rem !important;
    }
    
    .text-lg {
        font-size: 1.125rem !important;
    }
}

/* Header and navigation adjustments */
@media (max-width: 768px) {
    .header-nav {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: block !important;
    }
    
    .logo-text {
        font-size: 1.5rem !important;
    }
}

/* Hero section adjustments */
@media (max-width: 768px) {
    .hero-content {
        padding: 2rem 1rem !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .hero-cta {
        flex-direction: column !important;
    }
    
    .hero-cta .btn {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 0.75rem !important;
    }
}

/* Featured products section */
@media (max-width: 640px) {
    .product-card {
        margin-bottom: 1.5rem !important;
    }
    
    .product-card-image {
        height: 180px !important;
    }
    
    .product-card-title {
        font-size: 1rem !important;
    }
}

/* Blog section */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr !important;
    }
    
    .blog-card {
        margin-bottom: 1.5rem !important;
    }
}

/* Footer adjustments */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
    }
    
    .footer-column {
        margin-bottom: 1.5rem !important;
    }
    
    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .footer-bottom > div {
        margin-bottom: 1rem !important;
    }
}

/* Product page adjustments */
@media (max-width: 768px) {
    .product-layout {
        flex-direction: column !important;
    }
    
    .product-image-container {
        width: 100% !important;
        margin-bottom: 1.5rem !important;
    }
    
    .product-details {
        width: 100% !important;
    }
    
    .product-tabs {
        flex-direction: column !important;
    }
    
    .product-tab {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Shop page adjustments */
@media (max-width: 768px) {
    .shop-layout {
        flex-direction: column !important;
    }
    
    .shop-sidebar {
        width: 100% !important;
        margin-bottom: 1.5rem !important;
    }
    
    .shop-products {
        width: 100% !important;
    }
    
    .shop-filters {
        flex-direction: column !important;
    }
    
    .shop-filter {
        width: 100% !important;
        margin-bottom: 0.75rem !important;
    }
}

/* Cart and checkout adjustments */
@media (max-width: 768px) {
    .cart-table th:nth-child(3),
    .cart-table td:nth-child(3) {
        display: none !important;
    }
    
    .checkout-layout {
        flex-direction: column !important;
    }
    
    .checkout-form {
        width: 100% !important;
        margin-bottom: 1.5rem !important;
    }
    
    .checkout-summary {
        width: 100% !important;
    }
}

/* Form adjustments */
@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .form-control {
        margin-bottom: 1rem !important;
    }
    
    .form-actions {
        flex-direction: column !important;
    }
    
    .form-actions .btn {
        width: 100% !important;
        margin-bottom: 0.75rem !important;
    }
}

/* Modal adjustments */
@media (max-width: 640px) {
    .modal-content {
        width: 95% !important;
        padding: 1.5rem !important;
    }
    
    .modal-title {
        font-size: 1.25rem !important;
    }
}

/* Admin dashboard adjustments */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 64px !important;
    }
    
    .admin-sidebar-text {
        display: none !important;
    }
    
    .admin-content {
        margin-left: 64px !important;
    }
    
    .admin-card {
        margin-bottom: 1rem !important;
    }
}

/* Utility classes for responsive behavior */
.hide-on-mobile {
    display: none !important;
}

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

/* Touch-friendly adjustments */
@media (hover: none) {
    .btn, 
    .nav-link,
    .product-card,
    .blog-card {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }
    
    .btn:active,
    .nav-link:active {
        opacity: 0.7;
    }
}

/* Fix for input zoom on iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select,
    textarea,
    input[type="text"],
    input[type="password"],
    input[type="datetime"],
    input[type="datetime-local"],
    input[type="date"],
    input[type="month"],
    input[type="time"],
    input[type="week"],
    input[type="number"],
    input[type="email"],
    input[type="url"],
    input[type="search"],
    input[type="tel"],
    input[type="color"] {
        font-size: 16px !important;
    }
}

/* Improve scrolling on iOS */
* {
    -webkit-overflow-scrolling: touch;
}

/* Fix for position:fixed on iOS */
.ios-fixed {
    position: fixed;
    width: 100%;
    transform: translateZ(0);
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive tables */
@media (max-width: 768px) {
    .responsive-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        background-color: #1a202c;
        color: #e2e8f0;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }
    
    a {
        text-decoration: underline;
    }
}