/* ============================================================
   A1 CASH & CARRY
   COMPLETE RESPONSIVE CSS
   Mobile + Tablet + Laptop + Desktop
============================================================ */


/* ============================================================
   GLOBAL RESPONSIVE SETTINGS
============================================================ */

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}


/* ============================================================
   LARGE DESKTOP
   1400px and below
============================================================ */

@media (max-width: 1400px) {

    .header-top {
        padding-left: 2%;
        padding-right: 2%;
        gap: 15px;
    }

    .main-nav {
        padding-left: 2%;
        padding-right: 2%;
    }

    .section-container {
        width: 94%;
    }

    .features-section {
        width: 94%;
    }

    .footer-container {
        width: 94%;
    }

}


/* ============================================================
   DESKTOP / LAPTOP
   1200px and below
============================================================ */

@media (max-width: 1200px) {

    /* ---------- HEADER ---------- */

    .header-top {
        gap: 12px;
    }

    .logo-area {
        min-width: 220px;
    }

    .logo-a1 {
        font-size: 44px;
    }

    .logo-cart {
        font-size: 30px;
        margin: 0 5px;
    }

    .logo-text h1 {
        font-size: 18px;
    }

    .location-box {
        min-width: 110px;
    }

    .search-container {
        min-width: 250px;
    }


    /* ---------- NAVIGATION ---------- */

    .nav-left > a,
    .category-menu-btn {
        padding: 0 11px;
        font-size: 13px;
    }

    .nav-right {
        gap: 10px;
    }


    /* ---------- PRODUCTS ---------- */

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }


    /* ---------- FEATURES ---------- */

    .features-section {
        grid-template-columns: repeat(2, 1fr);
    }


    /* ---------- FOOTER ---------- */

    .footer-container {
        grid-template-columns:
            repeat(3, 1fr);
    }

}


/* ============================================================
   TABLET
   1024px and below
============================================================ */

@media (max-width: 1024px) {

    /* ---------- HEADER ---------- */

    .header-top {
        min-height: auto;
        padding: 12px 3%;
        flex-wrap: wrap;
    }

    .logo-area {
        min-width: auto;
        flex-shrink: 0;
    }

    .location-box {
        display: none;
    }

    .search-container {
        flex: 1;
        min-width: 280px;
    }

    .account-box {
        flex-shrink: 0;
    }


    /* ---------- NAV ---------- */

    .main-nav {
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        scrollbar-width: none;
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-left {
        flex-shrink: 0;
        min-width: max-content;
    }

    .nav-right {
        display: none;
    }

    .nav-left > a,
    .category-menu-btn {
        padding: 0 13px;
        font-size: 12px;
    }


    /* ---------- MEGA MENU ---------- */

    .mega-menu-content {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        gap: 25px;
    }


    /* ---------- FEATURES ---------- */

    .features-section {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 14px;
    }


    /* ---------- FOOTER ---------- */

    .footer-container {
        grid-template-columns:
            repeat(3, 1fr);

        gap: 25px;
    }

}


/* ============================================================
   SMALL TABLET
   900px and below
============================================================ */

@media (max-width: 900px) {

    .logo-area {
        flex: 1;
    }

    .search-container {
        order: 5;
        flex-basis: 100%;
        width: 100%;
    }

    .account-box {
        margin-left: auto;
    }

    .header-icon-btn {
        width: 38px;
        height: 38px;
    }

    .mega-menu-content {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* ============================================================
   MOBILE TABLET
   768px and below
============================================================ */

@media (max-width: 768px) {

    /* ========================================================
       HEADER
    ======================================================== */

    .main-header {
        position: sticky;
        top: 0;
    }

    .header-top {
        width: 100%;
        padding: 10px 4%;
        gap: 8px;
    }

    /* Logo */

    .logo-area {
        width: auto;
        flex: 1;
        min-width: 0;
    }

    .logo-a1 {
        font-size: 38px;
        line-height: 1;
    }

    .logo-cart {
        font-size: 25px;
        margin: 0 4px;
    }

    .logo-text h1 {
        font-size: 16px;
        line-height: 1.1;
    }

    .logo-text span {
        font-size: 6px;
    }


    /* Profile */

    .account-box {
        display: none;
    }

    .profile-account-box {
        display: flex;
    }

    .profile-account-box > div {
        display: none;
    }

    .header-profile-image {
        width: 36px;
        height: 36px;
    }


    /* Language */

    .language-btn {
        padding: 8px 10px;
        font-size: 11px;
    }


    /* Header icons */

    .header-icon-btn {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }


    /* Search */

    .search-container {
        order: 10;
        flex-basis: 100%;
        width: 100%;
        height: 44px;
    }

    .search-container select {
        max-width: 115px;
        padding: 0 6px;
        font-size: 11px;
    }

    .search-container input {
        min-width: 0;
        padding: 0 10px;
        font-size: 12px;
    }

    .search-container button {
        width: 48px;
        flex-shrink: 0;
    }


    /* ========================================================
       NAVIGATION
    ======================================================== */

    .main-nav {
        min-height: 44px;
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .nav-left {
        height: 44px;
        min-width: max-content;
        gap: 0;
    }

    .nav-left > a,
    .category-menu-btn {
        height: 44px;
        padding: 0 13px;
        font-size: 11px;
        flex-shrink: 0;
    }

    .nav-left > a i,
    .category-menu-btn i {
        font-size: 11px;
    }

    .nav-right {
        display: none;
    }


    /* ========================================================
       MEGA MENU
    ======================================================== */

    .mega-menu {
        position: fixed;

        top: 104px;
        left: 0;
        right: 0;

        width: 100%;

        max-height: calc(100vh - 104px);

        overflow-y: auto;
        overflow-x: hidden;

        padding: 18px 15px;

        border-radius: 0 0 12px 12px;
    }

    .mega-menu-content {
        width: 100%;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 20px;
    }

    .mega-category h3 {
        font-size: 14px;
        margin-bottom: 9px;
    }

    .mega-category h3 i {
        font-size: 14px;
    }

    .mega-subcategory {
        font-size: 11px;
        padding: 5px 0;
    }


    /* ========================================================
       GENERAL SECTIONS
    ======================================================== */

    .section-container {
        width: 92%;
        padding: 35px 0;
    }

    .section-heading {
        margin-bottom: 18px;
        align-items: flex-start;
        gap: 12px;
    }

    .section-heading h2 {
        font-size: 23px;
    }

    .section-heading span {
        font-size: 10px;
    }

    .section-heading > a {
        font-size: 12px;
        white-space: nowrap;
    }


    /* ========================================================
       FEATURES
    ======================================================== */

    .features-section {
        width: 92%;

        grid-template-columns:
            repeat(2, 1fr);

        gap: 10px;

        margin-top: -15px;
    }

    .feature-card {
        min-height: 85px;
        padding: 12px;
        gap: 10px;
    }

    .feature-card > i {
        width: 42px;
        height: 42px;
        font-size: 17px;
    }

    .feature-card h3 {
        font-size: 12px;
    }

    .feature-card p {
        font-size: 9px;
    }


    /* ========================================================
       PRODUCT GRID
    ======================================================== */

    .product-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }

    .product-image {
        height: 190px;
    }

    .product-image img {
        padding: 12px;
    }

    .product-info {
        padding: 11px;
    }

    .product-name {
        font-size: 13px;
    }

    .product-type {
        font-size: 10px;
    }

    .product-price strong {
        font-size: 16px;
    }

    .product-price del {
        font-size: 10px;
    }

    .product-actions {
        gap: 6px;
    }

    .quick-view-btn,
    .add-cart-btn {
        height: 34px;
        font-size: 10px;
    }

    .product-card .wishlist-product-btn {
        width: 34px;
        height: 34px;
        top: 8px;
        right: 8px;
    }


    /* ========================================================
       HERO
    ======================================================== */

    .hero-section {
        min-height: 460px;
    }

    .hero-content {
        width: 100%;
        padding: 50px 6%;
    }

    .hero-content h1 {
        font-size: 38px;
    }

    .hero-content h2 {
        font-size: 27px;
    }

    .hero-content p {
        font-size: 13px;
        max-width: 500px;
    }

    .hero-buttons {
        gap: 10px;
        flex-wrap: wrap;
    }

    .hero-arrow {
        width: 38px;
        height: 38px;
    }

    .hero-prev {
        left: 10px;
    }

    .hero-next {
        right: 10px;
    }


    /* ========================================================
       OFFERS
    ======================================================== */

    .offer-slider {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 12px;
    }


    /* ========================================================
       FOOTER
    ======================================================== */

    .footer-container {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 25px;

        padding: 40px 0;
    }

    .footer-about {
        grid-column: 1 / -1;
    }

    .footer-about p {
        max-width: 100%;
    }

}


/* ============================================================
   MOBILE
   600px and below
============================================================ */

@media (max-width: 600px) {

    /* ---------- HEADER ---------- */

    .header-top {
        padding: 9px 3%;
    }

    .logo-a1 {
        font-size: 34px;
    }

    .logo-cart {
        font-size: 22px;
    }

    .logo-text h1 {
        font-size: 14px;
    }

    .logo-text span {
        display: none;
    }

    .language-btn {
        display: none;
    }

    .header-icon-btn {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }


    /* ---------- SEARCH ---------- */

    .search-container {
        height: 42px;
    }

    .search-container select {
        max-width: 105px;
        font-size: 10px;
    }

    .search-container input {
        font-size: 11px;
    }

    .search-container button {
        width: 45px;
        font-size: 14px;
    }


    /* ---------- NAV ---------- */

    .nav-left > a,
    .category-menu-btn {
        padding: 0 11px;
        font-size: 10px;
    }


    /* ---------- MEGA MENU ---------- */

    .mega-menu {
        top: 101px;
        max-height: calc(100vh - 101px);
        padding: 15px 12px;
    }

    .mega-menu-content {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .mega-category h3 {
        font-size: 12px;
    }

    .mega-subcategory {
        font-size: 10px;
    }


    /* ---------- SECTIONS ---------- */

    .section-container {
        width: 94%;
        padding: 30px 0;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .section-heading h2 {
        font-size: 21px;
    }

    .section-heading > a {
        font-size: 11px;
    }


    /* ---------- FEATURES ---------- */

    .features-section {
        width: 94%;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 10px;
    }

    .feature-card {
        min-height: 80px;
        padding: 9px;
        gap: 8px;
    }

    .feature-card > i {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .feature-card h3 {
        font-size: 10px;
    }

    .feature-card p {
        font-size: 8px;
        line-height: 1.3;
    }


    /* ---------- HERO ---------- */

    .hero-section {
        min-height: 420px;
    }

    .hero-content {
        padding: 40px 7%;
    }

    .hero-content h1 {
        font-size: 31px;
        line-height: 1.15;
    }

    .hero-content h2 {
        font-size: 22px;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 12px;
        line-height: 1.7;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-buttons a,
    .hero-buttons button {
        width: auto;
    }

    .hero-arrow {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }


    /* ---------- OFFERS ---------- */

    .offer-slider {
        grid-template-columns: 1fr;
    }


    /* ---------- PRODUCTS ---------- */

    .product-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 8px;
    }

    .product-image {
        height: 155px;
    }

    .product-image img {
        padding: 8px;
    }

    .product-info {
        padding: 8px;
    }

    .product-brand {
        font-size: 9px;
    }

    .product-name {
        font-size: 11px;
        line-height: 1.35;
        min-height: 30px;
    }

    .product-type {
        font-size: 8px;
    }

    .product-rating {
        font-size: 9px;
    }

    .rating-box {
        font-size: 9px;
    }

    .review-count {
        font-size: 8px;
    }

    .product-price {
        gap: 3px;
        flex-wrap: wrap;
    }

    .product-price strong {
        font-size: 14px;
    }

    .product-price del {
        font-size: 8px;
    }

    .product-price span {
        font-size: 8px;
    }

    .product-actions {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .quick-view-btn,
    .add-cart-btn {
        width: 100%;
        height: 31px;
        font-size: 9px;
        padding: 0 5px;
    }

    .product-card .wishlist-product-btn {
        width: 31px;
        height: 31px;
        top: 6px;
        right: 6px;
    }

    .product-card .wishlist-product-btn i {
        font-size: 13px;
    }


    /* ---------- FOOTER ---------- */

    .footer-container {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 35px 0;
    }

    .footer-about {
        grid-column: auto;
    }

    .footer-about h2 {
        font-size: 21px;
    }

    .footer-about p {
        font-size: 11px;
    }

    .footer-column h3 {
        font-size: 14px;
    }

    .footer-column a {
        font-size: 11px;
    }

    .footer-column p {
        font-size: 10px;
    }

    .social-icons {
        margin-top: 12px;
    }

    .footer-bottom {
        padding: 15px 10px;
        font-size: 9px;
    }

}


/* ============================================================
   SMALL MOBILE
   480px and below
============================================================ */

@media (max-width: 480px) {

    /* ---------- HEADER ---------- */

    .header-top {
        padding: 8px 3%;
        gap: 6px;
    }

    .logo-a1 {
        font-size: 30px;
    }

    .logo-cart {
        font-size: 19px;
        margin: 0 2px;
    }

    .logo-text h1 {
        font-size: 12px;
    }

    .header-profile-image {
        width: 32px;
        height: 32px;
    }

    .header-icon-btn {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }


    /* ---------- SEARCH ---------- */

    .search-container {
        height: 40px;
        border-width: 1px;
    }

    .search-container select {
        width: 90px;
        max-width: 90px;
        padding: 0 3px;
        font-size: 9px;
    }

    .search-container input {
        padding: 0 8px;
        font-size: 10px;
    }

    .search-container button {
        width: 42px;
    }


    /* ---------- NAV ---------- */

    .main-nav {
        min-height: 40px;
    }

    .nav-left {
        height: 40px;
    }

    .nav-left > a,
    .category-menu-btn {
        height: 40px;
        padding: 0 10px;
        font-size: 9px;
    }


    /* ---------- MEGA MENU ---------- */

    .mega-menu {
        top: 97px;
        max-height: calc(100vh - 97px);
    }

    .mega-menu-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .mega-category {
        padding-bottom: 10px;
        border-bottom: 1px solid #e5e7eb;
    }

    .mega-category h3 {
        font-size: 13px;
    }

    .mega-subcategory {
        font-size: 10px;
    }


    /* ---------- FEATURES ---------- */

    .features-section {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .feature-card {
        min-height: 72px;
    }


    /* ---------- HERO ---------- */

    .hero-section {
        min-height: 390px;
    }

    .hero-content {
        padding: 35px 8%;
    }

    .hero-content h1 {
        font-size: 27px;
    }

    .hero-content h2 {
        font-size: 19px;
    }

    .hero-content p {
        font-size: 11px;
    }

    .hero-arrow {
        width: 30px;
        height: 30px;
    }


    /* ---------- PRODUCTS ---------- */

    .product-grid {
        gap: 7px;
    }

    .product-image {
        height: 140px;
    }

    .product-info {
        padding: 7px;
    }

    .product-name {
        font-size: 10px;
    }

    .product-price strong {
        font-size: 13px;
    }

    .quick-view-btn,
    .add-cart-btn {
        height: 29px;
        font-size: 8px;
    }

}


/* ============================================================
   EXTRA SMALL MOBILE
   360px and below
============================================================ */

@media (max-width: 360px) {

    .logo-a1 {
        font-size: 27px;
    }

    .logo-cart {
        font-size: 17px;
    }

    .logo-text h1 {
        font-size: 10px;
    }

    .header-profile-image {
        width: 29px;
        height: 29px;
    }

    .header-icon-btn {
        width: 29px;
        height: 29px;
        font-size: 13px;
    }

    .search-container select {
        width: 78px;
        max-width: 78px;
        font-size: 8px;
    }

    .search-container input {
        font-size: 9px;
    }

    .search-container button {
        width: 38px;
    }

    .nav-left > a,
    .category-menu-btn {
        padding: 0 8px;
        font-size: 8px;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .hero-content h2 {
        font-size: 17px;
    }

    .hero-content p {
        font-size: 10px;
    }

    .product-image {
        height: 125px;
    }

    .product-name {
        font-size: 9px;
    }

    .product-price strong {
        font-size: 12px;
    }

}


/* ============================================================
   LANDSCAPE MOBILE
============================================================ */

@media (max-height: 500px) and (orientation: landscape) {

    .hero-section {
        min-height: 360px;
    }

    .hero-content {
        padding: 25px 7%;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-content h2 {
        font-size: 20px;
    }

    .mega-menu {
        max-height: 70vh;
        overflow-y: auto;
    }

}


/* ============================================================
   TOUCH DEVICES
============================================================ */

@media (hover: none) and (pointer: coarse) {

    .feature-card:hover,
    .product-card:hover {
        transform: none;
    }

    .btn-primary:hover {
        transform: none;
    }

    .product-card .wishlist-product-btn:hover {
        transform: none;
    }

}


/* ============================================================
   ACCESSIBILITY / REDUCED MOTION
============================================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}