/*==================================================
        BUYREX RESPONSIVE CSS — FULL VERSION
        Covers every mobile size: 768px down to 320px
        (No changes needed here — the scroll/whatsapp
        fixes live in style.css)

        Load order in index.html: variables.css ->
        style.css -> responsive.css (yeh file sabse
        aakhir mein, taake iske media-query overrides
        style.css ke normal rules ko theek se override
        kar sakein)

        Desktop/tablet (>=769px) ki PC-mockup styling
        style.css ke bilkul aakhir mein hai, is file
        mein nahi.
==================================================*/


/*--------------------------------------------------
    GLOBAL SAFETY FIXES (apply on every screen size)
---------------------------------------------------*/

.search-box input {
    min-width: 0;
}

.card-bottom-row {
    flex-wrap: nowrap;
}

.scroll-top,
#whatsapp-btn {
    z-index: 1400;
}


/*==========================================
    TABLET / LARGE PHONE (up to 768px)
==========================================*/

@media (max-width: 768px) {

    .hero {
        margin: 0 14px 20px;
        padding: 20px;
    }

    .feature-boxes,
    .why-grid {
        padding-left: 14px;
        padding-right: 14px;
    }

    .promo-banner,
    .newsletter {
        margin-left: 14px;
        margin-right: 14px;
    }

}


/*==========================================
    LARGE MOBILE (up to 600px)
==========================================*/

@media (max-width: 600px) {

    .header {
        padding: 0 16px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .promo-content h2 {
        font-size: 24px;
    }

    .category-grid {
        gap: 12px;
    }

}


/*==========================================
    STANDARD MOBILE (up to 480px)
==========================================*/

@media (max-width: 480px) {

    .search-area {
        padding: 5px 14px 12px 14px;
    }

    .hero {
        padding: 18px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .feature-boxes {
        gap: 10px;
    }

    .category-grid {
        gap: 10px;
    }

    .product-grid {
        gap: 10px;
    }

    .promo-content h2 {
        font-size: 22px;
    }

    .promo-image {
        width: 90px;
    }

    .why-grid {
        gap: 10px;
    }

}


/*==========================================
    SMALL MOBILE (up to 390px)
==========================================*/

@media (max-width: 390px) {

    .hero h1 {
        font-size: 26px;
    }

    .hero p {
        font-size: 14px;
    }

    .hero-image {
        width: 130px;
    }

    .btn-primary {
        width: 120px;
        height: 44px;
        font-size: 14px;
    }

    .category-icon {
        width: 50px;
        height: 50px;
    }

    .category-icon img {
        width: 26px;
        height: 26px;
    }

    .card-title {
        font-size: 11.5px;
    }

    .price {
        font-size: 15px;
    }

}


/*==========================================
    EXTRA SMALL MOBILE (up to 360px)
==========================================*/

@media (max-width: 360px) {

    .header {
        padding: 0 14px;
    }

    .logo h2 {
        font-size: 25px;
    }

    .icon-btn {
        width: 40px;
        height: 40px;
    }

    .search-box {
        height: 50px;
    }

    .search-box button {
        width: 58px;
        font-size: 12px;
    }

    .hero {
        padding: 18px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .hero-image {
        width: 110px;
    }

    .section-header h2 {
        font-size: 19px;
    }

    .category-grid {
        gap: 8px;
    }

    .category-icon {
        width: 46px;
        height: 46px;
    }

    .category-icon img {
        width: 24px;
        height: 24px;
    }

    .category-card span {
        font-size: 10.5px;
    }

    .product-grid {
        gap: 8px;
    }

    .card-title {
        font-size: 11px;
    }

    .card-desc {
        font-size: 9px;
    }

    .price {
        font-size: 14px;
    }

    .old-price {
        font-size: 10px;
    }

    .card-bottom-row .cart-btn {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .card-bottom-row .cart-btn svg {
        width: 15px;
        height: 15px;
    }

    .jfy-card-rating .rate-num {
        font-size: 11px;
    }

    .jfy-card-rating .rate-review {
        font-size: 10px;
    }

    .promo-content h2 {
        font-size: 20px;
    }

    .promo-btn {
        width: 140px;
        height: 44px;
        font-size: 13px;
    }

    .why-card {
        padding: 16px;
    }

    .why-card h4 {
        font-size: 14px;
    }

    .why-card p {
        font-size: 12px;
    }

    .newsletter {
        padding: 20px;
    }

    .newsletter h2 {
        font-size: 20px;
    }

    .bottom-nav {
        height: 66px;
    }

    .cart-bottom-fixed,
    .detail-actions {
        bottom: 66px;
    }


    .scroll-top {
        width: 42px;
        height: 42px;
        right: 16px;
        bottom: 84px;
    }

    #whatsapp-btn {
        width: 48px;
        height: 48px;
        right: 16px;
        bottom: 140px;
    }

}


/*==========================================
    VERY SMALL / OLD PHONES (up to 320px)
==========================================*/

@media (max-width: 320px) {

    .top-bar {
        height: 25px;
        padding: 0 20px;
        font-size: 12px;
    }

    .truck-icon,
    .fire-icon {
        width: 12px;
        height: 12px;
    }

    .top-bar {
        font-size: 10px;
    }



    .header {
        padding: 0 12px;
        height: 60px;
    }

    .header-left {
        gap: 4px;
    }


    .menu-btn {
        width: 36px;
        height: 36px;
    }

    .menu-btn svg {
        width: 23px;
        height: 23px;
    }

    .logo img {
        width: 38px;
        height: 38px;
    }

    .logo {
        gap: 10px;
    }

    .logo h2 {
        font-size: 22px;
    }

    .header-action {
        gap: 8px;
    }

    .main-cart-btn {
        width: 40px;
        height: 40px;
    }

    .main-cart-btn svg {
        width: 32px;
        height: 32px;
    }

    .cart-count {
        top: 10px;
        right: 11px;
        width: 17px;
        height: 17px;
        font-size: 12px;
    }

    .search-area {
        padding: 5px 14px 12px 14px;
    }

    .search-box {
        height: 45px;
        padding: 0 2px 0 18px;
    }

    .search-box svg {
        width: 18px;
        height: 18px;
    }

    .search-box input {
        padding: 0 8px;
        font-size: 13px;
    }

    .search-box button svg {
        width: 22px;
        height: 22px;

    }

    .search-box button {
        width: 53px;
        height: 46px;
    }

    .search-drawer {
        padding: 0px 14px 100px;
    }

    .search-drawer .page-head .search-box {

        height: 45px;

    }

    .search-section {
        margin: 5px 0 15px;
        min-width: 0;
    }

    .search-section .section-header h2 {
        font-size: 14px;
    }

    .search-section .section-header .view-all {
        font-size: 13px;
    }

    .search-chip-list {

        gap: 7px;
    }

    .search-chip {
        gap: 6px;
        padding: 7px 10px;
        font-size: 12px;
    }


    .hero::before {

        width: 190px;
        height: 190px;
        top: -100px;
        right: -80px;
    }

    .hero-subtext {
        font-size: 12px;
    }

    .hero h1 {
        font-size: 21px;
    }

    .hero p {
        font-size: 12px;
    }

    .hero::after {

        width: 120px;
        height: 120px;
        bottom: -70px;
        left: -50px;
    }


    .section-header {
        margin-bottom: 15px;

    }

    .section-header h2 {
        font-size: 17px;
    }

    .categories {
        padding: 10px 14px 28px;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .category-card {
        padding: 12px 6px;
    }

    .category-icon {
        width: 40px;
        height: 40px;
    }

    .category-icon svg {
        width: 21px;
        height: 21px;
        stroke: #0f172a;
        stroke-width: 1.7;

    }

    .category-card span {
        font-size: 9.2px;
    }

    .our-products {
        padding: 0 14px 28px;
    }


    .discount {
        padding: 3px 6px;
        border-radius: 999px;
        font-size: 9px;
        font-weight: 600;
    }

    .product-grid {
        gap: 5px;
    }

    .product-info {
        padding: 5px 5px 8px;
    }

    .card-title {
        font-size: 10px;
        line-height: 1.5;
        margin-bottom: 3px;
        letter-spacing: 0.1px;
    }


    .card-desc {
        font-size: 9px;
        margin-bottom: 1px;
    }

    .price {
        font-size: 13px;
    }

    .card-bottom-row .cart-btn {
        width: 28px;
        height: 28px;
    }

    .card-bottom-row .cart-btn svg {
        width: 15px;
        height: 15px;
    }

    .load-more-btn {
        width: 100%;
        height: 45px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .5px;

    }

    .section-header {
        margin-bottom: 8px;
    }

    .why-grid {
        gap: 5px;
        padding: 0px;
    }

    .why-card {
        padding: 8px;
    }

    .why-card svg {
        width: 24px;
        height: 24px;
        color: var(--secondary);
        margin-bottom: 5px;
    }

    .why-card h4 {
        font-size: 12px;
    }

    .why-card p {
        font-size: 11px;
    }

    .newsletter h2 {
        font-size: 18px;
    }

    .newsletter p {
        font-size: 14px;
    }

    .newsletter-form textarea {
        border-radius: 16px;
        padding: 10px 10px;
        font-family: inherit;
        font-size: 13px;
        resize: none;
        outline: none;
        box-sizing: border-box;
    }

    .newsletter-form button {
        height: 49px;
        border-radius: 16px;
        background: var(--gradient-orange);
        color: #fff;
        font-size: 15px;
        font-weight: 600;
    }

    .footer {
        padding: 18px 18px 110px;
    }

    .footer-logo {
        gap: 14px;
        margin-bottom: 10px;
    }

    .footer h2 {
        font-weight: 550;
        letter-spacing: .7px;

    }

    .footer p {
        font-size: 12px;
    }

    .footer-links {
        gap: 20px;
        margin: 20px 0;
    }

    .footer-column {
        gap: 5px;
    }

    .footer-column h4 {
        font-size: 14px;
        margin-bottom: 5px;
    }

    .footer-column a {
        font-size: 13px;
    }

    .footer-social {
        gap: 12px;
        margin-bottom: 0px;
    }

    .footer-social a {
        width: 40px;
        height: 40px;
    }

    .copyright {
        margin-top: 15px;
        font-size: 12px;
    }

    .bottom-nav {
        height: 56px;
    }

    .bottom-nav svg {
        width: 18px;
        height: 18px;
    }

    .menu-page-header {
        gap: 10px;
        padding: 14px;

    }

    .menu-page-header h2 {
        font-weight: 650;
    }

    .menu-close-btn {
        position: absolute;
        top: 11px;
        ;
        right: 13px;
        width: 34px;
        height: 34px;

    }

    .menu-section-label {

        letter-spacing: .05em;
        padding: 8px 14px;
        font-size: 12px;
    }

    .menu-list-item {

        gap: 9px;
        padding: 9px 11px;
        font-size: 12px;
    }

    .menu-list-item svg {
        width: 20px;
        height: 20px;
    }

    .back-btn {
        width: 38px;
        height: 38px;
        margin-bottom: 14px;

    }

    .cart-drawer h3,
    .page-head h3 {
        font-size: 17px;
        font-weight: 600;
        margin: 0;
    }

    .page-contact p {
        margin-bottom: 12px;
        font-size: 12px;
        line-height: 1.6;
    }

    .contact-list svg {
        width: 15px;
        height: 15px;
    }

    .contact-list li {
        font-size: 12px;

    }

    .page-about p {
        font-size: 12px;

    }

    .page-privacy p {

        font-size: 12px;

    }

    .page-terms p {

        font-size: 12px;
    }

    #whatsapp-btn {
        width: 48px;
        height: 48px;
        right: 10px;
        bottom: 125px;
    }

    #whatsapp-btn svg {
        fill: #ffffff;
        width: 28px;
        height: 28px;
    }

    .scroll-top {
        width: 38px;
        height: 38px;
        right: 16px;
        bottom: 75px;
    }

    #cart-items {
        gap: 8px;
        padding: 5px 0 100px 0;
    }

    .cart-card {
        gap: 10px;
        padding: 10px;

    }

    .cart-content h4 {
        font-size: 12px;
        margin-bottom: 4px;

    }

    .cart-price {
        color: var(--secondary);
        font-size: 14px;
        font-weight: 800;
        margin-bottom: 10px;
    }

    .cart-item-controls button {
        width: 25px;
        height: 25px;
        font-size: 16px;
        font-weight: 700;
    }

    .remove-btn {
        width: 32px !important;
        height: 32px !important;
    }

    .cart-bottom-fixed,
    .detail-actions {
        bottom: 56px;
    }

    .cart-summary {
        padding: 12px 14px;
        gap: 2px;
        font-size: 13px;
    }

    .cart-summary div {
        display: flex;
        margin: 0px;
        font-size: 12px;
    }

    .cart-total-row {
        margin-top: 12px !important;
        padding-top: 8px;
        border-top: 1px dashed #d7dee7;
        font-size: 18px !important;
        font-weight: 800;
    }

    .cart-total-row b {
        font-size: 15px;

    }

    .proceed-btn {
        margin-top: 10px;
        height: 41px;
    }

    #checkout-form {
        padding-top: 15px;
        gap: 8px;
    }

    #checkout-form input,
    #checkout-form select {
        height: 45px;
        margin-bottom: 0px;
        font-size: 12px;
    }

    #checkout-form button {
        margin-top: 6px;
        width: 100%;
        height: 45px;
        font-size: 15px;
        font-weight: 600;
    }


    .success-box {
        box-sizing: border-box;
        width: calc(100% - 40px);
        max-width: 280px;
        margin: 0 auto;
        padding: 26px 20px;
        border-radius: 18px;
    }

    .success-box svg {
        width: 44px;
        height: 44px;
    }

    .success-box h3 {
        font-size: 15px;
    }

    .success-box p {
        font-size: 12px;
    }


    .detail-scroll-content {
        padding: 0px;
    }

    .back-btn {

        width: 36px;
        height: 36px;


    }

    .back-btn svg {
        width: 20px;
        height: 20px;
    }

    .page-head {
        gap: 8px;
        top: 70px;
        /* padding/margin-bottom yahan se hata diye — har page
           apni "*-page-head" class se leta hai (neeche), taake
           ek page ka spacing badalne se doosra na toote */
    }

    /* PER-PAGE HEADER SPACING @ <=320px — isolated, style.css
       ke pattern jaisa hi. Detail page ko apna horizontal
       padding chahiye (parent unpadded, edge-to-edge image ke
       liye), baaki sab ke parent container already padded hain */
    .detail-page-head {
        margin-bottom: 5px;
        padding: 12px 14px;
    }

    .search-page-head,
    .search-results-page-head,
    .cart-page-head,
    .checkout-page-head,
    .contact-page-head,
    .about-page-head,
    .privacy-page-head,
    .terms-page-head,
    .category-page-head {
        margin-bottom: 5px;
        padding: 12px 0;
        top: 60px;
    }

    .page-contact {

        padding: 0px 14px 250px;
    }

    .page-head-actions {
        gap: 6px;
    }



    .page-head-actions .icon-btn {
        width: 36px;
        height: 36px;
    }

    .icon-btn svg {
        width: 20px;
        height: 20px;
    }

    .detail-content-wrap {
        padding: 0 14px;
    }

    .detail-meta {
        margin-top: 10px;
        padding-bottom: 270px;
    }

    .detail-meta h2 {
        font-size: 17px;
        font-weight: 600;
        line-height: 1.4;
    }

    .price-large {
        font-size: 20px;
        font-weight: 610;
        ;
    }

    .detail-section-title {
        font-size: 13px;
        font-weight: 700;
    }

    .title-readmore-btn {
        font-size: 12px;
        font-weight: 700;
        padding: 0px;

    }

    .detail-desc {

        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 8px;
        padding-bottom: 10px;
    }

    .detail-actions {
        gap: 5px;
        padding: 14px 14px;

    }

    .qty-controls {
        gap: 5px;
        padding: 6px 10px;
    }

    .qty-btn {
        width: 25px;
        height: 25px;
        font-size: 17px;
        font-weight: 700;

    }

    .btn-outline.detail-buy-btn {

        height: 48px;
        font-size: 15px;
        font-weight: 600;

    }

    .btn-primary.detail-add-btn {

        height: 48px;
        font-size: 15px;
    }



}