/* =============================================
   FreshBhuja - Responsive Styles
   ============================================= */

/* Large Screens (1200px and below) */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .slide-content h1 {
        font-size: 42px;
    }
}

/* Medium Screens (992px and below) */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .header-wrapper {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .search-bar {
        order: 3;
        min-width: 100%;
        max-width: 100%;
        flex: 1 1 100%;
        margin-top: 10px;
    }
    
    .search-bar input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .search-bar button {
        padding: 12px 18px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
    }
    
    .nav-item > a {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .trust-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .newsletter-wrapper {
        flex-direction: column;
        text-align: center;
    }
    
    .newsletter-form {
        max-width: 100%;
    }
    
    .slider-container {
        height: 400px;
    }
    
    .slide-content h1 {
        font-size: 36px;
    }
    
    .promo-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Screens (768px and below) */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
    
    .top-bar {
        display: none;
    }
    
    .header {
        padding: 10px 0;
    }
    
    .logo-text {
        font-size: 26px;
    }
    
    .header-actions {
        gap: 15px;
    }
    
    .action-btn span {
        display: none;
    }
    
    .cart-btn span {
        display: none;
    }
    
    .cart-btn {
        padding: 10px 15px;
    }
    
    /* Mobile Navigation */
    .main-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100%;
        background: var(--white);
        z-index: 1002;
        transition: var(--transition);
        overflow-y: auto;
        padding-top: 60px;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
    }
    
    .nav-item > a {
        color: var(--text-dark);
        border-bottom: 1px solid var(--border-color);
        padding: 15px 20px;
    }
    
    .nav-item > a:hover,
    .nav-item.active > a {
        background: var(--light-bg);
        color: var(--primary-color);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
        background: var(--light-bg);
    }
    
    .nav-item:hover .dropdown-menu {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hero */
    .slider-container {
        height: 350px;
    }
    
    .slide-content h1 {
        font-size: 28px;
    }
    
    .slide-content h2 {
        font-size: 16px;
    }
    
    .slide-content p {
        font-size: 14px;
    }
    
    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .slider-arrow.prev {
        left: 10px;
    }
    
    .slider-arrow.next {
        right: 10px;
    }
    
    /* Categories */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .category-image {
        height: 140px;
    }
    
    .category-card h3 {
        padding: 15px;
        font-size: 14px;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .current-price {
        font-size: 16px;
    }
    
    /* Sections */
    .section-header h2 {
        font-size: 26px;
    }
    
    .categories-section,
    .products-section,
    .features-section {
        padding: 40px 0;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    /* Trust Banner */
    .trust-banner {
        padding: 40px 0;
    }
    
    .trust-text h2 {
        font-size: 24px;
    }
    
    .trust-logo .brand-name {
        font-size: 30px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    /* Cart Sidebar */
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    /* Promo */
    .promo-card {
        padding: 25px;
        min-height: 180px;
    }
    
    .promo-card h3 {
        font-size: 22px;
    }
    
    .promo-image {
        width: 150px;
        display: none;
    }
    
    .promo-content {
        max-width: 100%;
    }
}

/* Extra Small Screens (576px and below) */
@media (max-width: 576px) {
    .container {
        padding: 0 12px;
    }
    
    .header-wrapper {
        gap: 10px;
    }
    
    .logo-text {
        font-size: 20px;
    }
    
    .logo-tagline {
        font-size: 8px;
        letter-spacing: 1px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .action-btn i {
        font-size: 18px;
    }
    
    .action-btn .badge {
        width: 16px;
        height: 16px;
        font-size: 9px;
        top: -3px;
        right: -3px;
    }
    
    .search-bar {
        min-width: 100%;
        margin-top: 8px;
    }
    
    .search-bar input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .search-bar input::placeholder {
        font-size: 12px;
    }
    
    .search-bar button {
        padding: 10px 15px;
    }
    
    .search-bar button i {
        font-size: 14px;
    }
    
    /* Hero */
    .slider-container {
        height: 280px;
    }
    
    .slide-content {
        padding: 15px;
    }
    
    .slide-content h1 {
        font-size: 22px;
    }
    
    .slide-content h2 {
        font-size: 14px;
    }
    
    .slide-badge {
        font-size: 10px;
        padding: 6px 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 12px;
    }
    
    /* Categories */
    .categories-grid {
        gap: 10px;
    }
    
    .category-image {
        height: 120px;
    }
    
    .category-card h3 {
        padding: 12px;
        font-size: 13px;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-card {
        border-radius: 8px;
    }
    
    .product-image {
        height: 130px;
    }
    
    .product-image img {
        object-fit: cover;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-category {
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    .product-name {
        font-size: 12px;
        line-height: 1.3;
        margin-bottom: 5px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        line-clamp: 2;
        overflow: hidden;
    }
    
    .product-weight {
        font-size: 10px;
    }
    
    .product-rating {
        font-size: 10px;
        margin-bottom: 5px;
    }
    
    .product-rating i {
        font-size: 10px;
    }
    
    .current-price {
        font-size: 14px;
    }
    
    .original-price {
        font-size: 11px;
    }
    
    .btn-add-cart {
        padding: 8px 12px;
        font-size: 10px;
        gap: 4px;
    }
    
    .btn-add-cart i {
        font-size: 11px;
    }
    
    .product-badge {
        padding: 3px 6px;
        font-size: 8px;
        top: 5px;
        left: 5px;
    }
    
    .product-actions {
        gap: 5px;
        top: 5px;
        right: 5px;
    }
    
    .action-icon {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    /* Section Headers */
    .section-header h2 {
        font-size: 22px;
    }
    
    .section-header p {
        font-size: 14px;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Newsletter */
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        width: 100%;
    }
    
    .newsletter-content h2 {
        font-size: 20px;
    }
    
    /* Trust */
    .trust-text h2 {
        font-size: 20px;
    }
    
    .trust-text p {
        font-size: 14px;
    }
    
    .trust-logo {
        padding: 20px 30px;
    }
    
    .trust-logo .brand-name {
        font-size: 26px;
    }
    
    /* Promo */
    .promo-card {
        padding: 20px;
    }
    
    .promo-card h3 {
        font-size: 18px;
    }
    
    .promo-card p {
        font-size: 12px;
    }
}

/* Mobile Menu Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1001;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Nav Close Button */
.mobile-nav-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: var(--light-bg);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: none;
}

@media (max-width: 768px) {
    .mobile-nav-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .product-actions {
        opacity: 1;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    .category-card:hover {
        transform: none;
    }
    
    .feature-card:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .header,
    .main-nav,
    .hero-slider,
    .newsletter-section,
    .cart-sidebar,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .footer {
        background: none;
        color: #000;
    }
}
