@media (max-width: 768px) {


    button,
    .btn,
    a.btn,
    .nav-link,
    .cart-btn,
    .search-btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1rem;
    }


    .nav-menu {
        gap: 1rem;
    }


    body {
        font-size: 16px;

    }


    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }


    .container {
        padding: 0 1rem;
    }


    .carousel-container {
        padding: 0 0.5rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }


    .product-card,
    .carousel-product-card {
        min-width: 200px;
    }


    .tag-card {
        min-width: 78px;
        max-width: 78px;
    }

    .tag-card-name {
        font-size: 0.7rem;
        margin-top: 0.25rem !important;
    }


    .tags-scroll-btn {
        display: none !important;
    }


    .tags-section {

        padding: 0.75rem 0.75rem 1rem !important;
        background-color: #ffffff !important;
    }

    .tags-section-title {
        font-size: 1.5rem;
    }


    .tags-container {
        align-items: flex-start;
    }

    .tags-carousel-container {
        justify-content: flex-start;
        background-color: #ffffff;
        margin-top: -10px;
        padding-top: 10px;
    }

    .tags-grid,
    .tags-carousel-grid {
        justify-content: flex-start !important;

        padding: 8px 12px !important;
        gap: 0.6rem !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }


    .scroll-btn-modern {
        width: 44px;
        height: 44px;
    }


    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }


    .header-container {
        padding: 0 1rem;
    }

    .header-logo {
        font-size: 1.25rem;
    }


    .footer-container {
        padding: 2rem 1rem;
        flex-direction: column;
        gap: 2rem;
    }


    input,
    textarea,
    select {
        font-size: 16px;

        padding: 0.75rem;
    }


    .modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 1rem;
    }


    .data-table {
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
}


@media (max-width: 480px) {

    .container {
        padding: 0 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    .btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .header-logo {
        font-size: 1.125rem;
    }

    .header-logo i {
        font-size: 1.5rem;
    }

    .header-actions .search-btn span,
    .header-actions .cart-btn span {
        display: none;
    }

    /* Update: Reduce product card sizes for small screens */
    .products-grid .carousel-product-card,
    .carousel-product-card,
    .product-card {
        min-width: 140px !important;
        max-width: 140px !important;
    }

    .products-grid {
        gap: 10px !important;
    }

    .carousel-product-name,
    h4.product-title {
        font-size: 0.75rem !important;
        margin-bottom: 0.2rem !important;
        line-height: 1.2 !important;
    }

    .carousel-product-price,
    .product-price,
    .carousel-product-price .price-amount,
    .carousel-product-price .price-currency {
        font-size: 0.65rem !important;
        font-weight: 700 !important;
    }

    .carousel-product-price {
        gap: 2px !important;
    }

    .carousel-product-info {
        padding: 0.5rem !important;
    }

    .view-product-btn {
        padding: 0.4rem !important;
        font-size: 0.75rem !important;
    }
}


@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}


@media (hover: none) and (pointer: coarse) {


    .hover-lift:hover,
    .hover-scale:hover,
    .hover-glow:hover {
        transform: none;
        box-shadow: none;
    }


    .hover-lift:active {
        transform: translateY(-2px);
    }

    .hover-scale:active {
        transform: scale(0.98);
    }


    button:focus,
    a:focus,
    input:focus,
    textarea:focus,
    select:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }
}


@media (max-width: 768px) {

    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
    }


    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }


    .products-grid-modern,
    .carousel-track {
        -webkit-overflow-scrolling: touch;
    }
}


@media (max-width: 768px) {


    * {
        will-change: auto;
    }


    .product-card,
    .carousel-product-card {
        contain: layout style paint;
    }
}


@media (max-width: 768px) {


    .text-muted {
        color: #4b5563;
    }


    *:focus-visible {
        outline: 3px solid #3b82f6;
        outline-offset: 2px;
    }


    .clickable {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}