/* --- Product Tabs and Grid (screenshot accurate) --- */
.m-tab-bar {
    display: flex;
    gap: 18px;
    padding: 0 0 10px 0;
    background: #fff;
    border-bottom: 1.5px solid #f0f0f0;
    margin-bottom: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.m-tab-bar::-webkit-scrollbar { display: none; }
.m-tab {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 600;
    color: #222;
    padding: 10px 8px 8px 8px;
    border-bottom: 2.5px solid transparent;
    cursor: pointer;
    outline: none;
    transition: color 0.2s, border-color 0.2s;
}
.m-tab.active {
    color: #e74c3c;
    border-bottom: 2.5px solid #e74c3c;
}
.m-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 0 8px 16px 8px;
}
.m-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(44,62,80,0.06);
    border: 1px solid #f0f0f0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}
.m-card-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    background: #fafafa;
    display: block;
}
.m-card-info {
    padding: 10px 10px 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.m-title {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    line-height: 1.2;
    margin-bottom: 2px;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.m-badge-sale {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    padding: 2px 8px;
    z-index: 2;
}
.m-badge-ad {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #eee;
    color: #888;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    padding: 2px 7px;
    z-index: 2;
}
.m-discount-row {
    color: #e74c3c;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.m-discount-row .fa {
    font-size: 13px;
}
.m-price {
    color: #222;
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
}
.m-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #777;
    margin-top: 2px;
}
.m-stars {
    color: #f5a623;
    font-size: 12px;
}
.m-sold {
    color: #888;
    font-size: 12px;
}
/* Icon Row Styles */
.icon-row-scroll {
    width: 100vw;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid #f5f5f5;
    padding: 8px 0 2px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.icon-row-scroll::-webkit-scrollbar {
    display: none;
}
.icon-row-track {
    display: flex;
    flex-direction: row;
    gap: 18px;
    padding: 0 16px;
    min-width: 100vw;
    width: max-content;
    align-items: flex-end;
}
.icon-row-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    color: #333;
    min-width: 64px;
    opacity: 1;
    transition: opacity 0.3s;
}
.icon-row-ico {
    width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 4px;
    font-size: 20px;
}
.ico-coins { background: #ffe066; color: #e67e22; }
.ico-gogo { background: #d0e6ff; color: #3498db; }
.ico-brand { background: #eaf7e1; color: #27ae60; }
.ico-clearance { background: #ffe0e0; color: #e74c3c; }
.ico-hot { background: #fff3cd; color: #e67e22; }
.ico-more { background: #e0e0e0; color: #888; }
.coming-soon { opacity: 0.4; filter: grayscale(1) blur(1px); }

/* Featured Products Section */
/* --- Featured Products Screenshot Accurate --- */
.featured-products-section {
    background: #fff;
    padding: 0 0 18px 0;
    border-bottom: 1px solid #f5f5f5;
}
.featured-products-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 0 0 0;
    background: #fff;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.featured-products-scroll::-webkit-scrollbar {
    display: none;
}
.featured-products-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 0 10px 18px;
}
.featured-products-title {
    font-size: 24px;
    font-weight: 700;
    color: #222;
}
.featured-products-pill {
    background: #fff7e6;
    color: #e67e22;
    font-size: 15px;
    font-weight: 600;
    border-radius: 16px;
    padding: 4px 16px;
    margin-left: 6px;
    box-shadow: 0 1px 4px rgba(255,224,102,0.10);
}
.featured-products-track {
    display: flex;
    flex-direction: row;
    gap: 0;
    padding: 0 0 0 18px;
    background: #fff;
    overflow-x: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.featured-products-track::-webkit-scrollbar {
    display: none;
}
.featured-product-card {
    background: #fff;
    width: 132px;
    min-width: 132px;
    max-width: 132px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border-radius: 0;
    box-shadow: none;
    border: none;
    padding: 0;
    margin-right: 8px;
    margin-left: 0;
}
.featured-product-card img {
    width: 100%;
    height: 132px;
    object-fit: cover;
    border-radius: 0;
    margin: 0;
    display: block;
}
.featured-product-price {
    color: #e74c3c;
    font-weight: 700;
    font-size: 14px;
    margin: 7px 0 0 10px;
    text-align: left;
    width: auto;
    line-height: 1.1;
}
.featured-product-meta {
    font-size: 15px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-start;
    width: auto;
    margin: 4px 0 10px 10px;
}
.featured-product-rating {
    color: #f5a623;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
}
.featured-product-rating:before {
    content: '\2605';
    margin-right: 2px;
    font-size: 12px;
}
.featured-product-sold {
    color: #888;
    display: inline;
    font-size: 11px;
}
.slider-content-img img.banner-img-locked {
    opacity: 1 !important;
    transition: none !important;
}
.slider-content-img img {
    opacity: 1 !important;
    transition: none !important;
}
.slider-content-img img.banner-img-locked {
    opacity: 1 !important;
    transition: none !important;
}
.coupon-bar-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #e67e22;
    background: #fffbe6;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(255, 224, 102, 0.12);
    margin-right: 3px;
    margin-left: 2px;
}
.m-coupon-full.collapsed {
    min-height: 22px;
    max-height: 28px;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1), min-height 0.3s cubic-bezier(0.4,0,0.2,1);
}
.m-coupon-full.collapsed .coupon-scroll-track {
    gap: 4px;
    padding: 2px 4px;
}
.m-coupon-full.collapsed .coupon__wrap {
    min-width: 80px;
    max-width: 80px;
    height: 22px;
    border-radius: 6px;
    font-size: 7px;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.m-coupon-full.collapsed .coupon__title,
.m-coupon-full.collapsed .coupon__detail,
.m-coupon-full.collapsed .coupon__footer,
.m-coupon-full.collapsed .coupon__max,
.m-coupon-full.collapsed .coupon__price,
.m-coupon-full.collapsed .coupon__info,
.m-coupon-full.collapsed .coupon__btn,
.m-coupon-full.collapsed .coupon__copy-msg {
    display: none !important;
}
.m-coupon-full.collapsed .coupon__wrap {
    justify-content: center;
    align-items: stretch;
}
.m-coupon-full.collapsed .coupon__wrap::after {
    content: attr(data-code);
    color: #e74c3c;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.5px;
    display: block;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Full-width coupon module below banner */
.m-coupon-full {
    width: 100vw;
    max-width: 100vw;
    margin: 0 auto 0 auto;
    padding: 0 0 0 0;
    background: #fffbe6;
    border-bottom: 1.5px solid #ffe066;
    box-shadow: 0 2px 8px rgba(255, 224, 102, 0.08);
    min-height: 38px;
    display: block;
    position: relative;
    z-index: 5;
    overflow-x: auto;
    overflow-y: visible;
    white-space: nowrap;
}

.coupon-scroll-track {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 8px 12px;
    overflow-x: auto;
    overflow-y: visible;
    min-width: 100vw;
    width: max-content;
    white-space: nowrap;
}
.slider-category-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}
.slider-category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #e74c3c;
    opacity: 0.5;
    transition: background 0.2s, opacity 0.2s;
    cursor: pointer;
}
.slider-category-dot.active {
    background: #e74c3c;
    opacity: 1;
}
.m-banner .slider-text .slider-label img.active-touch {
    box-shadow: 0 4px 16px rgba(52,152,219,0.18);
    transform: scale(0.96);
    transition: box-shadow 0.2s, transform 0.2s;
}
/* Mobile UI (separate, non-intrusive). Applies in mobile-mode only */
html { scroll-behavior: smooth; }

/* Hidden by default; JS toggles body.mobile-mode on small screens */
.mobile-ui { display: none; }
body.mobile-mode .mobile-ui { display: block; }

/* Hide legacy desktop layout on mobile when mobile-mode active */
body.mobile-mode > :not(.mobile-ui):not(script):not(link):not(style) { display: none !important; }

/* Header */
.m-header { position: sticky; top: 0; z-index: 1000; background: #ffffff; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; }
.m-logo { height: 24px; }
.m-header-right { display: flex; gap: 12px; align-items: center; }
.m-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #333; }
.m-badge { position: absolute; top: -4px; right: -4px; background: #e74c3c; color: #fff; font-size: 10px; line-height: 1; padding: 2px 5px; border-radius: 10px; }

/* Sticky search */
.m-search-sticky { position: sticky; top: 48px; z-index: 999; background: #fff; border-bottom: 1px solid #f0f0f0; padding: 6px 12px; }
#mSearchForm { display: flex; align-items: center; gap: 8px; background: #f5f5f7; border-radius: 18px; padding: 6px 10px; }
#mSearchForm i { color: #888; }
#mSearchInput { appearance: none; border: none; outline: none; background: transparent; width: 100%; font-size: 14px; padding: 2px 0; }

/* Banner - using original component styles */
.m-banner { position: relative; }

.m-banner .single-slider {
    background-size: 130%;
    background-position: 0% 50%;
    background-repeat: no-repeat;
    animation: banner-pan-ltr 12s linear infinite;
}

@keyframes banner-pan-ltr {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

@keyframes banner-pan {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}
.m-banner .slider-main-content { 
    display: flex;
    height: 250px;
    position: relative;
}
.m-banner .slider-content-img {
    flex-basis: 40%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex-direction: column;
}
.m-banner .slider-content-img img {
    max-width: 100%;
    height: auto;
    position: relative;
    z-index: 2;
}
.m-banner .slider-text {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex-basis: calc(100% - 40%);
    text-align: center;
    padding: 0 16px;
    margin-bottom: 16px;
    
}
.m-banner .slider-text h1 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    line-height: 28px;
    margin-bottom: 6px;
    text-transform: capitalize;
}
.m-banner .slider-text p {
    color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    line-height: 20px;
    padding: 0;
    text-transform: capitalize;
}
.m-banner .slider-text .slider-label {
    height: 79%;
    overflow: visible;
    margin-top: 10px;
}

.m-banner .slider-text .slider-label img {
    height: 100%;
    width: 90%;
    display: block;
    object-fit: contain;
    position: relative;
    left: 0;
    transition: none;
    opacity: 1;
    z-index: 1;
}


.m-banner .slider-text .slider-label img.slide-anim {
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
    will-change: transform;
}
.m-banner .slider-text .slider-label img.fade-out {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
}
.m-featured-card img { width: 100%; height: 120px; object-fit: cover; display: block; }

/* Banner logo shimmer effect */
.m-banner .banner-logo-ice {
        position: absolute;
        top: 12px;
        left: 12px;
        width: 72px;
        height: 72px;
        z-index: 10;
        pointer-events: none;
        animation: ice-shimmer 2.2s linear infinite;
        background:
            linear-gradient(120deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.32) 50%, rgba(255,255,255,0.08) 100%) no-repeat;
        background-size: 300% 300%;
        background-position: 0% 50%;
        -webkit-mask-image: url('assets/img/logo/PWAlogo.png');
        mask-image: url('assets/img/logo/PWAlogo.png');
        -webkit-mask-size: contain;
        mask-size: contain;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-position: center;
        mask-position: center;
}
.m-featured-card .m-f-info { padding: 8px; font-size: 12px; }
.m-featured-card .m-f-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.m-featured-card .m-f-price { color: #e74c3c; font-weight: 600; }

/* Product grid */
.m-products { padding: 10px 8px 80px; /* bottom padding for bottom nav */ }
.m-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.m-card { background: #fff; border-radius: 10px; box-shadow: 0 6px 14px rgba(0,0,0,0.06); border: 1px solid #f0f0f0; overflow: hidden; display: flex; flex-direction: column; }
.m-card-img { width: 100%; height: 68vw; max-height: 180px; object-fit: cover; }
.m-card-info { padding: 8px; }
.m-title { font-size: 13px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.m-price { color: #e74c3c; font-weight: 700; font-size: 14px; }
.m-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #777; margin-top: 4px; }
.m-stars { color: #f5a623; font-size: 11px; }
.m-actions { display: flex; justify-content: space-between; align-items: center; padding: 8px; border-top: 1px solid #f2f2f2; }
.m-actions .icon { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #e5e5e5; color: #666; }
.m-actions .icon.active { color: #e74c3c; border-color: #e74c3c33; background: #e74c3c11; }

/* Skeletons */
.skeleton { position: relative; overflow: hidden; background: #eee; }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent); transform: translateX(-100%); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.m-skel-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 10px 8px; }
.m-skel-card { border-radius: 10px; height: 240px; }

/* Bottom navigation */
.m-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998; background: #fff; border-top: 1px solid #eee; display: grid; grid-template-columns: repeat(5, 1fr); height: 56px; }
.m-bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: #555; text-decoration: none; }
.m-bottom-nav a i { font-size: 18px; margin-bottom: 2px; }
.m-bottom-nav a.active { color: #e74c3c; }

/* Mobile Side Menu */
.m-menu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10000; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.m-menu-overlay.active { opacity: 1; visibility: visible; }
.m-side-menu { position: fixed; top: 0; right: -100%; width: 80%; max-width: 320px; height: calc(100vh - 56px); bottom: 56px; background: #fff; z-index: 10001; overflow-y: auto; transition: right 0.3s ease; box-shadow: -2px 0 8px rgba(0,0,0,0.1); }
.m-side-menu.active { right: 0; }
.m-menu-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid #eee; background: #f9f9f9; }
.m-menu-logo { height: 28px; }
.m-menu-close { background: none; border: none; font-size: 24px; color: #666; cursor: pointer; padding: 4px 8px; }
.m-menu-body { padding: 12px 0 24px; }
.m-menu-section { padding: 8px 0; }
.m-menu-title { padding: 12px 16px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: #999; letter-spacing: 0.5px; }
.m-menu-item a { display: flex; align-items: center; padding: 12px 16px; color: #333; text-decoration: none; font-size: 14px; }
.m-menu-item a i { width: 24px; margin-right: 12px; color: #e74c3c; font-size: 16px; }
.m-menu-item a:active { background: #f5f5f5; }
.m-menu-divider { height: 1px; background: #eee; margin: 8px 16px; }
.m-menu-contact { padding: 12px 16px; font-size: 13px; color: #666; }
.m-menu-contact p { margin: 8px 0; display: flex; align-items: center; }
.m-menu-contact i { width: 24px; margin-right: 12px; color: #e74c3c; }

/* Categories section with separate scroll */
.m-menu-categories { 
  height: auto; 
  max-height: 240px; 
  overflow-y: auto; 
  border-top: 1px solid #eee; 
  border-bottom: 1px solid #eee; 
  display: block;
  background: #fff;
}
.m-menu-categories a { 
  display: flex !important; 
  align-items: center; 
  padding: 10px 16px; 
  color: #333; 
  text-decoration: none; 
  font-size: 13px; 
  border-bottom: 1px solid #f5f5f5;
  width: 100%;
  box-sizing: border-box;
}
.m-menu-categories a:hover { background: #fafafa; }
.m-menu-categories a:last-child { border-bottom: none; }
.m-menu-categories a i { 
  width: 24px; 
  margin-right: 12px; 
    box-shadow: 0 8px 32px rgba(44,62,80,0.18);
    will-change: transform, box-shadow;
}
.m-banner .slider-text .slider-label img.slide-anim {

/* Ensure the PWA floating install button clears nav */
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s;
    will-change: transform, box-shadow;
/* Only apply on small screens */
@media (min-width: 769px){ body.mobile-mode .mobile-ui { display: none; } }
}