/* Mobile Fix CSS - Clean and User-Friendly */

/* Reset body padding for mobile */
@media (max-width: 768px) {
    body {
        padding-top: 120px;
        margin: 0;
        font-size: 16px;
    }
}

/* Fixed Header */
@media (max-width: 768px) {
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 0;
    }
    
    .navbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
        flex-wrap: nowrap;
    }
    
    .nav-brand {
        order: 1;
        flex-shrink: 0;
    }
    
    .nav-actions {
        order: 2;
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .mobile-menu-toggle {
        order: 3;
        display: block;
        background: none;
        border: none;
        font-size: 20px;
        color: #333;
        padding: 8px;
        cursor: pointer;
        flex-shrink: 0;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-link {
        padding: 16px 20px;
        border-bottom: 1px solid #f0f0f0;
        text-decoration: none;
        color: #333;
        font-size: 16px;
        text-align: center;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .cart-container {
        position: relative;
        padding: 8px;
        text-decoration: none;
        color: #333;
    }
    
    .cart-count {
        position: absolute;
        top: -2px;
        right: -2px;
        background: #FF6B6B;
        color: white;
        border-radius: 50%;
        width: 18px;
        height: 18px;
        font-size: 11px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    #loginLink {
        display: none;
    }
    
    .sign-out-btn {
        padding: 6px 12px;
        font-size: 12px;
        border-radius: 15px;
        background: #FF6B6B;
        color: white;
        border: none;
    }
}

/* Search Section Mobile */
@media (max-width: 768px) {
    .search-section {
        position: static;
        padding: 15px 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(252, 108, 133, 0.1);
    }
    
    .search-container {
        max-width: 100%;
        margin: 0 15px;
        border-radius: 25px;
    }
    
    .search-input {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .search-btn {
        padding: 14px 18px;
        min-width: 48px;
        height: 48px;
    }
}

/* Hero Section Mobile */
@media (max-width: 768px) {
    .hero {
        padding: 40px 20px;
        min-height: 60vh;
        display: flex;
        align-items: center;
        text-align: center;
        margin-top: 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 16px;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 24px;
        line-height: 1.5;
        padding: 0 10px;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 200px;
        padding: 14px 20px;
        border-radius: 25px;
        text-decoration: none;
        font-weight: 600;
        text-align: center;
        font-size: 16px;
    }
    
    .btn-primary {
        background: white;
        color: #FF6B6B;
        border: 2px solid white;
    }
    
    .btn-secondary {
        background: transparent;
        color: white;
        border: 2px solid white;
    }
}

/* Featured Products Mobile */
@media (max-width: 768px) {
    .featured-sarees {
        padding: 40px 0;
    }
    
    .section-header {
        text-align: center;
        margin-bottom: 30px;
        padding: 0 20px;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 8px;
        color: #333;
    }
    
    .section-subtitle {
        font-size: 1rem;
        color: #666;
    }
    
    .featured-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 15px;
        padding: 0 15px;
    }
    
    .featured-card, .product-card {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transition: transform 0.3s ease;
    }
    
    .featured-card:active, .product-card:active {
        transform: scale(0.98);
    }
    
    .featured-image, .product-image {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }
    
    .featured-info, .product-info {
        padding: 12px;
    }
    
    .featured-title, .product-name {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 6px;
        color: #333;
        line-height: 1.3;
    }
    
    .featured-price, .product-price {
        font-size: 1rem;
        font-weight: 700;
        color: #FF6B6B;
        margin-bottom: 8px;
    }
    
    .featured-buttons, .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .add-to-cart-btn, .buy-now-btn {
        width: 100%;
        padding: 12px;
        border: none;
        border-radius: 6px;
        font-weight: 600;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.3s ease;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        user-select: none;
        -webkit-user-select: none;
        position: relative;
        z-index: 10;
        min-height: 44px;
    }
    
    .add-to-cart-btn {
        background: #FF6B6B;
        color: white;
    }
    
    .buy-now-btn {
        background: #333;
        color: white;
    }
    
    .add-to-cart-btn:active, .buy-now-btn:active {
        transform: scale(0.95);
        background: #e55555;
    }
    
    .buy-now-btn:active {
        background: #555;
    }
    
    /* Ensure buttons are clickable on mobile */
    .featured-buttons {
        pointer-events: auto;
        position: relative;
        z-index: 15;
    }
    
    .featured-buttons button {
        pointer-events: auto;
        touch-action: manipulation;
    }
    
    /* Color palette mobile */
    .color-palette {
        margin: 8px 0;
        font-size: 12px;
    }
    
    .color-dots {
        display: flex;
        gap: 4px;
        justify-content: center;
    }
    
    .color-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        border: 1px solid #ddd;
    }
    
    /* Product rating mobile */
    .product-rating {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        margin-bottom: 8px;
        font-size: 12px;
    }
    
    .stars {
        color: #FFD700;
        font-size: 12px;
    }
}

/* CTA Section Mobile */
@media (max-width: 768px) {
    .cta-section {
        padding: 40px 20px;
        text-align: center;
    }
    
    .cta-title {
        font-size: 1.6rem;
        margin-bottom: 16px;
        color: white;
    }
    
    .cta-subtitle {
        font-size: 1rem;
        margin-bottom: 24px;
        line-height: 1.5;
        color: white;
        opacity: 0.9;
    }
    
    .cta-buttons {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

/* Footer Mobile */
@media (max-width: 768px) {
    .footer {
        padding: 30px 0 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
        padding: 0 20px;
    }
    
    .footer-section h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-contact {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom {
        padding-top: 15px;
        text-align: center;
    }
    
    .footer-bottom p {
        font-size: 14px;
    }
}

/* Hide desktop elements on mobile */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    .nav-actions a span {
        display: none;
    }
    
    .nav-actions {
        gap: 12px;
    }
    
    .nav-actions a {
        padding: 8px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .nav-links {
        display: flex !important;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    body {
        padding-top: 110px;
    }
    
    .search-section {
        padding: 12px 0;
    }
    
    .search-container {
        margin: 0 10px;
    }
    
    .search-input {
        padding: 12px 18px;
        font-size: 15px;
    }
    
    .search-btn {
        padding: 12px 16px;
        min-width: 44px;
        height: 44px;
    }
    
    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
        padding: 0 12px;
    }
    
    .hero {
        padding: 30px 15px;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 180px;
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .cta-title {
        font-size: 1.4rem;
    }
    
    .cta-subtitle {
        font-size: 0.9rem;
    }
}