/* ============================================================
   ELECTROSHOP — Mobile App Style (Android-like)
   Active only on screens ≤ 767px
   ============================================================ */

@media (max-width: 767px) {

    /* ── Global Reset for App Feel ── */
    * {
        -webkit-tap-highlight-color: transparent;
    }

    body {
        background: #f2f3f5 !important;
        padding-bottom: 72px !important;
        /* space for bottom nav */
        font-family: 'Nunito', sans-serif;
    }

    /* ──────────────────────────────────────────
     1. DESKTOP HEADER → HIDE
  ────────────────────────────────────────── */
    header {
        display: none !important;
    }

    /* ──────────────────────────────────────────
     2. MOBILE APP BAR (Top)
  ────────────────────────────────────────── */
    .mobile-appbar {
        display: flex !important;
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #fff;
        padding: 10px 14px;
        align-items: center;
        gap: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
        border-bottom: 1px solid #eee;
        min-height: 56px;
    }

    .mobile-appbar .app-brand {
        font-size: 20px;
        font-weight: 900;
        color: #1c1c1c;
        text-decoration: none;
        letter-spacing: -0.3px;
        flex: 1;
    }

    .mobile-appbar .app-brand span {
        color: #7fad39;
    }

    .mobile-appbar .app-search-bar {
        flex: 2;
        display: flex;
        align-items: center;
        background: #f2f3f5;
        border-radius: 24px;
        padding: 7px 12px;
        gap: 7px;
        border: 1px solid #e5e5e5;
    }

    .mobile-appbar .app-search-bar input {
        border: none;
        background: transparent;
        outline: none;
        font-size: 13px;
        width: 100%;
        font-family: inherit;
    }

    .mobile-appbar .app-search-bar i {
        color: #888;
        font-size: 13px;
    }

    .mobile-appbar .app-icon-btn {
        width: 38px;
        height: 38px;
        border: none;
        background: #f2f3f5;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        color: #333;
        text-decoration: none;
        position: relative;
        flex-shrink: 0;
        transition: background .15s;
    }

    .mobile-appbar .app-icon-btn:hover {
        background: #e5e5e5;
    }

    .mobile-appbar .app-cart-badge {
        position: absolute;
        top: -2px;
        right: -2px;
        background: #e3000f;
        color: #fff;
        font-size: 9px;
        font-weight: 700;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1.5px solid #fff;
    }

    /* ──────────────────────────────────────────
     3. BOTTOM NAVIGATION BAR
  ────────────────────────────────────────── */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1050;
        background: #fff;
        border-top: 1px solid #eee;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.10);
        padding: 6px 0;
        padding-bottom: max(6px, env(safe-area-inset-bottom));
    }

    .mobile-bottom-nav .nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: #888;
        font-size: 10px;
        font-weight: 600;
        padding: 4px 0;
        transition: color .15s;
        position: relative;
    }

    .mobile-bottom-nav .nav-item i {
        font-size: 20px;
        transition: transform .15s;
    }

    .mobile-bottom-nav .nav-item.active {
        color: #7fad39;
    }

    .mobile-bottom-nav .nav-item.active i {
        transform: scale(1.15);
    }

    .mobile-bottom-nav .nav-item span {
        font-size: 10px;
        line-height: 1;
    }

    .mobile-bottom-nav .cart-dot {
        position: absolute;
        top: 4px;
        right: calc(50% - 18px);
        background: #e3000f;
        border-radius: 50%;
        width: 7px;
        height: 7px;
        border: 1.5px solid #fff;
    }

    /* ──────────────────────────────────────────
     4. HERO SECTION — App Banner Style
  ────────────────────────────────────────── */
    .hero-section {
        min-height: 180px !important;
        border-radius: 0 0 20px 20px;
        overflow: hidden;
        margin-bottom: 4px;
    }

    .hero-overlay {
        min-height: 180px !important;
        padding: 16px 16px !important;
    }

    .hero-title {
        font-size: 1.35rem !important;
        line-height: 1.2;
    }

    .hero-sub {
        display: none;
    }

    .hero-badge {
        font-size: 11px;
        padding: 3px 10px;
    }

    .hero-stats {
        display: none !important;
    }

    .hero-btn-primary,
    .hero-btn-outline {
        font-size: 13px !important;
        padding: 8px 18px !important;
    }

    /* ──────────────────────────────────────────
     5. PRODUCT SECTION — App Grid
  ────────────────────────────────────────── */
    .products-bg {
        padding: 16px 0 !important;
        background: #f2f3f5 !important;
    }

    .products-bg .container-fluid {
        padding: 0 10px !important;
    }

    .section-heading {
        font-size: 1.1rem !important;
        font-weight: 800;
    }

    .section-tag {
        font-size: 11px;
    }

    /* ── App Product Card ── */
    .product-card {
        border-radius: 14px !important;
        border: none !important;
        box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08) !important;
        overflow: hidden;
    }

    .product-img-wrap {
        height: 140px !important;
        background: #fff;
    }

    .product-img {
        object-fit: contain !important;
        padding: 6px;
    }

    .product-info {
        padding: 8px 10px 10px !important;
        background: #fff;
    }

    .product-name {
        font-size: 12px !important;
        font-weight: 700;
        margin-bottom: 3px !important;
        -webkit-line-clamp: 2;
        line-height: 1.35;
    }

    .product-rating {
        font-size: 10px !important;
        margin-bottom: 4px !important;
    }

    .rating-count {
        font-size: 9px !important;
    }

    .product-price {
        gap: 4px !important;
        margin-bottom: 8px !important;
    }

    .sale-price {
        font-size: 14px !important;
        font-weight: 900;
        color: #1c3a5e;
    }

    .original-price {
        font-size: 10px !important;
    }

    /* ── Stack qty + button vertically ── */
    .product-actions {
        flex-direction: column !important;
        gap: 5px !important;
        align-items: stretch !important;
    }

    .qty-input {
        width: 100% !important;
        text-align: center;
        padding: 6px 4px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
        background: #f5f7f2;
    }

    .cart-form {
        width: 100%;
    }

    .btn-add-cart {
        width: 100% !important;
        font-size: 12px !important;
        padding: 8px 6px !important;
        border-radius: 10px !important;
        font-weight: 800;
        letter-spacing: 0.2px;
        background: linear-gradient(135deg, #7fad39, #5a8a20) !important;
    }

    .product-badge {
        font-size: 10px !important;
        padding: 2px 7px !important;
        border-radius: 6px !important;
        top: 7px !important;
        left: 7px !important;
    }

    /* ──────────────────────────────────────────
     6. PROMO CARDS — Horizontal Scroll
  ────────────────────────────────────────── */
    section.bg-white.py-5>.container>.row {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 0 !important;
        padding: 0 10px 12px !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    section.bg-white.py-5>.container>.row::-webkit-scrollbar {
        display: none;
    }

    section.bg-white.py-5>.container>.row>.col-md-4 {
        min-width: 220px !important;
        flex: 0 0 220px !important;
    }

    .promo-card {
        border-radius: 16px !important;
        padding: 20px 16px !important;
    }

    .promo-title {
        font-size: 1rem !important;
    }

    .promo-text {
        font-size: 12px !important;
    }

    /* ──────────────────────────────────────────
     7. NEWSLETTER — App Style
  ────────────────────────────────────────── */
    .newsletter-section {
        padding: 20px 0 !important;
    }

    .newsletter-card {
        border-radius: 16px !important;
        padding: 20px 16px !important;
        margin: 0 10px;
    }

    .nl-title {
        font-size: 1.2rem !important;
    }

    .nl-sub {
        font-size: 12px !important;
    }

    .nl-fields {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .nl-btn {
        width: 100% !important;
        border-radius: 12px !important;
        padding: 12px !important;
    }

    .nl-input {
        border-radius: 10px !important;
    }

    /* ──────────────────────────────────────────
     8. DESKTOP FOOTER → HIDE on mobile
     (Bottom nav replaces it)
  ────────────────────────────────────────── */
    footer.py-5,
    .py-3.text-center.text-white[style*="background: #7fad39"] {
        display: none !important;
    }

    /* ──────────────────────────────────────────
     9. CART PAGE — App Style
  ────────────────────────────────────────── */
    .container.py-5 {
        padding: 12px 10px 16px !important;
    }

    /* ──────────────────────────────────────────
     10. PROFILE / ORDER PAGES
  ────────────────────────────────────────── */
    .profile-wrapper,
    .od-wrapper,
    .pr-wrapper,
    .invoice-wrapper {
        padding: 0 10px 16px !important;
        margin: 0 auto !important;
    }

    .user-card {
        border-radius: 16px !important;
        padding: 18px 16px !important;
        margin-bottom: 16px !important;
    }

    .orders-card {
        border-radius: 14px !important;
    }

    .od-info-grid,
    .info-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .od-header,
    .invoice-header {
        padding: 18px 16px !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    .od-header .meta,
    .invoice-header .inv-meta,
    .od-header .meta h4,
    .od-header .meta p {
        text-align: left !important;
    }

    .od-body,
    .invoice-body {
        padding: 16px !important;
    }

    .od-table {
        font-size: 12px !important;
    }

    .od-table thead th,
    .od-table tbody td {
        padding: 9px 8px !important;
    }

    /* Hide address column in orders table */
    .orders-table thead th:nth-child(3),
    .orders-table tbody td:nth-child(3) {
        display: none;
    }

    /* ──────────────────────────────────────────
     11. CHECKOUT — App Style
  ────────────────────────────────────────── */
    .pay-option-wrap {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .pay-option {
        border-radius: 14px !important;
        padding: 12px 14px !important;
    }

    /* ──────────────────────────────────────────
     12. BUTTONS — larger touch targets
  ────────────────────────────────────────── */
    .action-btns,
    .pr-btns {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    .action-btns>*,
    .pr-btns>* {
        width: 100% !important;
        justify-content: center !important;
        border-radius: 12px !important;
        padding: 13px !important;
    }

    /* ──────────────────────────────────────────
     13. SUCCESS / PAYMENT BANNERS
  ────────────────────────────────────────── */
    .success-banner {
        padding: 14px 16px !important;
        border-radius: 14px !important;
        gap: 12px !important;
    }

    .user-card {
        flex-direction: row !important;
    }

    /* ──────────────────────────────────────────
     14. TABLE RESPONSIVE on mobile
  ────────────────────────────────────────── */
    .table-responsive {
        border-radius: 10px;
    }

    /* ──────────────────────────────────────────
     15. ALERT / NOTIFICATION STYLE
  ────────────────────────────────────────── */
    .alert {
        border-radius: 12px !important;
        font-size: 13px;
    }

    /* ──────────────────────────────────────────
     16. SECTION TOP SPACING (below app bar)
  ────────────────────────────────────────── */
    section:first-of-type,
    .carousel.slide:first-child,
    #heroBannerCarousel {
        margin-top: 0 !important;
    }

}

/* end @media 767px */

/* ── Desktop: hide mobile elements ── */
@media (min-width: 768px) {
    .mobile-appbar {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: none !important;
    }
}