/* ========================================
   STICK & SPICE - MOBILE OPTIMIZATION CSS
   Comprehensive mobile-first responsive design
   ======================================== */

/* ============ MOBILE BREAKPOINTS ============ */
/* Small phones: 320px - 480px */
/* Large phones: 481px - 768px */
/* Tablets: 769px - 1024px */

/* ============ BASE MOBILE OPTIMIZATIONS ============ */
@media (max-width: 1024px) {
    
    /* Typography Scaling */
    html {
        font-size: 14px;
    }
    
    body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Header & Navigation */
    .header {
        padding: 1rem 1.5rem !important;
        position: sticky !important;
        top: 0;
        z-index: 9999;
        background: white !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
    }
    
    .nav-container {
        flex-wrap: wrap;
        padding: 0 !important;
    }
    
    .logo {
        font-size: 1.3rem !important;
        flex-shrink: 0;
    }
    
    .logo img {
        height: 35px !important;
        max-width: 35px !important;
    }
    
    /* Mobile Menu Toggle */
    .hamburger {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 10001;
        padding: 0.5rem;
        order: 3;
    }
    
    .hamburger span {
        width: 25px;
        height: 3px;
        background: var(--primary-color);
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Mobile Navigation Menu */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: linear-gradient(135deg, #d4879c, #cc567e);
        flex-direction: column;
        padding: 5rem 2rem 2rem 2rem !important;
        transition: right 0.4s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
        z-index: 10000;
        overflow-y: auto;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu li {
        margin: 0 0 1.5rem 0 !important;
        width: 100%;
        text-align: left;
    }
    
    .nav-link {
        font-size: 1.3rem !important;
        color: white !important;
        padding: 0.75rem 1rem !important;
        display: block;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: rgba(255,255,255,0.2) !important;
        transform: translateX(5px);
    }
    
    /* Cart Button Mobile */
    .cart-button {
        padding: 0.6rem 1rem !important;
        font-size: 0.95rem !important;
        order: 2;
        margin-left: auto !important;
        margin-right: 1rem !important;
    }
    
    .cart-badge {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.7rem !important;
    }
    
    /* ============ HERO SLIDESHOW MOBILE ============ */
    .hero-slideshow {
        height: 400px !important;
    }
    
    .hero-slide .hero-content {
        padding: 1.5rem !important;
    }
    
    .hero-slide .hero-content h1 {
        font-size: 2rem !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.2;
    }
    
    .hero-slide .hero-content p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-cta {
        padding: 0.75rem 1.75rem !important;
        font-size: 0.95rem !important;
    }
    
    /* Slideshow Controls */
    .slide-arrow {
        width: 35px !important;
        height: 35px !important;
        font-size: 1rem !important;
    }
    
    .slide-prev {
        left: 10px !important;
    }
    
    .slide-next {
        right: 10px !important;
    }
    
    .slide-pause {
        bottom: 20px !important;
        right: 20px !important;
        width: 35px !important;
        height: 35px !important;
    }
    
    .slide-indicators {
        bottom: 15px !important;
    }
    
    .slide-dot {
        width: 8px !important;
        height: 8px !important;
        margin: 0 4px !important;
    }
    
    /* ============ SECTIONS ============ */
    .section {
        padding: 3rem 1.5rem !important;
    }
    
    .container {
        padding: 0 1rem !important;
        max-width: 100% !important;
    }
    
    .section-title {
        font-size: 2rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .section-subtitle {
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }
    
    /* ============ PRODUCT GRID ============ */
    .product-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 0 1rem;
    }
    
    .product-card {
        max-width: 100% !important;
    }
    
    .product-card img {
        height: 250px !important;
    }
    
    .product-info {
        padding: 1.25rem !important;
    }
    
    .product-name {
        font-size: 1.1rem !important;
    }
    
    .product-price {
        font-size: 1.3rem !important;
    }
    
    .add-to-cart-btn {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.95rem !important;
    }
    
    /* ============ CART MODAL MOBILE ============ */
    .cart-modal-content {
        margin: 1rem !important;
        max-width: calc(100% - 2rem) !important;
        border-radius: 15px !important;
    }
    
    .cart-header {
        padding: 1.25rem 1.5rem !important;
    }
    
    .cart-header h2 {
        font-size: 1.5rem !important;
    }
    
    .cart-body {
        padding: 1.5rem !important;
    }
    
    .cart-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 1rem !important;
    }
    
    .cart-item-image {
        width: 100% !important;
        height: 150px !important;
        margin-bottom: 1rem !important;
    }
    
    .cart-item-details {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    .cart-item-name {
        font-size: 1rem !important;
    }
    
    .cart-item-price {
        font-size: 1.1rem !important;
    }
    
    #suggestedProductsGrid {
        grid-template-columns: 1fr !important;
    }
    
    /* ============ FORMS ============ */
    .contact-form,
    .custom-order-form {
        padding: 1.5rem !important;
        margin: 0 !important;
    }
    
    .form-group {
        margin-bottom: 1.25rem !important;
    }
    
    .form-group label {
        font-size: 0.95rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px !important; /* Prevent iOS zoom */
        padding: 0.85rem !important;
        width: 100% !important;
    }
    
    .form-group textarea {
        min-height: 120px !important;
    }
    
    /* Two-column form grids to single column */
    .contact-form > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    button[type="submit"] {
        padding: 1rem !important;
        font-size: 1rem !important;
        width: 100% !important;
    }
    
    /* ============ CUSTOM ORDERS PAGE ============ */
    .custom-steps {
        padding: 0.5rem !important;
    }
    
    .step-indicator {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .step-item {
        width: 100% !important;
        text-align: center;
        font-size: 0.85rem !important;
    }
    
    .option-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .option-card {
        padding: 1.25rem !important;
    }
    
    /* ============ FOOTER ============ */
    .footer {
        padding: 2rem 1.5rem 1rem 1.5rem !important;
    }
    
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center;
    }
    
    .footer-section {
        padding: 0 !important;
    }
    
    .footer-section h3 {
        font-size: 1.3rem !important;
        margin-bottom: 1rem !important;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 0.95rem !important;
    }
    
    .social-links {
        justify-content: center !important;
        gap: 1.5rem !important;
    }
    
    .social-links a {
        font-size: 1.5rem !important;
    }
    
    .footer-bottom {
        padding: 1rem !important;
        font-size: 0.85rem !important;
    }
    
    /* ============ TOUCH OPTIMIZATION ============ */
    button,
    a,
    .btn,
    input[type="submit"],
    input[type="button"] {
        min-height: 44px !important; /* iOS touch target minimum */
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }
    
    /* Prevent text size adjustment on orientation change */
    html {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* Smooth scrolling for mobile */
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* ============ SMALL PHONES (320px - 480px) ============ */
@media (max-width: 480px) {
    
    html {
        font-size: 13px;
    }
    
    .header {
        padding: 0.75rem 1rem !important;
    }
    
    .logo {
        font-size: 1.1rem !important;
    }
    
    .logo img {
        height: 30px !important;
        max-width: 30px !important;
    }
    
    .cart-button {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem !important;
        margin-right: 0.5rem !important;
    }
    
    .hero-slideshow {
        height: 350px !important;
    }
    
    .hero-slide .hero-content h1 {
        font-size: 1.6rem !important;
    }
    
    .hero-slide .hero-content p {
        font-size: 0.9rem !important;
    }
    
    .section {
        padding: 2rem 1rem !important;
    }
    
    .section-title {
        font-size: 1.7rem !important;
    }
    
    .product-grid {
        gap: 1rem !important;
    }
    
    .product-card img {
        height: 200px !important;
    }
    
    .cart-modal-content {
        margin: 0.5rem !important;
        max-width: calc(100% - 1rem) !important;
    }
    
    .cart-header h2 {
        font-size: 1.3rem !important;
    }
    
    .footer {
        padding: 1.5rem 1rem 0.75rem 1rem !important;
    }
}

/* ============ TABLETS (769px - 1024px) ============ */
@media (min-width: 769px) and (max-width: 1024px) {
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .hero-slideshow {
        height: 500px !important;
    }
    
    .hero-slide .hero-content h1 {
        font-size: 2.5rem !important;
    }
    
    .nav-menu {
        width: 60%;
        max-width: 400px;
    }
}

/* ============ LANDSCAPE MODE ============ */
@media (max-width: 1024px) and (orientation: landscape) {
    
    .hero-slideshow {
        height: 60vh !important;
    }
    
    .hero-slide .hero-content {
        padding: 1rem !important;
    }
    
    .hero-slide .hero-content h1 {
        font-size: 1.8rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .hero-slide .hero-content p {
        font-size: 0.95rem !important;
        margin-bottom: 1rem !important;
    }
    
    .section {
        padding: 2rem 1.5rem !important;
    }
}

/* ============ UTILITY CLASSES ============ */
@media (max-width: 1024px) {
    
    .mobile-hide {
        display: none !important;
    }
    
    .mobile-show {
        display: block !important;
    }
    
    .mobile-center {
        text-align: center !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
}

/* ============ PERFORMANCE OPTIMIZATIONS ============ */
@media (max-width: 1024px) {
    
    /* Reduce animations for performance */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }
    
    /* Optimize images */
    img {
        max-width: 100%;
        height: auto;
        image-rendering: -webkit-optimize-contrast;
    }
    
    /* Reduce shadows for performance */
    .product-card,
    .cart-modal-content,
    .option-card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    }
}
