/* Mobile Fixes for Search Bar and Product Grid */

/* Mobile Search Bar Global Fixes */
@media (max-width: 768px) {
    /* Ensure search bar container is always visible */
    .navbar-part1 .header-action-items1,
    .header-action-items1,
    #rtsHeader .header-action-items1 {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        order: 999 !important;
        margin-top: 10px !important;
        padding: 15px 10px !important;
        background: rgba(248, 249, 250, 0.95) !important;
        border-top: 1px solid #e0e0e0 !important;
        border-radius: 0 0 15px 15px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        justify-content: center !important;
        align-items: center !important;
        z-index: 100 !important;
    }
    
    /* Search bar in mobile */
    .header-action-items1 .search-part.inline-search {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        flex: 1 !important;
        max-width: calc(100% - 120px) !important;
        margin-right: 15px !important;
        order: -1 !important;
    }
    
    /* Mobile navbar wrapper */
    .navbar-part1 {
        flex-wrap: wrap !important;
    }
    
    .navbar-inner {
        flex-wrap: wrap !important;
        width: 100% !important;
    }
    
    /* Universal Mobile Product Grid - 2 Columns EXACTLY */
    .products-area .row,
    .products-area3 .row,
    .product-grid .row,
    .row {
        margin: 0 -2px !important;
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    .products-area .row > [class*="col-"],
    .products-area3 .row > [class*="col-"],
    .product-grid .row > [class*="col-"],
    .row > .col-12,
    .row > .col-sm-6,
    .row > .col-md-4,
    .row > .col-lg-3,
    .row > [class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
        padding: 0 2px !important;
        margin-bottom: 8px !important;
        display: flex !important;
    }
    
    /* FIXED HEIGHT CARD CONTAINERS FOR CONSISTENCY - PROFESSIONAL WIDTH */
    .card-container {
        height: 350px !important;
        min-height: 350px !important;
        max-height: 350px !important;
        padding: 2px !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .product-card {
        height: 100% !important;
        min-height: 340px !important;
        max-height: 340px !important;
        display: flex !important;
        flex-direction: column !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.12) !important;
        transition: all 0.3s ease !important;
        background: white !important;
    }
    
    .product-card:hover {
        transform: translateY(-5px) !important;
        box-shadow: 0 8px 25px rgba(0,0,0,0.18) !important;
        border-color: #FF8C00 !important;
    }
    
    /* Fixed Image Section - PROFESSIONAL SIZE */
    .product-card .image-container {
        height: 150px !important;
        min-height: 150px !important;
        max-height: 150px !important;
        overflow: hidden !important;
        position: relative !important;
        flex-shrink: 0 !important;
        background: #f8f9fa !important;
        border-radius: 12px 12px 0 0 !important;
    }
    
    .product-card .card-img-top {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        transition: transform 0.3s ease !important;
    }
    
    .product-card:hover .card-img-top {
        transform: scale(1.05) !important;
    }
    
    /* SIMPLIFIED CARD BODY LAYOUT - PROFESSIONAL SPACING */
    .product-card .card-body {
        padding: 12px !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 130px !important;
        max-height: 130px !important;
        overflow: visible !important;
    }
    
    /* PRODUCT TITLE - PROFESSIONAL SIZE */
    .product-card .card-title {
        font-size: 13px !important;
        height: 40px !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        font-weight: 600 !important;
        color: #333 !important;
        width: 100% !important;
        text-align: left !important;
    }
    
    /* PRICE AND VIEW ICON ROW */
    .product-card .card-body .row {
        margin: 0 !important;
        display: flex !important;
        align-items: flex-start !important;
        width: 100% !important;
        flex: 1 !important;
    }
    
    .product-card .card-body .row .col-10 {
        flex: 1 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .product-card .card-body .row .col-2 {
        flex: 0 0 auto !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: 8px !important;
    }
    
    /* PRICE LAYOUT - PROFESSIONAL HORIZONTAL */
    .product-card .card-text {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        margin-bottom: 8px !important;
    }
    
    .product-card .card-text > div {
        display: flex !important;
        gap: 8px !important;
        align-items: center !important;
        flex-wrap: wrap !important;
    }
    
    /* PRICE STYLING - PROFESSIONAL FONTS */
    .product-card .card-text .text-danger {
        font-size: 11px !important;
        color: #dc3545 !important;
        text-decoration: line-through !important;
        font-weight: 500 !important;
        display: inline-block !important;
    }
    
    .product-card .card-text .text-success.fw-bold {
        font-size: 14px !important;
        color: #28a745 !important;
        font-weight: 700 !important;
        display: inline-block !important;
    }
    
    .product-card .card-text .fw-bold:not(.text-success) {
        font-size: 14px !important;
        color: #333 !important;
        font-weight: 700 !important;
        display: inline-block !important;
    }
    
    /* SELLER NAME - PROFESSIONAL */
    .product-card .card-text .seller-name {
        font-size: 9px !important;
        color: #28a745 !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
        margin-top: 4px !important;
        display: block !important;
    }
    
    /* VIEW ICON - HIDDEN IN MOBILE */
    .view-icon {
        display: none !important;
    }
    
    .product-card .card-body .row .col-2 {
        display: none !important;
    }
    
    /* ADJUST COL-10 TO FULL WIDTH WHEN EYE ICON IS HIDDEN */
    .product-card .card-body .row .col-10 {
        flex: 1 !important;
        max-width: 100% !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* CENTERED ADD TO CART BUTTON SECTION - PROFESSIONAL */
    .product-card .price-section {
        padding: 10px !important;
        margin-top: auto !important;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
        border-top: 1px solid #e9ecef !important;
        min-height: 60px !important;
        max-height: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        border-radius: 0 0 12px 12px !important;
    }
    
    /* PROFESSIONAL ADD TO CART BUTTON */
    .product-card .add-to-cart-btn {
        padding: 8px 16px !important;
        font-size: 0 !important; /* Hide text by setting font-size to 0 */
        width: 92% !important;
        max-width: 180px !important;
        background: #FF8C00 !important;
        border: none !important;
        color: white !important;
        border-radius: 25px !important;
        font-weight: bold !important;
        text-transform: uppercase !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        letter-spacing: 0.4px !important;
        position: relative !important;
        overflow: hidden !important;
        min-height: 38px !important;
        margin: 0 auto !important;
        box-shadow: 0 4px 12px rgba(153, 53, 53, 0.3) !important;
    }
    
    .product-card .add-to-cart-btn:hover {
        background: #FF8C00 !important;
        color: white !important;
        transform: translateY(-3px) !important;
        box-shadow: 0 8px 20px rgba(153, 53, 53, 0.4) !important;
    }
    
    /* Mobile Cart Icon - Make icon larger and visible */
    .product-card .add-to-cart-btn .fas {
        font-size: 16px !important; /* Make icon larger since text is hidden */
        margin: 0 !important;
        color: white !important;
    }
    
    .product-card .add-to-cart-btn i {
        font-size: 16px !important; /* Make icon larger since text is hidden */
        margin: 0 !important;
        color: white !important;
    }

    /* BUTTON SHINE EFFECT */
    .product-card .add-to-cart-btn::before {
        content: "" !important;
        position: absolute !important;
        top: 0 !important;
        left: -100% !important;
        width: 100% !important;
        height: 100% !important;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent) !important;
        transition: left 0.6s !important;
    }
    
    .product-card .add-to-cart-btn:hover::before {
        left: 100% !important;
    }
    
    /* Discount Badge */
    .discount-badge {
        position: absolute !important;
        top: 10px !important;
        right: 10px !important;
        background: linear-gradient(45deg, #dc3545, #c82333) !important;
        color: white !important;
        padding: 4px 8px !important;
        border-radius: 12px !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        z-index: 15 !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
        letter-spacing: 0.3px !important;
    }
    
    /* Overlay effect */
    .overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-image: url('../images/logo/ecom-logo-bw.png') !important;
        background-size: 60px 60px !important;
        background-repeat: repeat !important;
        transform: rotate(-45deg) !important;
        opacity: 0.05 !important;
        z-index: 5 !important;
        pointer-events: none !important;
    }
    
    /* Shop page mobile adjustments */
    .rts-shop-section {
        padding-top: 15px !important;
    }
    
    .shop-product-topbar {
        flex-wrap: wrap !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
        padding: 15px 10px !important;
        border-bottom: 1px solid #e0e0e0 !important;
        background: #f8f9fa !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
        display: none !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    /* Shop Search Bar Styling */
    .shop-search-bar-wrapper {
        margin-bottom: 20px !important;
        padding: 0 10px !important;
        display: none !important;
        justify-content: center !important;
    }
    
    .shop-search-bar-wrapper .search-part.inline-search {
        width: 100% !important;
        max-width: 400px !important;
        display: flex !important;
        background: white !important;
        border: 2px solid #FF8C00 !important;
        border-radius: 25px !important;
        padding: 8px 15px !important;
        box-shadow: 0 3px 10px rgba(153, 53, 53, 0.15) !important;
        transition: all 0.3s ease !important;
    }
    
    .shop-search-bar-wrapper .search-part.inline-search:hover,
    .shop-search-bar-wrapper .search-part.inline-search:focus-within {
        border-color: #b8860b !important;
        box-shadow: 0 5px 15px rgba(153, 53, 53, 0.25) !important;
        transform: translateY(-2px) !important;
    }
    
    .shop-search-bar-wrapper .search-input-inline {
        flex: 1 !important;
        display: flex !important;
    }
    
    .shop-search-bar-wrapper .search-input-inline-field {
        width: 100% !important;
        border: none !important;
        outline: none !important;
        background: transparent !important;
        font-size: 14px !important;
        color: #333 !important;
        padding: 0 !important;
        font-weight: 500 !important;
    }
    
    .shop-search-bar-wrapper .search-input-inline-field::placeholder {
        color: #999 !important;
        font-style: italic !important;
    }
    
    .shop-search-bar-wrapper .search-icon {
        color: #FF8C00 !important;
        font-size: 16px !important;
        cursor: pointer !important;
        padding: 0 8px !important;
    }
    
    .shop-product-topbar .items-onlist {
        font-size: 15px !important;
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 15px !important;
        font-weight: 700 !important;
        color: #333 !important;
        padding: 8px 12px !important;
        background: linear-gradient(135deg, #FF8C00, #b8860b) !important;
        color: white !important;
        border-radius: 20px !important;
        box-shadow: 0 3px 10px rgba(153, 53, 53, 0.3) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    
    .filter-area {
        width: 100% !important;
        text-align: center !important;
        display: flex !important;
        justify-content: center !important;
    }
    
    .filter-area .select-area {
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 !important;
    }
    
    .filter-area select {
        width: 100% !important;
        padding: 12px 16px !important;
        border: 2px solid #FF8C00 !important;
        border-radius: 25px !important;
        background: white !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #333 !important;
        text-align: center !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23993535' d='M2 0L0 2h4zm0 5L0 3h4z'/></svg>") !important;
        background-repeat: no-repeat !important;
        background-position: right 12px center !important;
        background-size: 12px !important;
        transition: all 0.3s ease !important;
        cursor: pointer !important;
    }
    
    .filter-area select:focus {
        outline: none !important;
        border-color: #b8860b !important;
        box-shadow: 0 0 15px rgba(153, 53, 53, 0.2) !important;
        background-color: #fffbf0 !important;
    }
    
    .filter-area select:hover {
        border-color: #b8860b !important;
        background-color: #fffbf0 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 4px 12px rgba(153, 53, 53, 0.15) !important;
    }
    
    /* SHOP PAGE PRODUCT GRID OVERRIDES */
    .rts-shop-section .products-area,
    .rts-shop-section .products-area3 {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .rts-shop-section .products-area .row,
    .rts-shop-section .products-area3 .row {
        margin: 0 -2px !important;
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    .rts-shop-section .products-area .row > [class*="col-"],
    .rts-shop-section .products-area3 .row > [class*="col-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
        padding: 0 2px !important;
        margin-bottom: 8px !important;
        display: flex !important;
    }
    
    /* SHOP PAGE CARD CONSISTENCY - PROFESSIONAL WIDTH */
    .rts-shop-section .card-container {
        height: 350px !important;
        min-height: 350px !important;
        max-height: 350px !important;
        padding: 2px !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .rts-shop-section .product-card {
        height: 100% !important;
        min-height: 340px !important;
        max-height: 340px !important;
        display: flex !important;
        flex-direction: column !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.12) !important;
        transition: all 0.3s ease !important;
        background: white !important;
    }
    
    /* SHOP PAGE RESPONSIVE LAYOUT FIXES */
    .rts-shop-section .container {
        padding: 0 4px !important;
    }
    
    .rts-shop-section .row {
        margin: 0 !important;
    }
    
    .rts-shop-section .col-12 {
        padding: 0 2px !important;
    }
}

/* Extra Small Mobile Devices - Banner Further Reduced */
@media (max-width: 480px) {
    /* Even smaller banner for very small screens */
    .banner.banner-1 {
        min-height: 180px !important;
        height: 180px !important;
        max-height: 180px !important;
    }
    
    .banner .banner-inner {
        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
    }
    
    .swiper.bannerSlide2,
    .swiper-wrapper,
    .swiper-slide {
        height: 180px !important;
        min-height: 180px !important;
        max-height: 180px !important;
    }
    
    .banner-single {
        min-height: 180px !important;
        height: 180px !important;
        max-height: 180px !important;
    }
    
    .banner-single .single-inner {
        padding: 10px !important;
    }
    
    .banner-single .slider-title {
        font-size: 1.2rem !important;
        margin-bottom: 4px !important;
    }
    
    .banner-single .slider-btn2 {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
    }
    
    /* Navigation buttons for extra small screens */
    .swiper-button-prev,
    .swiper-button-next {
        width: 35px !important;
        height: 35px !important;
    }
    
    .swiper-button-prev:after,
    .swiper-button-next:after {
        font-size: 14px !important;
    }
    
    .header-action-items1 .search-part.inline-search {
        max-width: calc(100% - 100px) !important;
        margin-right: 10px !important;
    }
    
    .card-container {
        min-height: 320px !important;
    }
    
    .product-card {
        min-height: 310px !important;
    }
    
    .product-card .image-container {
        height: 140px !important;
    }
    
    .product-card .card-body {
        padding: 10px !important;
    }
    
    .product-card .card-title {
        font-size: 13px !important;
        height: 36px !important;
    }
    
    .product-card .price-section {
        padding: 10px !important;
    }
    
    .product-card .add-to-cart-btn {
        font-size: 0 !important; /* Keep text hidden - only show icon */
        padding: 0.2rem 0.4rem !important;
    }
}

/* Force display for all search elements */
.search-part.inline-search,
.search-part.inline-search .search-input-inline,
.search-part.inline-search .search-input-inline-field,
.search-part.inline-search .search-icon {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.search-part.inline-search .search-input-inline {
    flex: 1 !important;
}

.search-part.inline-search .search-input-inline-field {
    width: 100% !important;
}

/* Banner Mobile Responsiveness Fixes */
@media (max-width: 768px) {
    /* Reduce overall banner section height */
    .banner.banner-1 {
        min-height: 220px !important;
        height: 220px !important;
        padding: 0 !important;
    }
    
    /* Hide category sidebar on mobile to save space */
    .banner .banner-inner .catagory-sidebar {
        display: none !important;
    }
    
    /* Make banner carousel full width on mobile */
    .banner .banner-inner .col-xl-10 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* Fix banner background and content */
    .banner .banner-inner {
        padding: 0 !important;
        margin: 0 !important;
        height: 220px !important;
        min-height: 220px !important;
        max-height: 220px !important;
    }
    
    /* Banner swiper container height */
    .swiper.bannerSlide2 {
        height: 220px !important;
        min-height: 220px !important;
        max-height: 220px !important;
    }
    
    .swiper-wrapper {
        height: 220px !important;
        min-height: 220px !important;
        max-height: 220px !important;
    }
    
    .swiper-slide {
        height: 220px !important;
        min-height: 220px !important;
        max-height: 220px !important;
    }
    
    /* Banner single styling for mobile */
    .banner-single {
        min-height: 220px !important;
        height: 220px !important;
        max-height: 220px !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
        position: relative !important;
    }
    
    /* Add overlay to improve text readability */
    .banner-single::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.05) !important;
        z-index: 1;
    }
    
    /* Ensure content is above overlay */
    .banner-single .single-inner {
        position: relative !important;
        z-index: 2 !important;
        padding: 15px !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Content box wrapper */
    .banner-single .content-box {
        text-align: center !important;
        max-width: 90% !important;
    }
    
    /* Mobile banner text styling */
    .banner-single .slider-title {
        font-size: 1.4rem !important;
        line-height: 1.1 !important;
        color: white !important;
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8), 1px 1px 3px rgba(0, 0, 0, 0.9) !important;
        margin-bottom: 6px !important;
        font-weight: bold !important;
    }
    
    .banner-single .slider-subtitle {
        font-size: 0.75rem !important;
        color: white !important;
        text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8), 0px 0px 2px rgba(0, 0, 0, 1) !important;
        margin-bottom: 4px !important;
        display: none !important; /* Hide subtitle to save space */
    }
    
    .banner-single .slider-description {
        font-size: 0.7rem !important;
        color: white !important;
        text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8), 0px 0px 2px rgba(0, 0, 0, 1) !important;
        margin-bottom: 8px !important;
        display: none !important; /* Hide description to save space */
    }
    
    /* Mobile banner button */
    .banner-single .slider-btn2 {
        background: #007bff !important;
        color: white !important;
        padding: 8px 16px !important;
        border-radius: 20px !important;
        text-decoration: none !important;
        font-weight: 600 !important;
        display: inline-block !important;
        box-shadow: 0 3px 10px rgba(0, 123, 255, 0.4) !important;
        transition: all 0.3s ease !important;
        font-size: 0.8rem !important;
    }
    
    .banner-single .slider-btn2:hover {
        background: #0056b3 !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4) !important;
    }
    
    /* Swiper navigation on mobile */
    .swiper-button-prev,
    .swiper-button-next {
        background: rgba(255, 255, 255, 0.9) !important;
        color: #007bff !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
    }
    
    .swiper-button-prev:after,
    .swiper-button-next:after {
        font-size: 16px !important;
        font-weight: bold !important;
    }
    
    /* SHOP.PHP SPECIFIC OVERRIDES - FORCE MOBILE LAYOUT */
    .rts-shop-section .product-card .card-body .row .col-2 {
        display: none !important;
    }
    
    .rts-shop-section .product-card .card-body .row .col-10 {
        flex: 1 !important;
        max-width: 100% !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .rts-shop-section .view-icon {
        display: none !important;
    }
    
    /* SHOP PAGE CARD LAYOUT FIXES - PROFESSIONAL */
    .rts-shop-section .product-card .image-container {
        height: 150px !important;
        min-height: 150px !important;
        max-height: 150px !important;
        overflow: hidden !important;
        position: relative !important;
        flex-shrink: 0 !important;
        background: #f8f9fa !important;
        border-radius: 12px 12px 0 0 !important;
    }
    
    .rts-shop-section .product-card .card-body {
        padding: 12px !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 130px !important;
        max-height: 130px !important;
        overflow: visible !important;
    }
    
    .rts-shop-section .product-card .card-title {
        font-size: 13px !important;
        height: 40px !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        font-weight: 600 !important;
        color: #333 !important;
        width: 100% !important;
        text-align: left !important;
    }
    
    .rts-shop-section .product-card .price-section {
        padding: 10px !important;
        margin-top: auto !important;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
        border-top: 1px solid #e9ecef !important;
        min-height: 60px !important;
        max-height: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        border-radius: 0 0 12px 12px !important;
    }
    
    .rts-shop-section .product-card .add-to-cart-btn {
        padding: 8px 16px !important;
        font-size: 0 !important; /* Hide text, show only icon */
        width: 92% !important;
        max-width: 180px !important;
        background:#FF8C00;
        border: none !important;
        color: white !important;
        border-radius: 25px !important;
        font-weight: bold !important;
        text-transform: uppercase !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        letter-spacing: 0.4px !important;
        position: relative !important;
        overflow: hidden !important;
        min-height: 38px !important;
        margin: 0 auto !important;
        box-shadow: 0 4px 12px rgba(153, 53, 53, 0.3) !important;
    }
    
    /* Ensure shop section icons are visible */
    .rts-shop-section .product-card .add-to-cart-btn .fas,
    .rts-shop-section .product-card .add-to-cart-btn i {
        font-size: 16px !important;
        margin: 0 !important;
        color: white !important;
    }
    
    .rts-shop-section .product-card .add-to-cart-btn:hover {
        background: linear-gradient(135deg, #b8860b, #FF8C00) !important;
        color: white !important;
        transform: translateY(-3px) !important;
        box-shadow: 0 8px 20px rgba(153, 53, 53, 0.4) !important;
    }
    
    /* SHOP PAGE PRICE STYLING - PROFESSIONAL */
    .rts-shop-section .product-card .card-text {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        margin-bottom: 8px !important;
    }
    
    .rts-shop-section .product-card .card-text > div {
        display: flex !important;
        gap: 8px !important;
        align-items: center !important;
        flex-wrap: wrap !important;
    }
    
    .rts-shop-section .product-card .card-text .text-danger {
        font-size: 11px !important;
        color: #dc3545 !important;
        text-decoration: line-through !important;
        font-weight: 500 !important;
        display: inline-block !important;
    }
    
    .rts-shop-section .product-card .card-text .text-success.fw-bold {
        font-size: 14px !important;
        color: #28a745 !important;
        font-weight: 700 !important;
        display: inline-block !important;
    }
    
    .rts-shop-section .product-card .card-text .fw-bold:not(.text-success) {
        font-size: 14px !important;
        color: #333 !important;
        font-weight: 700 !important;
        display: inline-block !important;
    }
    
    .rts-shop-section .product-card .card-text .seller-name {
        font-size: 9px !important;
        color: #28a745 !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
        margin-top: 4px !important;
        display: block !important;
    }
    
    /* OVERRIDE INLINE STYLES FROM INDEX.PHP & SHOP.PHP */
    .product-card .card-body[style] {
        padding: 12px !important;
        min-height: 160px !important;
        max-height: 160px !important;
        overflow: visible !important;
    }
    
    .product-card .card-title[style] {
        font-size: 13px !important;
        height: 45px !important;
        margin-bottom: 8px !important;
    }
    
    .product-card .card-text[style] {
        overflow: visible !important;
    }
    
    /* FORCE VISIBILITY FOR ALL PRICE ELEMENTS */
    .product-card .card-text > div,
    .product-card .card-text > span,
    .product-card .card-text span {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        font-weight: bold !important;
    }
    
    /* INDEX.PHP SPECIFIC OVERRIDES - MATCH SHOP.PHP STYLING */
    .rts-hand-picked-products-section .product-card .card-body .row .col-2 {
        display: none !important;
    }
    
    .rts-hand-picked-products-section .product-card .card-body .row .col-10 {
        flex: 1 !important;
        max-width: 100% !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .rts-hand-picked-products-section .view-icon {
        display: none !important;
    }
    
    /* INDEX PAGE CARD LAYOUT FIXES - PROFESSIONAL */
    .rts-hand-picked-products-section .product-card .image-container {
        height: 150px !important;
        min-height: 150px !important;
        max-height: 150px !important;
        overflow: hidden !important;
        position: relative !important;
        flex-shrink: 0 !important;
        background: #f8f9fa !important;
        border-radius: 12px 12px 0 0 !important;
    }
    
    .rts-hand-picked-products-section .product-card .card-body {
        padding: 12px !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 130px !important;
        max-height: 130px !important;
        overflow: visible !important;
    }
    
    .rts-hand-picked-products-section .product-card .card-title {
        font-size: 13px !important;
        height: 40px !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        font-weight: 600 !important;
        color: #333 !important;
        width: 100% !important;
        text-align: left !important;
    }
    
    .rts-hand-picked-products-section .product-card .price-section {
        padding: 10px !important;
        margin-top: auto !important;
        background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
        border-top: 1px solid #e9ecef !important;
        min-height: 60px !important;
        max-height: 60px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        border-radius: 0 0 12px 12px !important;
    }
    
    .rts-hand-picked-products-section .product-card .add-to-cart-btn {
        padding: 8px 16px !important;
        font-size: 0 !important; /* Hide text, show only icon */
        width: 92% !important;
        max-width: 180px !important;
        background: #FF8C00 !important;
        border: none !important;
        color: white !important;
        border-radius: 25px !important;
        font-weight: bold !important;
        text-transform: uppercase !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        letter-spacing: 0.4px !important;
        position: relative !important;
        overflow: hidden !important;
        min-height: 38px !important;
        margin: 0 auto !important;
        box-shadow: 0 4px 12px rgba(153, 53, 53, 0.3) !important;
    }
    
    /* Ensure index section icons are visible */
    .rts-hand-picked-products-section .product-card .add-to-cart-btn .fas,
    .rts-hand-picked-products-section .product-card .add-to-cart-btn i {
        font-size: 16px !important;
        margin: 0 !important;
        color: white !important;
    }
    
    .rts-hand-picked-products-section .product-card .add-to-cart-btn:hover {
        background: #FF8C00 !important;
        color: white !important;
        transform: translateY(-3px) !important;
        box-shadow: 0 8px 20px rgba(153, 53, 53, 0.4) !important;
    }
    
    /* INDEX PAGE PRICE STYLING - PROFESSIONAL */
    .rts-hand-picked-products-section .product-card .card-text {
        display: flex !important;
        flex-direction: column !important;
        gap: 2px !important;
        margin-bottom: 8px !important;
    }
    
    .rts-hand-picked-products-section .product-card .card-text > div {
        display: flex !important;
        gap: 8px !important;
        align-items: center !important;
        flex-wrap: wrap !important;
    }
    
    .rts-hand-picked-products-section .product-card .card-text .text-danger {
        font-size: 11px !important;
        color: #dc3545 !important;
        text-decoration: line-through !important;
        font-weight: 500 !important;
        display: inline-block !important;
    }
    
    .rts-hand-picked-products-section .product-card .card-text .text-success.fw-bold {
        font-size: 14px !important;
        color: #28a745 !important;
        font-weight: 700 !important;
        display: inline-block !important;
    }
    
    .rts-hand-picked-products-section .product-card .card-text .fw-bold:not(.text-success) {
        font-size: 14px !important;
        color: #333 !important;
        font-weight: 700 !important;
        display: inline-block !important;
    }
    
    .rts-hand-picked-products-section .product-card .card-text .seller-name {
        font-size: 9px !important;
        color: #28a745 !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
        margin-top: 4px !important;
        display: block !important;
    }
}


/* === Reduce gap between product name and price on mobile === */
@media (max-width: 768px) {
  /* Product title — tighter spacing below name */
  .product-card .card-title,
  .rts-shop-section .product-card .card-title,
  .rts-hand-picked-products-section .product-card .card-title {
    margin-bottom: 3px !important; /* reduced from 8px */
    height: 36px !important;       /* slightly shorter block */
    line-height: 1.25 !important;
  }

  /* Price section — less vertical gap */
  .product-card .card-text,
  .rts-shop-section .product-card .card-text,
  .rts-hand-picked-products-section .product-card .card-text {
    margin-bottom: 4px !important; /* reduced from 8px */
    gap: 2px !important;           /* reduced vertical spacing between prices */
  }

  /* Keep consistency for price fonts */
  .product-card .card-text .fw-bold:not(.text-success),
  .rts-shop-section .product-card .card-text .fw-bold:not(.text-success),
  .rts-hand-picked-products-section .product-card .card-text .fw-bold:not(.text-success) {
    font-size: 13px !important;
  }

  .product-card .card-text .text-success.fw-bold,
  .rts-shop-section .product-card .card-text .text-success.fw-bold,
  .rts-hand-picked-products-section .product-card .card-text .text-success.fw-bold {
    font-size: 13px !important;
  }
}

/* === FINAL OVERRIDE: Reduce gap between product name and price (strongest version) === */
@media only screen and (max-width: 768px) {
  /* Tighter spacing below product name */
  .rts-shop-section .product-card .card-title,
  .rts-hand-picked-products-section .product-card .card-title,
  .product-card .card-title {
    margin-bottom: 2px !important;
    height: 34px !important;
    line-height: 1.2 !important;
  }

  /* Reduce vertical space between price and next element */
  .rts-shop-section .product-card .card-text,
  .rts-hand-picked-products-section .product-card .card-text,
  .product-card .card-text {
    margin-bottom: 3px !important;
    gap: 1px !important;
    padding-bottom: 0 !important;
  }

  /* Adjust seller name distance if exists */
  .rts-shop-section .product-card .seller-name,
  .rts-hand-picked-products-section .product-card .seller-name,
  .product-card .seller-name {
    margin-top: 2px !important;
  }

  /* Force tighter layout within the card body */
  .rts-shop-section .product-card .card-body,
  .rts-hand-picked-products-section .product-card .card-body,
  .product-card .card-body {
    padding-bottom: 4px !important;
  }
}
