/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Large Tablets and Small Desktops */
@media screen and (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .slide-text h1 {
        font-size: 40px;
    }

    .slide-image img {
        max-height: 350px;
    }
}

/* Tablets */
@media screen and (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    /* Header */
    .header-content {
        flex-wrap: wrap;
        gap: 15px;
    }

    .search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
    }

    .logo-text {
        font-size: 24px;
    }

    /* Navigation */
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--primary-dark);
        flex-direction: column;
        padding: 80px 0 30px;
        transition: var(--transition-normal);
        z-index: 1001;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu>li>a {
        color: var(--white);
        padding: 15px 25px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu>li>a:hover,
    .nav-menu>li>a.active {
        background: var(--accent-yellow);
        color: var(--primary-dark);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 0;
        box-shadow: none;
        display: none;
    }

    .has-dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        color: rgba(255, 255, 255, 0.8);
        padding-right: 40px;
        border-color: rgba(255, 255, 255, 0.05);
    }

    .dropdown-menu li a:hover {
        padding-right: 50px;
    }

    /* Mobile Menu Overlay */
    .nav-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-fast);
        z-index: 1000;
    }

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

    /* Mobile Menu Close Button */
    .mobile-menu-close {
        position: absolute;
        top: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-full);
        color: var(--white);
        font-size: 20px;
    }

    /* Hero */
    .hero-slider {
        height: 400px;
    }

    .slide-text h1 {
        font-size: 32px;
    }

    .slide-text p {
        font-size: 16px;
    }

    .slide-image {
        display: none;
    }

    .slide-content {
        justify-content: center;
        text-align: center;
    }

    /* Categories */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Products */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .view-all-btn {
        position: static;
        transform: none;
        margin: 0 auto 20px;
        width: fit-content;
    }

    /* Banner */
    .banner-grid {
        grid-template-columns: 1fr;
    }

    /* Why Us */
    .why-us-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .why-us-image {
        order: -1;
    }

    /* Newsletter */
    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        max-width: 100%;
        width: 100%;
    }
}

/* Mobile Devices */
@media screen and (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    /* Top Bar */
    .top-bar-content {
        flex-direction: column;
        gap: 5px;
        padding: 5px 0;
    }

    .contact-info {
        justify-content: center;
        gap: 15px;
        font-size: 13px;
    }

    .social-links {
        justify-content: center;
        gap: 15px;
    }

    /* Header */
    .header {
        padding: 10px 0;
        position: relative;
        z-index: 1002;
        background: var(--white);
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .logo {
        display: flex;
        justify-content: center;
        margin-bottom: 5px;
    }

    .logo-text-main {
        font-size: 24px;
    }

    .search-box {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .search-box input {
        height: 40px;
        font-size: 14px;
    }

    .search-btn {
        width: 40px;
        height: 40px;
    }

    .category-select {
        height: 40px;
        font-size: 13px;
        padding: 0 10px;
    }

    /* Mobile Menu */
    .mobile-menu-btn {
        position: absolute;
        top: 20px;
        right: 15px;
        z-index: 10002;
        /* Highest */
        font-size: 20px;
        background: transparent;
        border: none;
        color: var(--primary-dark);
    }

    .nav-menu {
        top: 0;
        padding-top: 80px;
        z-index: 10001;
        /* Higher than everything else */
        width: 280px;
        background: var(--primary-dark);
        /* Dark background for white text */
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    /* Hero */
    .hero-slider {
        height: 300px;
        margin-top: 0;
    }

    .slide-content {
        padding: 0 15px;
        text-align: center;
        flex-direction: column;
        justify-content: center;
    }

    .slide-text {
        max-width: 100%;
    }

    .slide-text h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .slide-text p {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .slide-badge {
        padding: 4px 10px;
        font-size: 10px;
        margin-bottom: 10px;
    }

    .slide-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .slide-image {
        display: none;
    }

    .slider-controls {
        bottom: 15px;
    }

    /* Categories */
    .categories-section {
        padding: 30px 0;
    }

    .section-header {
        margin-bottom: 25px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-card {
        aspect-ratio: 1/1;
    }

    .category-info {
        padding: 10px;
    }

    .category-info i {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .category-info h3 {
        font-size: 14px;
    }

    .category-info span {
        font-size: 11px;
    }

    /* Products */
    .products-section {
        padding: 30px 0;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product-card {
        border-radius: var(--radius-md);
    }

    .product-image {
        height: 140px;
        padding: 10px;
    }

    .product-image img {
        max-height: 100px;
    }

    .product-info {
        padding: 10px;
    }

    .product-name {
        font-size: 13px;
        line-height: 1.3;
        min-height: 34px;
        margin-bottom: 5px;
    }

    .product-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .current-price {
        font-size: 16px;
    }

    .product-specs {
        display: none;
        /* Hide specs on mobile to save space */
    }

    .product-actions {
        display: flex;
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        bottom: 50%;
        top: auto;
    }

    .product-actions button {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .feature-card {
        display: flex;
        align-items: center;
        text-align: right;
        padding: 15px;
        gap: 15px;
    }

    .feature-icon {
        margin: 0;
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }

    /* Footer */
    .footer {
        padding: 40px 0 20px;
        text-align: center;
    }

    .footer-grid {
        gap: 30px;
    }

    .footer-column h4::after {
        right: 50%;
        transform: translateX(50%);
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-links li a {
        padding: 5px 0;
        display: block;
    }

    /* Floating Buttons */
    .scroll-top,
    .whatsapp-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .scroll-top {
        bottom: 70px;
        left: 15px;
        right: auto;
        z-index: 900;
    }

    .whatsapp-btn {
        bottom: 20px;
        left: 15px;
        right: auto;
        z-index: 900;
    }
}

@media screen and (max-width: 375px) {
    .logo-text-main {
        font-size: 20px;
    }

    .current-price {
        font-size: 14px;
    }
}

/* Landscape Mode Adjustments */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .hero-slider {
        height: 300px;
    }

    .slide-text h1 {
        font-size: 24px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .logo img,
    .footer-logo img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Print Styles */
@media print {

    .top-bar,
    .header,
    .main-nav,
    .hero-slider,
    .newsletter-section,
    .scroll-top,
    .whatsapp-btn,
    .slider-controls {
        display: none;
    }

    .footer {
        background: var(--white);
        color: var(--text-dark);
    }

    .footer-column h4,
    .footer-logo span {
        color: var(--text-dark);
    }

    .footer-links a,
    .footer-contact li,
    .footer-about {
        color: var(--text-dark);
    }
}