/*
=================================================================
ThemeBazarShop - Responsive Styles
Mobile-First Design
=================================================================
*/

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 75%;
    height: 100vh;
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 1rem;
    z-index: 99;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.5rem;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 0;
    color: var(--text-light);
    text-decoration: none;
    border-bottom: 1px solid var(--border-dark);
}

/* Search Modal */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.search-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Tablet - 768px and up */
@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
    
    .nav-menu {
        display: flex !important;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .themes-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .themes-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop - 1000px and up */
@media (min-width: 1000px) {
    .themes-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .themes-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .categories-grid-6 {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Large Desktop - 1400px and up */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .themes-grid-6 {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Tablet Navigation */
@media (max-width: 768px) {
    .header-content {
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-search {
        flex-direction: column;
    }
    
    .search-form {
        width: 100%;
    }
    
    .trust-signals {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .signal {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Footer responsive */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-col--wide {
        grid-column: 1 / -1;
    }
    .footer-brand-strip {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-payments-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .footer-bottom-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .fbb-right {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Mobile - 480px and down */
@media (max-width: 480px) {
    :root {
        font-size: 14px;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1rem; }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
    }
    
    .theme-card {
        margin-bottom: 1rem;
    }
    
    .themes-grid-3,
    .themes-grid-4,
    .themes-grid-6 {
        grid-template-columns: 1fr;
    }
    
    .categories-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        margin-bottom: 2rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .floating-buttons {
        bottom: 1rem;
        right: 1rem;
    }
    
    .float-btn {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    /* Footer single-column on mobile */
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-contact-chips { gap: .5rem; }
    .fp-icons { gap: .5rem; }
    .fp-icon { height: 34px; }
    .fp-visa, .fp-mc  { width: 56px; }
    .fp-rupay, .fp-paypal { width: 64px; }
    .fp-netbank { width: 74px; }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .admin-wrapper {
        flex-direction: column;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .floating-buttons,
    .btn {
        display: none;
    }
    
    body {
        color: black;
        background: white;
    }
}
