/* ============================================
   SAVEUZ - Responsive CSS
   Mobile-First Dizayn
   ============================================ */

/* ============================================
   MOBIL (< 768px)
   ============================================ */

@media (max-width: 768px) {
    .profile-container {
        padding: 0px;
    }

    section {
        padding: 0 !important;
    }

    .auth-logo {
        height: 85px !important;
    }

    .search-results-title {
        font-size: 1.1rem !important;
    }

    .category-meta {
        font-size: 0.75rem !important;
    }

    .markets-page-title {
        font-size: 1.2rem !important;
    }

    /* Market page refinement */
    .section-header {
        margin-bottom: 10px !important;
    }

    .market-grid {
        margin-top: 5px !important;
    }

    .market-grid .brand-card {
        width: 100% !important;
        min-width: unset !important;
    }

    .market-grid .brand-image {
        aspect-ratio: 1 / 1 !important;
    }

    .categories-page-title {
        font-size: 1.2rem !important;
    }

    .market-promo-title {
        font-size: 0.95rem !important;
    }

    .market-promo-card {
        height: 80px !important;
        padding: 10px 15px !important;
    }

    .market-promo-count {
        font-size: 0.85rem !important;
    }

    .market-promo-arrow {
        width: 30px !important;
        height: 30px !important;
        font-size: 1.1rem !important;
    }

    /* Recursive Catalog Styles */
    .catalog-item.nested-level-1 {
        padding-left: 15px !important;
        border-bottom: 1px solid #f1f1f1;
    }

    .catalog-sub-item-mobile.nested-level-1 {
        padding-left: 15px !important;
        border-bottom: 1px solid #f1f1f1;
    }

    .catalog-item.nested-level-2 {
        padding-left: 30px !important;
    }

    .catalog-sub-item-mobile.nested-level-2 {
        padding-left: 30px !important;
    }

    .catalog-item .catalog-sub-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .catalog-item.active>.catalog-sub-list {
        max-height: 2000px;
        transition: max-height 0.5s ease-in;
    }

    .catalog-item .catalog-chevron {
        transition: transform 0.3s ease;
    }

    .catalog-item.active>.catalog-item-header .catalog-chevron {
        transform: rotate(90deg);
    }

    .catalog-sub-item-mobile {
        display: block;
        padding: 12px 15px;
        color: #555;
        text-decoration: none;
        font-size: 0.95rem;
    }

    .catalog-sub-empty {
        padding: 15px;
        color: #999;
        font-size: 0.9rem;
        font-style: italic;
    }

    /* Favorites Page Adjustments */
    .favorites-tabs {
        margin-bottom: 15px !important;
    }

    .favorites-tab {
        padding: 10px 8px !important;
        font-size: 0.85rem !important;
    }

    /* Fixed Header Group */
    .mobile-header-group {
        width: 100%;
        background: #ffffff;
        /* No sticky on group, sticky will be on header */
    }

    /* Top Header */
    .top-header {
        height: 32px;
        font-size: 0.75rem;
    }

    .top-left,
    .top-right {
        gap: 10px;
    }

    .top-link {
        font-size: 0.75rem;
    }

    .location-selector svg {
        width: 14px;
        height: 14px;
    }

    /* Header */
    /* Header (Uzum Mobile Style) */
    .mobile-app-banner {
        display: block !important;
        background: #ffffff !important;
        padding: 2px 15px;
        border-bottom: 1px solid #f0f0f0;
    }

    .app-banner-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0 !important;
    }

    .app-banner-info {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .app-banner-logo {
        height: 55px !important;
        width: auto !important;
        border-radius: 4px;
        object-fit: contain;
    }

    .app-banner-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .app-banner-subtext {
        font-size: 0.65rem;
        color: var(--text-muted);
        font-weight: 500;
        text-transform: lowercase;
    }

    .app-banner-btn {
        background: var(--primary) !important;
        color: white !important;
        padding: 6px 16px !important;
        border-radius: 8px;
        font-size: 0.8rem;
        font-weight: 600;
        white-space: nowrap;
        box-shadow: 0 2px 6px rgba(255, 125, 51, 0.2);
        transition: transform 0.2s ease;
    }

    .app-banner-btn:active {
        transform: scale(0.96);
    }

    /* Row 2: Top Header as Location Bar */
    .top-header {
        display: block !important;
        background: #ffffff !important;
        /* Match logo background */
        height: auto !important;
        padding: 2px 15px !important;
        border-bottom: 1px solid #f0f0f0;
    }

    .top-header-content {
        padding: 0 !important;
    }

    .top-left {
        width: 100%;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .top-right {
        display: none !important;
        /* Hide other top links on mobile */
    }

    .location-selector {
        width: 100%;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 5px;
    }

    .location-current-wrap {
        display: flex;
        align-items: center;
        gap: 4px;
        /* Tighter gap */
    }

    .location-current-wrap svg:first-child {
        width: 16px !important;
        height: 16px !important;
    }

    .current-location {
        font-size: 0.8rem !important;
        /* Smaller text */
        font-weight: 500 !important;
        color: var(--text-main) !important;
    }

    .location-help-text {
        font-size: 0.75rem;
        color: var(--text-muted);
        font-weight: 400;
    }

    /* Row 3: Main Header */
    header {
        height: auto !important;
        padding: 5px 12px 14px !important;
        /* Adjusted padding */
        background: #ffffff !important;
        border-bottom: none !important;
        box-shadow: none !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
    }

    .header-container {
        padding: 0 !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .header-left,
    .header-right {
        display: none !important;
        /* Hide logo and actions in header rows on mobile */
    }

    .header-center {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
        align-items: center !important;
        padding: 0 4px !important;
    }

    body.show-mobile-back #mobileBackBtn {
        display: flex !important;
    }

    #mobileBackBtn span {
        display: block !important;
        font-size: 0.8rem;
        font-weight: 600;
        white-space: nowrap;
    }

    /* Hide the content-level back button on mobile to avoid duplicates */
    .btn-back {
        display: none !important;
    }

    .search-main {
        background: #f2f4f7 !important;
        border: 1px solid transparent !important;
        border-radius: 24px !important;
        /* Perfect pill shape like in the image */
        height: 44px !important;
        /* Slightly more compact height */
        display: flex !important;
        align-items: center !important;
        position: relative;
        flex: 1 !important;
        min-width: 0 !important;
        /* CRITICAL FIX for Android flex-item size calculation */
        /* Take remaining space */
        transition: all 0.2s ease !important;
    }

    .search-main:focus-within {
        background: #ffffff !important;
        border-color: var(--primary) !important;
        box-shadow: 0 0 0 4px rgba(255, 125, 51, 0.1) !important;
    }

    .search-main input {
        background: transparent !important;
        padding-left: 40px !important;
        /* Space for icon */
        padding-right: 12px !important;
        font-size: 16px !important;
        /* Forced 16px to prevent automatic browser zoom on mobile focus */
        color: #1f2026 !important;
        /* Exact Uzum dark text */
        height: 100% !important;
        border: none !important;
        outline: none !important;
        font-weight: 400 !important;
        width: 100% !important;
    }

    .search-main input::placeholder {
        color: #8b8e99 !important;
        font-size: 0.85rem;
    }

    .search-main button {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        height: 20px;
        width: 20px;
        background: transparent !important;
        color: #8b8e99 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
        border: none !important;
    }

    .search-main button svg {
        width: 18px !important;
        height: 18px !important;
        stroke-width: 1.5 !important;
        /* Thinner stroke to match image */
    }

    /* Mobile Catalog Redesign (Footer-style Accordion) */
    .catalog-dropdown {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        z-index: 2000 !important;
        background: #fff !important;
        padding-top: 0;
        overflow-y: auto !important;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .catalog-dropdown.active {
        display: block !important;
        opacity: 1 !important;
    }

    .catalog-dropdown::before {
        display: none !important;
    }

    .catalog-container {
        max-width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        display: block !important;
        background: #fff !important;
    }

    .catalog-sidebar {
        width: 100% !important;
        /* Match footer side padding */
        border-right: none !important;
    }

    .catalog-content {
        display: none !important;
    }

    .catalog-item {
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 0;
        border-radius: 0 !important;
        /* Remove pill shape */
    }

    .catalog-item-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 0 !important;
        /* Match footer-title-wrap */
        cursor: pointer;
        transition: color 0.2s ease;
    }

    .catalog-item.active .catalog-item-header {
        background: none !important;
        /* No orange background */
        color: var(--primary) !important;
        /* Highlight text color only */
        box-shadow: none !important;
    }

    .catalog-item-header span {
        display: flex;
        align-items: center;
        gap: 0;
        /* No gap needed if icon is hidden */
        font-weight: 700;
        font-size: 0.9rem;
        color: #1a1a1a;
    }

    .catalog-item-icon {
        display: none !important;
        /* Hide icons to match footer style in image */
    }

    .catalog-chevron {
        transition: transform 0.3s ease;
        color: #8b8e99;
    }

    .catalog-item.active .catalog-chevron {
        transform: rotate(180deg);
        /* Match footer rotation */
    }

    .catalog-sub-list {
        display: none;
        padding-bottom: 15px;
    }

    .catalog-item.active .catalog-sub-list {
        display: block;
    }

    .catalog-sub-item-mobile {
        display: block;
        padding: 8px 0;
        color: #8b8e99;
        /* Light gray to match reference image */
        text-decoration: none;
        font-size: 0.8rem;
        font-weight: 400;
        transition: color 0.2s ease;
    }

    .catalog-sub-item-mobile:hover {
        color: var(--primary);
    }

    /* Mobile Catalog Header Decoration */
    .mobile-catalog-header {
        background: #fff;
        padding: 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 10;
        border-bottom: 1px solid #eee;
    }

    .mobile-catalog-header h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 800;
    }

    .btn-close-catalog {
        background: #f8f9fa;
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        cursor: pointer;
        color: #333;
    }

    .mobile-menu-btn {
        display: none;
    }

    /* Typography */
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.2rem !important;
    }

    h3 {
        font-size: 1.2rem;
    }

    /* Hero Carousel Mobile */
    .carousel-container {
        height: 180px !important;
        margin-top: 10px;
        margin-bottom: 20px;
        border-radius: 12px;
    }

    .features-row {
        display: flex !important;
        justify-content: center !important;
        padding: 0 5px !important;
        gap: 10px !important;
        margin-top: 5px;
        margin-bottom: 25px;
    }

    .feature-card {
        display: flex !important;
        flex-direction: column !important;
        /* Text below image */
        align-items: center !important;
        justify-content: center !important;
        width: 80px !important;
        height: 100px !important;
        /* Slightly more height for text */
        border-radius: 12px !important;
        padding: 8px !important;
        background: #ffffff !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03) !important;
        text-decoration: none !important;
    }

    .f-icon-wrap {
        width: 44px !important;
        height: 44px !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .f-icon-wrap img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }

    .feature-title {
        font-size: 0.65rem !important;
        font-weight: 500 !important;
        color: var(--text-main) !important;
    }

    .carousel-content {
        left: 20px !important;
        max-width: 70%;
    }

    .carousel-title {
        font-size: 1.2rem !important;
        margin-bottom: 8px !important;
    }

    .carousel-desc {
        font-size: 0.8rem !important;
        margin-bottom: 15px !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .carousel-btn {
        padding: 6px 16px !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
    }

    .carousel-arrow {
        display: none !important;
    }

    .carousel-dots {
        bottom: 10px !important;
    }

    .carousel-dot {
        width: 6px !important;
        height: 6px !important;
    }

    /* Section padding */


    /* Grid'lar */
    /* Categories Redesign (Uzum Mobile Style) */
    .home-categories-header {
        align-items: center !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        margin-bottom: 15px !important;
    }

    .home-categories-header h2 {
        font-size: 1.4rem !important;
        font-weight: 700 !important;
    }

    .section-link-red {
        color: #E03137 !important;
        font-size: 0.8rem !important;
        font-weight: 500 !important;
        text-decoration: none !important;
        background: transparent !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    .section-link {
        color: #E03137 !important;
        font-size: 0.8rem !important;
        font-weight: 500 !important;
        text-decoration: none !important;
        background: transparent !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

    .category-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px !important;
        padding: 0 5px !important;
    }

    .category-card {
        height: 85px !important;
        /* Compact vertical height */
        min-height: 85px !important;
        background: #ffffff !important;
        padding: 7px !important;
        border-radius: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        /* Vertical layout */
        justify-content: flex-start !important;
        align-items: flex-start !important;
        position: relative !important;
        overflow: hidden !important;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
    }

    .category-card::after {
        display: none !important;
    }

    .category-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        width: 60% !important;
        /* Limit text width to avoid overlap with image */
        z-index: 2 !important;
    }

    .category-name {
        font-size: 0.69rem !important;
        /* Smaller text */
        color: #1f2026 !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
        margin-bottom: 2px !important;
        white-space: normal !important;
    }

    .category-subtitle {
        font-size: 0.6rem !important;
        /* Very small subtitle */
        color: var(--text-muted) !important;
        font-weight: 500 !important;
        line-height: 1 !important;
    }

    .category-image-container {
        position: absolute !important;
        right: -5px !important;
        bottom: -5px !important;
        width: 55px !important;
        height: 55px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 1 !important;
        margin: 0 !important;
    }

    .category-image-container img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        border-radius: 0 !important;
    }

    .hide-mobile {
        display: none !important;
    }
}

/* End of @media (max-width: 768px) */

@media (max-width: 991px) {

    .product-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 12px !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
    }

    .product-grid::-webkit-scrollbar {
        display: none !important;
    }

    .product-grid .product-card {
        flex: 0 0 180px !important;
        width: 180px !important;
        min-width: 180px !important;
        height: auto !important;
        margin: 0 !important;
    }

    .product-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }



    .product-name {
        font-size: 0.85rem !important;
        height: 2.6em !important;
        line-height: 1.3 !important;
        margin-bottom: 4px !important;
    }

    .product-description {
        display: none !important;
    }

    .product-price-block {
        margin-top: 4px !important;
    }

    .product-price {
        font-size: 0.9rem !important;
        font-weight: 700 !important;
    }

    .product-actions {
        margin-top: 8px !important;
    }

    .product-cta {
        padding: 8px 10px !important;
        font-size: 0.85rem !important;
        background: #f2f4f7 !important;
        color: #1f2026 !important;
    }

    .product-market-info {
        display: flex !important;
        min-height: auto !important;
        margin-bottom: 8px !important;
    }

    .product-label {
        font-size: 0.75rem !important;
        margin-bottom: 2px !important;
    }

    .product-market-name {
        font-size: 0.85rem !important;
        gap: 4px !important;
    }

    .market-row {
        /* Gorizontal scroll ishlatiladi */
        gap: 12px !important;
    }

    .brand-card {
        width: 150px !important;
        min-width: 150px !important;
        min-height: 180px !important;
        max-height: 180px !important;
        padding: 8px !important;
    }

    .brand-image {
        height: 80px !important;
        aspect-ratio: 1 / 1 !important;
        margin-bottom: 6px !important;
        border-radius: 10px !important;
    }

    .brand-info {
        gap: 2px !important;
        margin-bottom: 6px !important;
        flex: 1 !important;
        overflow: hidden !important;
    }

    .brand-name {
        font-size: 0.85rem !important;
        line-height: 1.1 !important;
        margin-bottom: 2px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        word-break: break-word !important;
    }

    .brand-desc {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        color: #8b8e99 !important;
        word-break: break-word !important;
        max-height: 1.68rem !important;
    }

    .brand-action {
        display: none !important;
    }

}

@media (max-width: 768px) {

    /* Kategoriya kartochkalari */
    .category-card {
        padding: 20px;
    }

    .category-icon {
        width: 60px;
        height: 60px;
    }

    .category-name {
        font-size: 0.95rem;
    }

    /* Kategoriya header */
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .category-header-icon {
        width: 80px;
        height: 80px;
    }

    .category-title {
        font-size: 1.8rem;
    }

    /* Mahsulot tafsilotlari */
    .product-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 24px;
    }

    .product-detail-image {
        height: 280px;
    }

    .product-detail-title {
        font-size: 2rem;
    }

    .product-detail-description {
        font-size: 1rem;
    }

    /* Offer kartochkalari */
    .offer-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .offer-price-container {
        text-align: left;
        width: 100%;
    }

    /* Market kartochkalari */
    .market-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .market-view-btn {
        width: 100%;
        text-align: center;
    }

    .market-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Auth sahifalari */
    .auth-container {
        padding: 20px;
    }

    .auth-box {
        padding: 30px 20px;
    }

    .auth-title {
        font-size: 1.6rem;
    }

    /* Subcategory tags */
    .subcategory-tags {
        gap: 8px;
    }

    .subcategory-tag {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

}


/* ============================================
   PLANSHET (768px - 1024px)
   ============================================ */

@media (min-width: 768px) and (max-width: 1024px) {

    /* Header */
    .search-mini {
        width: 200px;
    }

    /* Grid'lar */
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .market-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    /* Mahsulot tafsilotlari */
    .product-container {
        grid-template-columns: 300px 1fr;
        gap: 30px;
    }

    .product-detail-title {
        font-size: 2.5rem;
    }
}

/* ============================================
   KATTA EKRANLAR (> 1400px)
   ============================================ */

/* ============================================
   KATTA EKRANLAR (> 1024px)
   ============================================ */

@media (min-width: 1024px) {

    /* Container */
    .container {
        max-width: 1400px;
        /* Standardize with style.css */
        margin: 0 auto;
        padding: 0 40px;
        /* More padding on large screens */
    }

    .market-custom-container {
        max-width: 1400px;
        /* Standardize with style.css */
        margin: 0 auto;
        padding: 0 40px;
        /* More padding on large screens */
    }

    /* Target store page specifically for narrower, better padded layout */
    .section-market-detail .container {
        max-width: 1240px !important;
    }

    /* Grid'lar */


    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    /* Mahsulot tafsilotlari */
    .product-container {
        grid-template-columns: 400px 1fr;
        gap: 50px;
    }

    .product-detail-image {
        height: 400px;
    }
}

/* ============================================
   PRINT STILLARI
   ============================================ */

@media print {

    header,
    footer,
    .mobile-menu-btn,
    .search-mini,
    .auth-buttons {
        display: none;
    }

    body {
        background: white;
    }

    .product-card,
    .category-card,
    .market-card {
        break-inside: avoid;
    }
}

/* ============================================
   DARK MODE QO'LLAB-QUVVATLASH (Kelajak uchun)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Bu yerda dark mode stillari qo'shilishi mumkin */
    /* Hozircha faqat light mode */
}

/* ============================================
   ANIMATSIYALAR
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {

    /* Market Detail Premium Responsiveness */
    .market-header-premium {
        padding: 15px !important;
        border-radius: 0 0 20px 20px !important;
        margin-bottom: 15px !important;
    }

    .market-logo-premium {
        width: 64px !important;
        height: 64px !important;
        border-radius: 12px !important;
    }

    .market-title-premium {
        font-size: 1.15rem !important;
    }

    .market-desc-premium {
        font-size: 0.8rem !important;
    }

    .market-actions-row {
        gap: 8px !important;
    }

    .btn-premium {
        padding: 10px !important;
        font-size: 0.85rem !important;
        border-radius: 10px !important;
    }

    .btn-premium-loc {
        flex: 0 0 40px !important;
        width: 40px !important;
        height: 40px !important;
    }

    /* Horizontal Card Responsiveness */
    .product-list-container {
        padding: 0 12px 15px 12px !important;
        gap: 12px !important;
    }

    .product-card-horizontal {
        padding: 12px !important;
        border-radius: 16px !important;
        gap: 12px !important;
    }

    .card-img-left {
        width: 80px !important;
        height: 80px !important;
        border-radius: 12px !important;
    }

    .card-title {
        font-size: 0.9rem !important;
    }

    .card-desc {
        font-size: 0.75rem !important;
    }

    .card-price-premium {
        font-size: 1rem !important;
    }
}


/* ============================================
   MOBILE APP UI ENHANCEMENTS (Uzum Style)
   ============================================ */

@media (max-width: 768px) {
    body {
        padding-bottom: 70px;
        /* Space for bottom nav */
    }

    /* Mobile App Banner */
    .mobile-app-banner {
        display: block;
        background: #f4f5f5;
        padding: 10px 15px;
        border-bottom: 1px solid #e5e5e5;
    }

    .app-banner-content {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .app-banner-logo {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        object-fit: contain;
    }

    .app-banner-text {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .app-banner-title {
        font-size: 0.9rem;
        font-weight: 700;
        color: var(--text-main);
    }

    .app-banner-desc {
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .app-banner-btn {
        background: #7000ff;
        /* Uzum Purple */
        color: white;
        padding: 6px 14px;
        border-radius: 8px;
        font-size: 0.8rem;
        font-weight: 600;
        text-decoration: none;
    }

    /* Fixed Bottom Nav */
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 65px;
        background: white;
        display: flex !important;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
        border-top: 1px solid #f0f0f0;
        border-radius: 20px 20px 0 0;
        z-index: 2147483647 !important;
        /* Max z-index to stay on top */
        padding-bottom: env(safe-area-inset-bottom);
        box-sizing: border-box;
        overflow: visible !important;
        /* Allow badges to be seen */
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #8b8e99 !important;
        /* Default inactive grey */
        gap: 4px;
        background: none !important;
        border: none !important;
        padding: 5px 0 !important;
        cursor: pointer;
        transition: all 0.2s ease;
        height: auto !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .mobile-nav-item svg {
        width: 24px;
        height: 24px;
        stroke-width: 1.8;
    }

    .mobile-nav-item span {
        font-size: 0.6rem;
        font-weight: 500;
        letter-spacing: -0.1px;
        white-space: nowrap;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-nav-item.active {
        color: #E03137 !important;
        /* Uzum Red/Pinkish */
    }

    .mobile-nav-item.active svg {
        stroke: #E03137;
    }

    .mobile-nav-icon-wrap {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
    }

    .favorites-badge-mobile {
        position: absolute;
        top: -6px;
        right: -8px;
        background: #E03137;
        color: white;
        font-size: 0.65rem;
        padding: 0;
        border-radius: 50%;
        min-width: 16px;
        height: 16px;
        display: none;
        /* Controlled by JS */
        align-items: center;
        justify-content: center;
        font-weight: 700;
        border: 1.5px solid white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        z-index: 2;
    }



    /* Header & Location Fixes */
    .top-header {
        display: none;
        /* Hide top bar on mobile as per Uzum app */
    }

    /* FIX: Favorite Markets Mobile Layout - Horizontal Scroll */
    .favorites-tab-content .market-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 12px !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
    }

    .favorites-tab-content .market-grid::-webkit-scrollbar {
        display: none !important;
    }

    .favorites-tab-content .brand-card {
        flex: 0 0 160px !important;
        width: 160px !important;
        min-width: 160px !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 12px !important;
        border-radius: 16px !important;
        text-align: center !important;
    }

    .favorites-tab-content .brand-image {
        width: 80px !important;
        height: 80px !important;
        margin-bottom: 0 !important;
        border-radius: 50% !important;
    }

    .favorites-tab-content .brand-info {
        text-align: center !important;
        margin-bottom: 0 !important;
        gap: 4px !important;
    }

    .favorites-tab-content .extra-actions-container {
        grid-column: 3;
        margin: 0 !important;
        width: auto !important;
    }

    .favorites-tab-content .btn-remove-favorite {
        width: auto !important;
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
        background: #fff0f0 !important;
        color: #E03137 !important;
        border-radius: 8px !important;
    }

    /* FIX: Favorite Products Mobile Layout - Horizontal Scroll */
    .favorites-tab-content .product-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 12px !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
    }

    .favorites-tab-content .product-grid::-webkit-scrollbar {
        display: none !important;
    }

    .favorites-tab-content .product-grid .product-card {
        flex: 0 0 180px !important;
        width: 180px !important;
        min-width: 180px !important;
        height: auto !important;
        min-height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 12px !important;
        border-radius: 16px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    }

    .favorites-tab-content .product-image {
        width: 100% !important;
        height: 140px !important;
        border-radius: 12px !important;
        background: #f8f9fa !important;
        margin-bottom: 10px !important;
    }

    .favorites-tab-content .product-info-wrapper {
        grid-column: 2;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .favorites-tab-content .product-name {
        font-size: 0.95rem !important;
        height: auto !important;
        max-height: 2.8em !important;
        line-height: 1.4 !important;
        margin-bottom: 4px !important;
        white-space: normal !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    .favorites-tab-content .product-market-info {
        display: flex !important;
        font-size: 0.8rem !important;
        color: #8b8e99 !important;
        margin-bottom: 6px !important;
        min-height: auto !important;
        height: auto !important;
    }

    .favorites-tab-content .product-price-section {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        margin: 0 !important;
        height: auto !important;
        width: 100% !important;
    }

    .favorites-tab-content .product-price {
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: #1f2026 !important;
    }

    .favorites-tab-content .extra-actions-container {
        margin-top: 0 !important;
        width: auto !important;
    }

    .favorites-tab-content .product-card .btn-remove-favorite {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
        background: #fff0f0 !important;
        color: #E03137 !important;
        white-space: nowrap !important;
    }

    .favorites-tab-content .product-card-action {
        display: none !important;
    }

    .favorites-tab-content .btn-favorite-toggle {
        display: none !important;
    }

    header {
        position: sticky;
        top: 0;
        z-index: 900;
        background: white;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    }

    .header-container {
        flex-direction: column;
        height: auto;
        padding: 10px 15px;
    }

    .header-left {
        width: 100%;
        justify-content: space-between;
    }

    .header-center {
        width: 100%;
        margin-top: 5px;
    }

    .header-right {
        display: none !important;
        /* Actions moved to bottom nav */
    }

    /* Footer Accordion */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        padding-bottom: 0 !important;
    }

    .footer-column {
        border-bottom: 1px solid #f0f0f0;
        gap: 0 !important;
        margin-bottom: 0;
    }

    .footer-title-wrap {
        padding: 18px 0;
        cursor: pointer;
        display: flex !important;
        width: 100%;
        justify-content: space-between;
    }

    .footer-title {
        font-size: 1rem !important;
        margin-bottom: 0 !important;
    }

    .footer-chevron {
        display: block !important;
        transition: transform 0.3s ease;
    }

    .footer-links {
        display: none !important;
        padding-bottom: 20px !important;
        flex-direction: column;
        gap: 12px !important;
    }

    .footer-column.active .footer-links {
        display: flex !important;
    }

    .footer-column.active .footer-chevron {
        transform: rotate(180deg);
    }

    /* Column for Apps/Socials - Usually always visible or handled differently */
    .footer-column:last-child {
        border-bottom: none;
        padding: 25px 0 15px;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
    }

    .footer-column:last-child .footer-title-wrap {
        justify-content: center !important;
        padding: 10px 0 !important;
    }

    .footer-app-badges {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 10px !important;
        width: 100%;
        margin-bottom: 20px;
    }

    .footer-app-badges .app-badge img {
        height: 35px !important;
        width: auto !important;
    }

    .footer-socials {
        width: 100%;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .social-icons {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 15px !important;
        margin-top: 10px;
    }

    .footer-bottom {
        padding: 15px 0 70px !important;
        /* Space for mobile nav at the very end */
    }

    /* Scroll to Top Mobile Optimization */
    #scrollTopBtn {
        bottom: 90px !important;
        /* Above bottom nav */
        right: 20px !important;
        width: 44px !important;
        height: 44px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
        animation: floatBtn 3s ease-in-out infinite !important;
    }

    #scrollTopBtn svg {
        width: 22px !important;
        height: 22px !important;
    }

    @keyframes floatBtn {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-8px);
        }
    }

}

/* Base styles for new mobile elements (hidden on desktop) */
.mobile-app-banner,
.mobile-nav {
    display: none;
}

/* ============================================
   PRODUCT VIEW RESPONSIVENESS (Refined)
   ============================================ */

@media (max-width: 992px) {
    .product-view-main {
        flex-direction: column-reverse;
        padding: 30px;
        gap: 30px;
    }

    .product-view-left,
    .product-view-right {
        flex: none;
        width: 100%;
    }

    .product-view-right {
        height: 350px;
    }

    .product-view-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .product-view-wrapper {
        border-radius: 20px;
        margin: 10px 0;
    }

    .product-view-main {
        padding: 20px;
        gap: 20px;
    }

    .product-view-right {
        height: 280px;
        border-radius: 16px;
    }

    .product-view-title {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .product-view-description {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .product-view-price {
        font-size: 28px;
    }

    .product-view-actions {
        grid-template-columns: 1fr;
    }

    .price-card-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Product View Mobile Redesign */
    .product-view-mobile-premium {
        background: #f8f9fb;
        padding-bottom: 5px;
        /* Added slight padding */
    }

    .p-view-img-top {
        width: 100%;
        height: 280px;
        /* Reduced from 350px */
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 0 0 24px 24px;
        overflow: hidden;
        margin-bottom: 12px;
        padding: 20px;
    }

    .p-view-img-top img {
        max-width: 90%;
        max-height: 90%;
        object-fit: contain;
    }

    .p-view-card-mobile {
        background: white;
        border-radius: 24px;
        padding: 24px;
        margin: 0 12px 10px 12px;
        /* Reduced bottom margin from 20px to 10px */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    }

    .p-view-title-m {
        font-size: 1.5rem;
        font-weight: 800;
        margin-bottom: 8px;
        color: #1f2026;
    }

    .p-view-desc-m {
        font-size: 0.95rem;
        color: #8b8e99;
        line-height: 1.5;
        margin-bottom: 24px;
    }

    .p-view-market-m {
        display: flex;
        align-items: center;
        gap: 12px;
        text-decoration: none;
        margin-bottom: 24px;
    }

    .p-view-market-logo {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        overflow: hidden;
        background: #f8f9fa;
        border: 1px solid #eee;
    }

    .p-view-market-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .p-view-market-name {
        display: block;
        font-weight: 700;
        font-size: 1rem;
        color: #1f2026;
    }

    .p-view-market-cat {
        display: block;
        font-size: 0.8rem;
        color: #8b8e99;
    }

    .p-view-price-box-m {
        background: #F2F4F7;
        border-radius: 16px;
        padding: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .p-view-price-m {
        font-size: 1.6rem;
        font-weight: 800;
        color: #1f2026;
    }

    .p-view-loc-btn-m {
        width: 44px;
        height: 44px;
        background: #F16060;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        text-decoration: none;
        box-shadow: 0 4px 10px rgba(241, 96, 96, 0.3);
    }

    .p-view-actions-m {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 12px;
    }

    .btn-m-action {
        height: 52px;
        border-radius: 16px;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        font-weight: 700;
        color: white;
        cursor: pointer;
        transition: transform 0.2s ease;
    }

    .btn-m-action:active {
        transform: scale(0.96);
    }

    .btn-m-fav {
        background: #FF7D33;
    }

    .btn-m-share {
        background: #F16060;
    }

    .btn-m-market-all {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 52px;
        background: #F2F4F7;
        color: #8b8e99;
        text-decoration: none;
        font-weight: 700;
        border-radius: 16px;
        font-size: 0.95rem;
    }

    .product-detail-view {
        background: #f8f9fb;
        padding-bottom: 20px;
    }

    .mt-xl {
        margin-top: 25px !important;
        /* Reduced from 60px for mobile */
    }

    /* Favorite Markets Horizontal Scroll */
    #markets-tab .market-grid {
        display: flex !important;
        overflow-x: auto !important;
        overflow-y: hidden;
        gap: 15px !important;
        padding: 5px 5px 15px 5px !important;
        margin-left: -5px;
        margin-right: -5px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        grid-template-columns: none !important;
        /* Override grid */
    }

    #markets-tab .market-grid::-webkit-scrollbar {
        height: 4px;
    }

    #markets-tab .market-grid::-webkit-scrollbar-thumb {
        background: #eee;
        border-radius: 10px;
    }

    #markets-tab .brand-card {
        flex: 0 0 160px !important;
        min-width: 160px !important;
        height: auto !important;
        min-height: 180px !important;
        scroll-snap-align: start;
        margin-bottom: 0 !important;
        padding: 10px !important;
    }

    #markets-tab .brand-name {
        font-size: 1rem !important;
    }

    #markets-tab .brand-desc {
        font-size: 0.75rem !important;
    }
}

/* ============================================
   GLOBAL UTILITIES
   ============================================ */

/* Hide on desktop/large screens (> 768px) */
@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}