/* 
   EcomzCare Theme Custom Modifications
   Version: 1.0.1
*/

/* ==========================================
   SLIDER SECTIONS - PREV/NEXT BUTTONS
   ========================================== */

.slider-section {
    margin-bottom: 40px;
    position: relative;
}

.slider-container-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-track-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.slider-track {
    display: flex;
    transition: transform 0.4s ease-in-out;
    will-change: transform;
    gap: 15px;
    padding: 5px 0;
}

/* Product Cards in Slider */
.slider-track .product-card {
    flex: 0 0 calc(16.666% - 12.5px); /* Desktop: 6 items */
    min-width: 0;
    margin: 0;
}

/* Brand Items in Slider */
.slider-track .brand-item {
    flex: 0 0 calc(16.666% - 12.5px); /* Desktop: 6 items */
    min-width: 0;
    margin: 0;
}

/* Buyer Cards in Slider */
.slider-track .buyer-card {
    flex: 0 0 calc(25% - 11.25px); /* Desktop: 4 items (better for buyer cards) */
    min-width: 0;
    margin: 0;
}

/* Comment Cards in Slider */
.slider-track .comment-card {
    flex: 0 0 calc(25% - 11.25px); /* Desktop: 4 items (better for comment cards) */
    min-width: 0;
    margin: 0;
}

/* ==========================================
   COMMENT CARD - VERIFIED BADGE ALIGNMENT (TOP RIGHT)
   ========================================== */

/* Ensure the card has relative positioning so the absolute badge works */
.comment-card {
    position: relative; 
    padding-top: 15px; /* Add top padding to prevent badge overlap with content */
}

/* Positioning the Commenter Header */
.comment-card .comment-header {
    position: relative; /* Relative context for the badge if placed here */
    margin-bottom: 12px;
}

/* 
   ABSOLUTE POSITIONING: 
   Places the badge in the Top Right corner of the card (or header)
*/
.comment-card .theme-verified-badge {
    position: absolute;
    top: 0;
    right: 0;
    
    /* Styling to look good in the corner */
    background-color: #ffffff;
    color: var(--success-green);
    border: 1px solid #e0e0e0;
    
    padding: 4px 10px;
    border-radius: 20px; /* Pill shape looks best in corners */
    
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    white-space: nowrap;
    
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 2;
}

/* Icon styling */
.comment-card .theme-verified-badge i {
    font-size: 9px;
    margin-bottom: 0;
}

/* Hover effect */
.comment-card .theme-verified-badge:hover {
    background-color: var(--success-green);
    color: #ffffff;
    border-color: var(--success-green);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

/* 
   HEADER ADJUSTMENTS
   Ensures the Author Name aligns nicely on the left
*/
.comment-card .commenter-info {
    width: 100%;
    padding-right: 80px; /* Reserve space on the right for the badge */
}

.comment-card .commenter-info h4 {
    margin: 0;
    font-size: 15px;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.2;
}

/* Slider Navigation Buttons */
.slider-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
    flex-shrink: 0;
    color: var(--text-color);
    font-size: 16px;
}

.slider-nav-btn:hover {
    background: var(--header-bg);
    color: var(--white);
    border-color: var(--header-bg);
}

.slider-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.slider-nav-btn.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Tablet Styles */
@media (max-width: 991px) {
    .slider-track .product-card {
        flex: 0 0 calc(33.333% - 10px); /* Tablet: 3 items */
    }
    
    .slider-track .brand-item {
        flex: 0 0 calc(25% - 11.25px); /* Tablet: 4 items */
    }
    
    .slider-track .buyer-card {
        flex: 0 0 calc(33.333% - 10px); /* Tablet: 3 items */
    }
    
    .slider-track .comment-card {
        flex: 0 0 calc(33.333% - 10px); /* Tablet: 3 items */
    }
    
    .slider-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

/* Mobile Styles */
@media (max-width: 576px) {
    .slider-track {
        gap: 10px;
    }
    
    .slider-track .product-card {
        flex: 0 0 calc(50% - 5px); /* Mobile: 2 items */
    }
    
    .slider-track .brand-item {
        flex: 0 0 calc(33.333% - 6.67px); /* Mobile: 3 items (brands) */
    }
    
    .slider-track .buyer-card {
        flex: 0 0 calc(50% - 5px); /* Mobile: 2 items */
    }
    
    .slider-track .comment-card {
        flex: 0 0 calc(50% - 5px); /* Mobile: 2 items */
    }
    
    .slider-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 20;
    }
    
    .slider-nav-btn.prev-btn {
        left: -5px;
    }
    
    .slider-nav-btn.next-btn {
        right: -5px;
    }
    
    .slider-container-wrapper {
        padding: 0 5px;
    }
}

/* Small Mobile Styles */
@media (max-width: 375px) {
    .slider-track .product-card {
        flex: 0 0 calc(50% - 5px);
    }
    
    .slider-track .brand-item {
        flex: 0 0 calc(50% - 5px); /* Small mobile: 2 items */
    }
    
    .slider-nav-btn {
        width: 28px;
        height: 28px;
    }
}

/* Ensure products grid doesn't affect slider */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

/* For the search results, keep grid layout */
#search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

/* Touch scrolling indicators */
.slider-track-container {
    -webkit-overflow-scrolling: touch;
}


/*================ Search result page */

/* ==========================================
   SEARCH RESULTS PAGE LAYOUT & SIDEBAR
   ========================================== */
.search-page-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 30px;
}

/* Sidebar Styles */
.search-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 140px; /* Adjust based on header height */
}

.sidebar-title {
    font-size: 18px;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--header-bg);
    padding-bottom: 10px;
    font-weight: 700;
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group-title {
    font-size: 15px;
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Custom Checkboxes */
.checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: color 0.2s;
}

.checkbox-label:hover {
    color: var(--header-bg);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3px;
    display: inline-block;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: var(--header-bg);
    border-color: var(--header-bg);
}

.checkbox-label input:checked ~ .checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.count {
    margin-left: auto;
    color: #999;
    font-size: 12px;
}

/* Scrollable Filter List */
.scrollable-filter {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Price Inputs */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-input-wrapper {
    position: relative;
    flex: 1;
}

.price-input-wrapper input {
    width: 100%;
    padding: 8px 10px 8px 25px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.currency-symbol {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #777;
}

.price-separator {
    color: #999;
}

.apply-filter-btn {
    width: 100%;
    padding: 8px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.apply-filter-btn:hover {
    background: var(--header-bg);
}

/* Active Filters */
.active-filters {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px dashed var(--border-color);
}

.active-filters h4 {
    font-size: 14px;
    margin-bottom: 10px;
}

#active-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

/* ==========================================
   FILTER TAGS IMPROVEMENTS
   ========================================== */
.filter-tag {
    background: var(--light-gray);
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.filter-tag:hover {
    background: #e0e0e0;
}

.filter-tag .close-filter {
    cursor: pointer;
    color: #666;
    font-size: 12px;
    transition: var(--transition);
}

.filter-tag .close-filter:hover {
    color: var(--header-bg);
    transform: scale(1.2);
}

.close-filter {
    cursor: pointer;
    color: #666;
}

.close-filter:hover {
    color: #c0392b;
}

.clear-filters-btn {
    background: none;
    border: none;
    color: var(--header-bg);
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.clear-filters-btn:hover {
    color: var(--secondary-color);
}

/* Main Content Area */
.search-main-content {
    flex: 1;
}

/* Top Bar */
.search-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
}

.results-count {
    font-size: 16px;
    color: #555;
}

.results-count strong {
    color: var(--primary-color);
}

.sort-by-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-by-wrapper label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.sort-by-wrapper select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 991px) {
    .search-page-layout {
        flex-direction: column;
    }
    .search-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }
}

/* ==========================================
   PRICE SLIDER IMPROVEMENTS
   ========================================== */
.price-slider-container {
    padding: 15px 5px;
}

.price-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-weight: 600;
    color: var(--primary-color);
}

.ui-slider .ui-slider-handle {
    border-radius: 50%;
    background: var(--header-bg);
    border: 2px solid white;
    width: 20px;
    height: 20px;
    top: -7px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.ui-slider .ui-slider-handle:hover {
    transform: scale(1.2);
    background: var(--secondary-color);
}

.ui-slider .ui-slider-range {
    background: var(--header-bg);
    opacity: 0.3;
}

#price-range-slider {
    margin: 15px 0;
    height: 6px;
    background: #e0e0e0;
    border: none;
    border-radius: 3px;
}

#price-range-slider .ui-slider-range {
    background: var(--header-bg);
    border-radius: 3px;
}

#price-range-slider .ui-slider-handle {
    width: 18px;
    height: 18px;
    background: var(--white);
    border: 2px solid var(--header-bg);
    border-radius: 50%;
    top: -6px; /* Center vertically on 6px bar */
    cursor: pointer;
    transition: transform 0.2s;
}

#price-range-slider .ui-slider-handle:hover {
    transform: scale(1.2);
}

/* Live Search Bar Styling */
.live-search-bar {
    margin-bottom: 20px;
}

.live-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--white);
    padding: 0 15px;
    height: 45px;
    transition: border-color 0.3s;
}

.live-search-input-wrapper:focus-within {
    border-color: var(--header-bg);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1);
}

.live-search-input-wrapper i {
    color: #999;
    margin-right: 10px;
}

.live-search-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
    color: var(--text-color);
}

.clear-search-icon {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 14px;
    padding: 5px;
}

.clear-search-icon:hover {
    color: var(--header-bg);
}

/* ==========================================
   MOBILE SEARCH SUGGESTIONS IMPROVEMENTS
   ========================================== */
/* ==========================================
   SEARCH SUGGESTIONS WITH RELEVANCE
   ========================================== */
.suggestion-item.relevance-high {
    background-color: #f0f9ff;
    border-left: 3px solid var(--header-bg);
}

.suggestion-item.relevance-high .suggestion-info h4 {
    color: var(--header-bg);
    font-weight: 600;
}

.suggestion-item.relevance-medium {
    opacity: 0.9;
}

.suggestion-item.view-all-results {
    background: linear-gradient(135deg, var(--primary-color), var(--header-bg));
    color: white;
    border-top: 2px solid rgba(255,255,255,0.2);
}

.suggestion-item.view-all-results .suggestion-info h4 {
    color: white;
}

.suggestion-item.view-all-results .suggestion-info p {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
}

.suggestion-item.view-all-results i {
    color: white;
    font-size: 20px;
}

/* Mobile improvements */
@media (max-width: 768px) {
    .suggestion-item {
        padding: 15px;
    }
    
    .suggestion-item.relevance-high {
        border-left-width: 4px;
    }
    
    .suggestion-item img {
        width: 50px;
        height: 50px;
    }
    
    .suggestion-info h4 {
        font-size: 15px;
        margin-bottom: 4px;
    }
    
    .suggestion-info .price {
        font-size: 14px;
    }
    
    .suggestion-item.view-all-results {
        padding: 18px 15px;
    }
    
    .suggestion-item.view-all-results i {
        font-size: 24px;
    }
}

/* Loading state */
.suggestion-item.loading {
    justify-content: center;
    padding: 20px;
    color: #666;
}

.suggestion-item.loading i {
    margin-right: 10px;
    color: var(--header-bg);
}

/* No results */
.suggestion-item.no-results,
.suggestion-item.error {
    justify-content: center;
    padding: 25px;
    text-align: center;
}

.suggestion-item.no-results i,
.suggestion-item.error i {
    font-size: 30px;
    margin-bottom: 10px;
    color: #999;
}

.suggestion-item.no-results h4,
.suggestion-item.error h4 {
    color: #666;
    margin-bottom: 5px;
}

.suggestion-item.no-results p,
.suggestion-item.error p {
    color: #999;
    font-size: 13px;
}

/* ==========================================
   FILTER CHECKBOX IMPROVEMENTS
   ========================================== */
.filter-checkboxes {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 10px;
}

.filter-checkboxes::-webkit-scrollbar {
    width: 6px;
}

.filter-checkboxes::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.filter-checkboxes::-webkit-scrollbar-thumb {
    background: var(--header-bg);
    border-radius: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 4px;
}

.checkbox-label:hover {
    background: #f8f9fa;
}

.checkbox-label .count {
    margin-left: auto;
    color: #999;
    font-size: 12px;
}

/* ==========================================
   ACTIVE FILTERS IMPROVEMENTS
   ========================================== */
.active-filters {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

#active-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.filter-tag {
    background: white;
    border: 1px solid var(--border-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-tag .close-filter {
    cursor: pointer;
    color: #666;
    font-size: 12px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.filter-tag .close-filter:hover {
    background: var(--header-bg);
    color: white;
}

.clear-filters-btn {
    background: none;
    border: 1px solid var(--header-bg);
    color: var(--header-bg);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-top: 10px;
}

.clear-filters-btn:hover {
    background: var(--header-bg);
    color: white;
}

/* ==========================================
   RESULTS COUNT BADGE
   ========================================== */
.count-badge {
    background: var(--header-bg);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    margin-left: 8px;
    display: inline-block;
}

/* ==========================================
   MOBILE SEARCH PAGE SIDEBAR - COMPLETE STYLES
   For all mobile and small screen devices
   ========================================== */

/* Base mobile sidebar styles - opens from left */
.search-sidebar.mobile-sidebar.left-sidebar {
    display: none;
    position: fixed;
    left: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: var(--white);
    z-index: var(--z-sidebar);
    overflow-y: auto;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    -webkit-overflow-scrolling: touch;
    /* Scrollbar hiding */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar for Chrome/Safari/Opera */
.search-sidebar.mobile-sidebar.left-sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
    background: transparent;
}

.search-sidebar.mobile-sidebar.left-sidebar.active {
    left: 0;
    display: block;
}

/* Sidebar header */
.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--header-bg) 0%, var(--header-hover) 100%);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 15;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2px;
}

.mobile-sidebar-header .sidebar-title {
    color: var(--white);
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.close-mobile-sidebar {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.close-mobile-sidebar:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Sidebar content wrapper with proper padding */
.sidebar-widget {
    padding: 8px 16px 20px 16px;
}

/* Filter groups with proper spacing */
.filter-group {
    margin-bottom: 22px;
    padding: 0 4px 12px 4px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 10px;
}

.filter-group-title {
    font-size: 15px;
    color: var(--primary-color);
    margin: 12px 0 14px 0;
    font-weight: 700;
    letter-spacing: 0.2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 4px;
    position: relative;
}

.filter-group-title::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--header-bg);
    border-radius: 3px;
}

/* Checkbox container - scrollable but no visible scrollbar */
.filter-checkboxes {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 8px;
    margin-left: 4px;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.filter-checkboxes::-webkit-scrollbar {
    display: none;
    width: 0;
    background: transparent;
}

/* Individual checkbox items with left gap */
.checkbox-label {
    display: flex;
    align-items: center;
    padding: 10px 8px 10px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #444;
    transition: all 0.15s ease;
    border-radius: 8px;
    margin-bottom: 2px;
    background: transparent;
    position: relative;
    left: 0;
}

.checkbox-label:hover {
    background: #f8f9fa;
    padding-left: 16px;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

/* Custom checkbox with left margin */
.checkmark {
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #d0d0d0;
    border-radius: 5px;
    display: inline-block;
    margin-right: 14px;
    position: relative;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: var(--header-bg);
    border-color: var(--header-bg);
    transform: scale(1.05);
}

.checkbox-label input:checked ~ .checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Count badge styling */
.checkbox-label .count {
    margin-left: auto;
    color: #888;
    font-size: 12px;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 20px;
    transition: all 0.15s ease;
}

.checkbox-label:hover .count {
    background: #e0e0e0;
    color: var(--header-bg);
}

/* ==========================================
   PRICE SLIDER - FULLY DRAGGABLE & TOUCH OPTIMIZED
   Works on mobile and small screens
   ========================================== */

/* Price slider container with left gap */
.price-slider-container {
    padding: 15px 12px 25px 12px;
    margin-left: 4px;
    position: relative;
    z-index: 10;
    /* Remove this: touch-action: pan-y; */
    touch-action: pan-y pinch-zoom; /* Allow vertical scrolling but prevent horizontal page scroll while dragging */
}

/* jQuery UI Slider overrides for mobile */
#mobile-price-range-slider {
    margin: 25px 0 20px 0;
    height: 8px;
    background: #e8e8e8;
    border: none;
    border-radius: 10px;
    position: relative;
    /* CRITICAL: Prevent page scroll while dragging slider */
    touch-action: none; 
    -webkit-tap-highlight-color: transparent;
}

#mobile-price-range-slider .ui-slider-range {
    background: linear-gradient(90deg, var(--header-bg) 0%, var(--secondary-color) 100%);
    border-radius: 10px;
    height: 8px;
    position: absolute;
    z-index: 1;
}

/* Draggable handles - fully functional on mobile */
#mobile-price-range-slider .ui-slider-handle {
    width: 28px;
    height: 28px;
    background: white;
    border: 3px solid var(--header-bg);
    border-radius: 50%;
    top: -10px;
    margin-left: -14px; /* Center the handle */
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    outline: none;
    position: absolute;
    z-index: 2;
    /* CRITICAL: Prevent page scroll while dragging on mobile */
    touch-action: none; 
    -webkit-tap-highlight-color: transparent;
}

#mobile-price-range-slider .ui-slider-handle:active {
    cursor: grabbing;
    transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    border-color: var(--secondary-color);
}

#mobile-price-range-slider .ui-slider-handle:focus {
    outline: none;
}

/* Handle hover effect for devices that support hover */
@media (hover: hover) {
    #mobile-price-range-slider .ui-slider-handle:hover {
        transform: scale(1.15);
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
        border-color: var(--secondary-color);
    }
}

/* Price labels with left alignment and touch-friendly sizing */
.price-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 15px;
    padding: 0 4px;
    gap: 10px;
}

.price-min-label, .price-max-label {
    background: #f5f5f5;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 14px;
    color: #333;
    border: 1px solid #eaeaea;
    flex: 0 1 auto;
    min-width: 90px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    user-select: none; /* Prevent text selection while dragging */
}

/* Hidden inputs to store values */
#mobile-price-min-hidden,
#mobile-price-max-hidden {
    display: none;
}

/* Mobile filter actions - sticky at bottom */
.mobile-filter-actions {
    padding: 18px 20px 22px 20px;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 12px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.03);
    margin-top: 10px;
    z-index: 20;
}

.mobile-filter-actions .apply-filter-btn,
.mobile-filter-actions .clear-filters-btn {
    flex: 1;
    padding: 14px 10px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 40px;
    transition: all 0.2s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-filter-actions .apply-filter-btn {
    background: linear-gradient(135deg, var(--header-bg) 0%, var(--header-hover) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.25);
}

.mobile-filter-actions .apply-filter-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.mobile-filter-actions .clear-filters-btn {
    background: white;
    color: #555;
    border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.mobile-filter-actions .clear-filters-btn:active {
    background: #f8f8f8;
    transform: scale(0.98);
}

/* Filter toggle button styling */
.mobile-filter-toggle {
    display: none;
    background: linear-gradient(135deg, var(--header-bg) 0%, var(--header-hover) 100%);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 40px;
    cursor: pointer;
    margin-right: 12px;
    position: relative;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    order: -1;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-filter-toggle:active {
    transform: scale(0.95);
}

.mobile-filter-toggle i {
    font-size: 18px;
}

.filter-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--secondary-color);
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Sort by wrapper - proper alignment */
.sort-by-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-by-wrapper label {
    font-weight: 600;
    font-size: 14px;
    color: #555;
    white-space: nowrap;
}

#sort-by {
    padding: 8px 28px 8px 14px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 14px;
    background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 14px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font-weight: 500;
    min-width: 150px;
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
   Only affects mobile and small screens
   ========================================== */

/* Tablet and Mobile (max-width: 991px) */
@media (max-width: 991px) {
    .search-sidebar.desktop-sidebar {
        display: none !important;
    }
    
    .mobile-filter-toggle {
        display: flex !important;
    }
    
    .sort-by-wrapper {
        width: auto;
        justify-content: flex-end;
    }
    
    .search-top-bar {
        flex-wrap: wrap;
        align-items: center;
        padding: 12px 0;
        gap: 12px;
    }
    
    .results-count {
        width: 100%;
        margin-bottom: 0;
        order: 1;
        font-size: 15px;
        padding: 0 4px;
    }
    
    .sort-by-wrapper {
        order: 2;
        margin-left: auto;
    }
}

/* Medium Mobile (max-width: 576px) */
@media (max-width: 576px) {
    .search-sidebar.mobile-sidebar.left-sidebar {
        width: 290px;
        left: -290px;
    }
    
    .mobile-filter-toggle {
        width: 40px;
        height: 40px;
        margin-right: 8px;
    }
    
    .mobile-filter-toggle i {
        font-size: 16px;
    }
    
    .mobile-sidebar-header {
        padding: 15px 16px;
    }
    
    .mobile-sidebar-header .sidebar-title {
        font-size: 17px;
    }
    
    .close-mobile-sidebar {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .sidebar-widget {
        padding: 4px 12px 16px 12px;
    }
    
    .filter-group {
        margin-bottom: 18px;
        padding-bottom: 10px;
    }
    
    .filter-group-title {
        font-size: 14px;
        margin: 10px 0 12px 0;
        padding-left: 8px;
    }
    
    .filter-group-title::before {
        height: 16px;
        left: 0;
    }
    
    .filter-checkboxes {
        max-height: 200px;
        padding-right: 6px;
    }
    
    .checkbox-label {
        padding: 8px 6px 8px 12px;
        font-size: 13px;
    }
    
    .checkmark {
        height: 18px;
        width: 18px;
        margin-right: 12px;
    }
    
    .checkbox-label .count {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    /* Price slider adjustments for mobile */
    .price-slider-container {
        padding: 12px 8px 20px 8px;
    }
    
    #mobile-price-range-slider {
        margin: 20px 0 15px 0;
        height: 8px;
    }
    
    #mobile-price-range-slider .ui-slider-range {
        height: 8px;
    }
    
    #mobile-price-range-slider .ui-slider-handle {
        width: 32px; /* LARGER for easier touch */
        height: 32px;
        top: -12px; /* Recenter vertically */
        margin-left: -16px;
        border-width: 3px;
    }
    
    .price-slider-labels {
        margin-top: 18px;
        font-size: 14px;
        gap: 8px;
    }
    
    .price-min-label, .price-max-label {
        padding: 7px 14px;
        font-size: 13px;
        min-width: 85px;
    }
    
    .mobile-filter-actions {
        padding: 15px 16px 18px 16px;
        gap: 10px;
    }
    
    .mobile-filter-actions .apply-filter-btn,
    .mobile-filter-actions .clear-filters-btn {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    .sort-by-wrapper label {
        font-size: 13px;
    }
    
    #sort-by {
        padding: 6px 25px 6px 12px;
        font-size: 13px;
        min-width: 130px;
        background-position: right 8px center;
    }
}

/* Small Mobile (max-width: 375px) */
@media (max-width: 375px) {
    .search-sidebar.mobile-sidebar.left-sidebar {
        width: 270px;
        left: -270px;
    }
    
    .mobile-filter-toggle {
        width: 36px;
        height: 36px;
        margin-right: 6px;
    }
    
    .filter-count {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
        top: -5px;
        right: -5px;
    }
    
    .mobile-sidebar-header {
        padding: 12px 14px;
    }
    
    .mobile-sidebar-header .sidebar-title {
        font-size: 16px;
    }
    
    .sidebar-widget {
        padding: 0 10px 12px 10px;
    }
    
    .filter-group-title {
        font-size: 13.5px;
        margin: 8px 0 10px 0;
    }
    
    .checkbox-label {
        padding: 7px 4px 7px 10px;
        font-size: 12.5px;
    }
    
    .checkmark {
        height: 17px;
        width: 17px;
        margin-right: 10px;
    }
    
    .checkbox-label .count {
        font-size: 10.5px;
        padding: 2px 5px;
    }
    
    .filter-checkboxes {
        max-height: 180px;
    }
    
    /* Price slider for small mobile */
    .price-slider-container {
        padding: 10px 6px 18px 6px;
    }
    
    #mobile-price-range-slider {
        margin: 18px 0 12px 0;
        height: 7px;
    }
    
    #mobile-price-range-slider .ui-slider-handle {
        width: 34px; /* Extra Large for very small screens */
        height: 34px;
        top: -13.5px;
        margin-left: -17px;
        border-width: 2.5px;
    }
    
    .price-slider-labels {
        margin-top: 16px;
        font-size: 13px;
        gap: 6px;
    }
    
    .price-min-label, .price-max-label {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 75px;
    }
    
    .mobile-filter-actions {
        padding: 12px 14px 15px 14px;
    }
    
    .mobile-filter-actions .apply-filter-btn,
    .mobile-filter-actions .clear-filters-btn {
        padding: 10px 6px;
        font-size: 13px;
    }
    
    .sort-by-wrapper {
        gap: 6px;
    }
    
    .sort-by-wrapper label {
        font-size: 12px;
    }
    
    #sort-by {
        padding: 5px 22px 5px 10px;
        font-size: 12px;
        min-width: 115px;
    }
}

/* Very Small Mobile (max-width: 320px) */
@media (max-width: 320px) {
    .search-sidebar.mobile-sidebar.left-sidebar {
        width: 250px;
        left: -250px;
    }
    
    .mobile-filter-toggle {
        width: 34px;
        height: 34px;
    }
    
    .mobile-filter-toggle i {
        font-size: 14px;
    }
    
    .mobile-sidebar-header {
        padding: 10px 12px;
    }
    
    .sidebar-widget {
        padding: 0 8px 10px 8px;
    }
    
    .filter-group-title {
        font-size: 13px;
    }
    
    .checkbox-label {
        padding: 6px 2px 6px 8px;
        font-size: 12px;
    }
    
    .checkmark {
        height: 16px;
        width: 16px;
        margin-right: 8px;
    }
    
    .filter-checkboxes {
        max-height: 160px;
    }
    
    /* Price slider for very small mobile */
    .price-slider-container {
        padding: 8px 5px 15px 5px;
    }
    
    #mobile-price-range-slider {
        margin: 15px 0 10px 0;
        height: 6px;
    }
    
    #mobile-price-range-slider .ui-slider-handle {
        width: 36px;
        height: 36px;
        top: -15px;
        margin-left: -18px;
        border-width: 2px;
    }
    
    .price-slider-labels {
        margin-top: 14px;
        font-size: 12px;
        gap: 5px;
    }
    
    .price-min-label, .price-max-label {
        padding: 5px 10px;
        font-size: 11px;
        min-width: 65px;
    }
    
    .mobile-filter-actions {
        padding: 10px 12px 12px 12px;
        gap: 8px;
    }
    
    .mobile-filter-actions .apply-filter-btn,
    .mobile-filter-actions .clear-filters-btn {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .sort-by-wrapper label {
        display: none;
    }
    
    #sort-by {
        min-width: 100px;
        padding: 5px 20px 5px 8px;
        font-size: 11px;
    }
}

/* Fix for notch/curved screens */
@supports (padding: max(0px)) {
    .search-sidebar.mobile-sidebar.left-sidebar {
        padding-left: env(safe-area-inset-left, 0px);
    }
    
    .mobile-sidebar-header {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    .sidebar-widget {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
    
    .mobile-filter-actions {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}

/* Ensure smooth animations */
.search-sidebar.mobile-sidebar.left-sidebar {
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent body scroll when sidebar is open */
body.sidebar-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Touch-friendly tap targets */
.checkbox-label,
.mobile-filter-toggle,
.close-mobile-sidebar,
.mobile-filter-actions button,
#mobile-price-range-slider .ui-slider-handle {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Loading state for filters */
.filter-group.loading {
    opacity: 0.7;
    pointer-events: none;
}

.filter-group.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 2;
}

/* Ensure price range filtering works with touch events */
.ui-slider .ui-slider-handle {
    touch-action: none !important;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: grab;
}

.ui-slider .ui-slider-handle:active {
    cursor: grabbing;
}

/* Prevent page scroll while dragging slider on mobile */
.ui-slider {
    touch-action: none !important; /* Force no touch actions on the slider itself */
    -webkit-tap-highlight-color: transparent;
}

/* ==========================================
   SINGLE PRODUCT PAGE LAYOUT (MODIFIED)
   ========================================== */

.single-product-wrapper {
    margin-top: 30px;
    margin-bottom: 50px;
}

/* Main Grid: Left (Gallery+Details), Right (Sidebar Card) */
.single-product-layout {
    display: grid;
    grid-template-columns: 1fr 300px; /* Main content takes available space, Sidebar fixed 300px */
    gap: 30px;
    align-items: start;
}

/* The Core Product View (Inside Left Column) */
.single-product-core {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Split 50/50 on Desktop */
    gap: 40px;
}

/* Gallery Container */
.single-product-gallery-container {
    width: 100%;
}

/* Left Column: Gallery - MODIFIED: Fixed 400px height, 100% width */
.single-product-gallery {
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.single-product-gallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    transition: transform 0.3s ease;
    transform-origin: center center;
    cursor: zoom-in;
}

/* Thumbnails Wrapper */
.single-product-thumbnails-wrapper {
    margin-top: 15px;
    position: relative;
    width: 100%;
}

.thumbnails-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.thumbnails-track-container {
    flex: 1;
    overflow: hidden;
}

.thumbnails-track {
    display: flex;
    gap: 10px;
    transition: transform 0.3s ease;
}

.thumbnail-item {
    flex: 0 0 calc(20% - 8px);
    min-width: 0;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
    opacity: 0.7;
}

.thumbnail-item.active {
    border-color: var(--header-bg);
    opacity: 1;
}

.thumbnail-item img {
    width: 100%;
    height: 70px;
    object-fit: cover;
}

.thumbnails-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 12px;
    transition: var(--transition);
    flex-shrink: 0;
}

.thumbnails-nav-btn:hover:not(:disabled) {
    background: var(--header-bg);
    color: var(--white);
    border-color: var(--header-bg);
}

.thumbnails-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.thumbnails-nav-btn.hidden {
    display: none;
}

/* Right Column: Details */
.single-product-details {
    padding: 10px;
}

.single-product-details nav.woocommerce-breadcrumb {
    font-size: 13px;
    color: #777;
    margin-bottom: 15px;
}

.single-product-details nav.woocommerce-breadcrumb a {
    color: var(--header-bg);
    text-decoration: none;
}

.single-product-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.single-product-price {
    font-size: 24px;
    color: var(--header-bg);
    font-weight: 700;
    margin-bottom: 20px;
}

.single-product-short-desc {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

/*===========================================
    PAYMENT CARD
    =========================================*/
    .image-container img {
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    -o-border-radius: 5px;
    border-radius: 5px;
    -moz-transition: all 0.3s ease;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}
.image-container img:hover {
    filter: brightness(0) saturate(100%) invert(14%) sepia(97%) saturate(7480%) hue-rotate(358deg) brightness(95%) contrast(116%);
    transform: translateY(-3px);
}

/* ==========================================
   SINGLE PRODUCT META STYLING & STOCK COLORS
   ========================================== */

/* Container */
.single-product-meta {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    
    background: var(--light-gray);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

/* Individual Rows */
.single-product-meta p {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

/* Spacing between Label (Bold) and Value */
.single-product-meta p > strong {
    margin-right: 6px;
    color: var(--text-color);
    font-weight: 700;
}

/* ==========================================
   VARIABLE PRODUCT STYLES
   ========================================== */
.single-product-variations {
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.variation-row {
    margin-bottom: 15px;
}

.variation-row:last-child {
    margin-bottom: 0;
}

.variation-row label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.variation-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.variation-select:hover {
    border-color: var(--header-bg);
}

.variation-select:focus {
    outline: none;
    border-color: var(--header-bg);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1);
}

/* Price display for variable products */
.single-product-variation-price {
    margin: 20px 0 15px;
    padding: 15px 0;
    border-top: 1px dashed #ddd;
    border-bottom: 1px dashed #ddd;
}

.single-product-variation-price .price {
    font-size: 24px;
    font-weight: 700;
    color: var(--header-bg);
}

.single-product-variation-price .price del {
    font-size: 16px;
    color: #999;
    margin-right: 10px;
    text-decoration: line-through;
}

.single-product-variation-price .price ins {
    text-decoration: none;
    background: none;
}

/* Disabled add to cart button */
#single-product-action-area .add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

#single-product-action-area .add-to-cart-btn:disabled:hover {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

/* Price range styling */
.single-product-price .price {
    font-size: 24px;
    font-weight: 700;
    color: var(--header-bg);
}

.single-product-price .price del {
    font-size: 16px;
    color: #999;
    margin-right: 10px;
}

/* Disabled button styling */
.single-product-actions .add-to-cart-btn.large:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.single-product-actions .add-to-cart-btn.large:disabled:hover {
    background: #ccc;
    transform: none;
    box-shadow: none;
}

/* ==========================================
   STOCK STATUS COLORS
   ========================================== */

/* IN STOCK - Green */
.single-product-meta .stock.in-stock {
    color: #27ae60; /* Green */
    font-weight: 700; /* Make it bold to stand out */
}

/* OUT OF STOCK - Red */
.single-product-meta .stock.out-of-stock {
    color: #e74c3c; /* Red */
    font-weight: 700; /* Make it bold to stand out */
}

/* Responsive adjustment for very small screens */
@media (max-width: 480px) {
    .single-product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .single-product-meta p {
        width: 100%;
    }
}

/* Add to Cart Area */
.single-product-actions {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
}

.single-quantity-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.single-quantity-wrapper label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
}

.single-quantity {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    background: white;
    height: 46px;
}

.single-quantity .qty-btn {
    width: 40px;
    height: 100%;
    border: none;
    background: var(--light-gray);
    color: var(--text-color);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
}

.single-quantity .qty-btn:hover {
    background: #e0e0e0;
}

.single-quantity input {
    width: 50px;
    height: 100%;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    outline: none;
}

/* Add to Cart Button */
.single-product-actions .add-to-cart-btn.large {
    flex: 1;
    height: 46px;
    background: var(--header-bg);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.single-product-actions .add-to-cart-btn.large:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ==========================================
   PRODUCT TABS SECTION
   ========================================== */
.product-tabs-section {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #777;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--header-bg);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--header-bg);
}

.tab-pane {
    display: none;
    padding: 20px 0;
}

.tab-pane.active {
    display: block;
}

.product-full-description {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}

/* Reviews Styling */
.review-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.reviewer-avatar img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.reviewer-info {
    flex: 1;
}

.reviewer-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.review-rating i {
    color: #ddd;
    margin-right: 2px;
    font-size: 14px;
}

.review-rating i.active {
    color: #f39c12;
}

.review-date {
    color: #999;
    font-size: 13px;
}

.review-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.no-reviews {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* ==========================================
   INLINE REVIEWS SLIDER (Single Product)
   ========================================== */

.reviews-summary-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid var(--header-bg);
}

.average-rating-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avg-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--header-bg);
}

.avg-stars {
    color: #f39c12;
    font-size: 18px;
}

.total-count {
    color: #666;
    font-size: 14px;
}

.write-review-btn-small {
    background: var(--header-bg);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.write-review-btn-small:hover {
    background: var(--secondary-color);
}

/* Review Card Styling */
.review-card-inline {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    gap: 15px;
    height: 100%; /* Ensure equal height */
}

.reviewer-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.review-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.review-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-top-row h4 {
    margin: 0;
    font-size: 16px;
    color: var(--primary-color);
}

.verified-badge {
    color: var(--success-green);
    font-size: 12px;
}

.review-rating-inline i {
    color: #ddd;
    font-size: 14px;
}

.review-rating-inline i.active {
    color: #f39c12;
}

.review-body-text {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    font-style: italic;
}

.review-date {
    margin-top: auto;
    font-size: 12px;
    color: #999;
}

.no-reviews-inline {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Responsive Adjustments for Inline Reviews */
@media (max-width: 768px) {
    .reviews-summary-inline {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .review-card-inline {
        flex-direction: column;
    }
    
    .reviewer-avatar img {
        margin: 0 auto;
    }
    
    .review-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* ==========================================
   RIGHT SIDEBAR CARD
   ========================================== */
.single-product-sidebar {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 120px; /* Sticky position */
}

.sidebar-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

.sidebar-info-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.sidebar-info-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eee;
}

.sidebar-info-list li strong {
    color: var(--text-color);
}

.sidebar-delivery-time {
    background: #e8f5e9;
    color: var(--success-green);
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ==========================================
   THEME VERIFIED BADGE - MAIN STYLES
   ========================================== */

/* Base verified badge styles */
.theme-verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Equal spacing between icon and text */
    
    /* Theme Colors */
    background-color: rgba(39, 174, 96, 0.12);
    color: var(--success-green, #27ae60);
    border: 1px solid rgba(39, 174, 96, 0.25);
    
    /* Sizing & Spacing - INCREASED */
    padding: 6px 12px; /* Increased padding for larger appearance */
    border-radius: 20px; /* More rounded, modern look */
    
    /* Typography - BOLD & LARGER */
    font-size: 13px; /* Increased from 11px */
    font-weight: 800; /* Extra bold */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    
    /* Visuals */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: default;
    white-space: nowrap;
}

/* Icon Styling - MATCHING SIZE */
.theme-verified-badge i {
    font-size: 14px; /* Increased to match text size */
    transition: transform 0.2s ease;
}

/* PERFECT HOVER EFFECT */
.theme-verified-badge:hover {
    background-color: var(--success-green, #27ae60);
    color: #ffffff;
    border-color: var(--success-green, #27ae60);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.3);
    transform: translateY(-2px);
}

/* Icon hover effect */
.theme-verified-badge:hover i {
    transform: scale(1.15);
}

/* ==========================================
   VERIFIED BADGE INSIDE COMMENT CARDS
   ========================================== */

/* Badge inside comment cards - CONSISTENT STYLING */
.comment-card .theme-verified-badge {
    /* Clean white background for cards */
    background-color: #ffffff;
    color: var(--success-green, #27ae60);
    border: 1px solid #e0e0e0;
    
    /* SAME SIZE AS BASE - CONSISTENT */
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    gap: 6px;
    
    /* Visuals */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    margin: 0; /* Remove any default margins */
}

/* Icon inside card badges */
.comment-card .theme-verified-badge i {
    font-size: 14px;
}

/* Hover State for badge inside cards - SAME EFFECT */
.comment-card .theme-verified-badge:hover {
    background-color: var(--success-green, #27ae60);
    color: #ffffff;
    border-color: var(--success-green, #27ae60);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.3);
    transform: translateY(-2px);
}

.comment-card .theme-verified-badge:hover i {
    transform: scale(1.15);
}

/* ==========================================
   META WRAPPER FOR PROPER ALIGNMENT
   ========================================== */

.meta-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px; /* Equal spacing between badge and product name */
    margin: 6px 0 4px 0; /* Equal vertical margins */
}

/* Product name styling - ADJUSTED FOR BALANCE */
.meta-wrapper .product-name {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    line-height: 1.4;
}

/* ==========================================
   COMMENT CARD HEADER ADJUSTMENTS
   ========================================== */

.comment-card .comment-header {
    margin-bottom: 10px;
}

.comment-card .commenter-info h4 {
    margin: 0 0 2px 0;
    font-size: 16px;
    font-weight: 600;
}

/* ==========================================
   ALTERNATIVE STANDALONE VERIFIED BADGE
   (if used elsewhere in the theme)
   ========================================== */

.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    
    /* Theme Colors */
    background-color: rgba(39, 174, 96, 0.12);
    color: var(--success-green, #27ae60);
    border: 1px solid rgba(39, 174, 96, 0.25);
    
    /* Sizing & Spacing - MATCHING */
    padding: 6px 12px;
    border-radius: 20px;
    
    /* Typography - MATCHING */
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    
    /* Visuals */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.verified-badge i {
    font-size: 14px;
}

.verified-badge:hover {
    background-color: var(--success-green, #27ae60);
    color: #ffffff;
    border-color: var(--success-green, #27ae60);
    box-shadow: 0 6px 12px rgba(39, 174, 96, 0.3);
    transform: translateY(-2px);
}

.verified-badge:hover i {
    transform: scale(1.15);
}

/* ==========================================
   REVIEW TOP ROW ADJUSTMENTS
   Ensures the Name and Badge align perfectly
   ========================================== */

.review-card-inline .review-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Vertically center the content */
    margin-bottom: 8px;
}

.review-card-inline .review-top-row h4 {
    margin: 0;
    font-size: 15px;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.2;
    /* Ensure long names don't push badge to next line */
    max-width: 65%; 
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================
   BUYER COMMENTS SCROLLABLE TEXT (200 CHARS)
   ========================================== */

/* Container for the text to enable scrolling */
.comment-text-scroll {
    max-height: 80px; /* Limits height to approx 3-4 lines, preserving card size */
    overflow-y: auto;  /* Enables vertical scrolling */
    margin-bottom: 10px;
    position: relative;
    padding-right: 5px;
}

/* Custom scrollbar styling - Webkit (Chrome, Safari, Edge) */
.comment-text-scroll::-webkit-scrollbar {
    width: 4px;
}

.comment-text-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.comment-text-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.comment-text-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--header-bg);
}

/* Text styling inside the scrollable area */
.comment-text-scroll .comment-text {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin: 0;
    font-style: italic;
    text-align: justify;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .review-card-inline .review-top-row {
        align-items: flex-start; /* Stack if screen is very narrow */
        gap: 5px;
    }
    
    .review-card-inline .review-top-row h4 {
        max-width: 100%; /* Allow full width on mobile vertical stack */
        white-space: normal;
    }
    
    .review-card-inline .theme-verified-badge {
        margin-left: 0; /* Remove margin on mobile stack */
    }
}

/* ==========================================
   SIMILAR & RELATED PRODUCTS SECTIONS
   ========================================== */
.similar-related-sections {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.similar-products-section,
.related-products-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-left: 5px solid var(--header-bg);
    padding-left: 15px;
    font-weight: 700;
}

.product-slider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

/* ==========================================
   RESPONSIVE BREAKPOINTS (MOBILE/TABLET)
   ========================================== */

/* Tablet Portrait & Mobile (Stops Split, Stacks Vertically) */
@media (max-width: 991px) {
    .single-product-layout {
        grid-template-columns: 1fr; /* Main and Sidebar stack */
        gap: 30px;
    }

    .single-product-core {
        grid-template-columns: 1fr; /* Image and Details stack */
        gap: 25px;
    }

    /* Swap order: Image on top, Details below */
    .single-product-gallery-container {
        order: 1;
    }

    .single-product-details {
        order: 2;
        padding: 0;
    }

    /* Sidebar moves to bottom */
    .single-product-sidebar {
        order: 3;
        position: static;
    }
    
    /* Tabs after details but before sidebar */
    .product-tabs-section {
        order: 4;
    }
    
    /* Similar products after tabs */
    .similar-products-section {
        order: 5;
    }
    
    /* Related products last */
    .related-products-section {
        order: 6;
    }

    .single-product-title {
        font-size: 24px;
    }

    .single-product-price {
        font-size: 22px;
    }

    .single-product-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .single-quantity {
        height: 50px;
    }

    .single-product-actions .add-to-cart-btn.large {
        height: 50px;
        font-size: 18px;
    }
    
    /* Thumbnails adjustments */
    .thumbnail-item {
        flex: 0 0 calc(25% - 7.5px);
    }
    
    .thumbnail-item img {
        height: 60px;
    }
    
    /* Tabs responsive */
    .tab-btn {
        padding: 10px 16px;
        font-size: 15px;
    }
    
    .review-header {
        gap: 10px;
    }
    
    .reviewer-avatar img {
        width: 40px;
        height: 40px;
    }
    
    .reviewer-info h4 {
        font-size: 15px;
    }
}

/* Mobile Landscape Optimization */
@media (max-width: 896px) and (orientation: landscape) {
    .single-product-layout {
        grid-template-columns: 1fr 1fr; /* Force side-by-side in landscape */
        gap: 30px;
        align-items: start;
    }
    
    .single-product-core {
        grid-template-columns: 1fr; /* Stack image/details within left column */
    }

    .single-product-gallery {
        height: 350px; /* Slightly smaller for landscape */
    }
    
    .single-product-gallery img {
        max-height: 350px;
        width: auto;
        margin: 0 auto;
        object-fit: contain;
    }

    .single-product-details {
        max-height: 60vh;
        overflow-y: auto; /* Allow scrolling details if they are long */
    }

    /* Sidebar fits in right column */
    .single-product-sidebar {
        height: 100%;
        max-height: 60vh;
        overflow-y: auto;
        position: sticky;
        top: 100px;
    }

    .single-product-title {
        font-size: 20px; /* Slightly smaller to fit height */
    }
    
    .thumbnail-item {
        flex: 0 0 calc(33.333% - 6.67px);
    }
    
    .thumbnail-item img {
        height: 50px;
    }
    
    /* Tabs in landscape */
    .tabs-header {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 auto;
        text-align: center;
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Small Mobile (Portrait) */
@media (max-width: 576px) {
    .single-product-wrapper {
        margin-top: 15px;
    }
    
    .single-product-gallery {
        height: 300px; /* Smaller height for mobile */
    }
    
    .single-product-title {
        font-size: 20px;
    }
    
    .single-product-price {
        font-size: 20px;
    }

    .single-product-thumbnails {
        justify-content: flex-start;
    }
    
    .product-slider-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .thumbnail-item {
        flex: 0 0 calc(33.333% - 6.67px);
    }
    
    .thumbnail-item img {
        height: 50px;
    }
    
    /* Tabs mobile styling */
    .tabs-header {
        flex-direction: column;
        border-bottom: none;
        gap: 5px;
    }
    
    .tab-btn {
        width: 100%;
        text-align: left;
        border: 1px solid #eee;
        border-radius: 4px;
        margin-bottom: 5px;
    }
    
    .tab-btn.active::after {
        display: none;
    }
    
    .tab-btn.active {
        background: var(--header-bg);
        color: white;
        border-color: var(--header-bg);
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .review-date {
        margin-left: 0;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    .single-product-gallery {
        height: 250px;
    }
    
    .thumbnail-item {
        flex: 0 0 calc(50% - 5px);
    }
    
    .thumbnail-item img {
        height: 45px;
    }
}

/*========Min/Max-Quantity===========*/
/* ==========================================
   MIN/MAX QUANTITY BADGE STYLES
   ========================================== */
.product-minmax-info {
    font-size: 12px;
    color: #666;
    margin: 5px 0 8px 0;
    display: flex;
    gap: 10px;
    flex-wrap: nowrap; /* Changed from wrap to nowrap */
    overflow: visible; /* Remove any overflow handling */
    animation: fadeIn 0.3s ease;
}

.min-qty-badge,
.max-qty-badge {
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
    flex-shrink: 0; /* Prevent badges from shrinking */
    white-space: nowrap; /* Keep text in one line */
}

.min-qty-badge i {
    color: #27ae60;
    font-size: 10px;
    flex-shrink: 0;
}

.max-qty-badge i {
    color: #e74c3c;
    font-size: 10px;
    flex-shrink: 0;
}

/* Container for product info to handle overflow */
.product-info {
    overflow: visible; /* Allow content to be visible */
}

/* Product card adjustments */
.product-card {
    min-width: 0; /* Allow flex items to shrink below content size */
    overflow: visible; /* Ensure nothing gets hidden */
}

.min-qty-badge:hover {
    background: #27ae60;
    color: white;
    border-color: #27ae60;
}

.min-qty-badge:hover i {
    color: white;
}

.max-qty-badge:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.max-qty-badge:hover i {
    color: white;
}

/* Product card responsive adjustments */
@media (max-width: 576px) {
    .product-minmax-info {
        font-size: 11px;
        gap: 5px;
    }
    
    .min-qty-badge,
    .max-qty-badge {
        padding: 2px 6px;
    }
}

/* Animation for badges */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   ECOMZCARE ACCOUNT DROPDOWN - PRESERVES EXISTING DESIGN
   ========================================== */

/* Desktop Account Wrapper */
.ecomzcare-account-wrapper {
    position: relative;
    display: inline-block;
}

/* Account Trigger - Uses your existing .signin-link styles */
.ecomzcare-account-wrapper .ecomzcare-account-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    position: relative;
    z-index: 1002;
}

.ecomzcare-account-wrapper .ecomzcare-account-trigger .dropdown-caret {
    margin-left: 2px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.ecomzcare-account-wrapper:hover .dropdown-caret i {
    transform: rotate(180deg);
}

/* Create an invisible bridge between trigger and dropdown */
.ecomzcare-account-wrapper::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    height: 15px;
    background: transparent;
    z-index: 1001;
}

/* Dropdown Menu - Initially HIDDEN, only shows on hover */
.ecomzcare-account-wrapper .ecomzcare-account-dropdown-menu {
    position: absolute;
    top: calc(100% + 15px); /* Align with bridge height */
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: 
        opacity 0.3s ease 0.1s,
        visibility 0.3s ease 0.1s,
        transform 0.3s ease 0.1s;
    z-index: 1000;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    border: 1px solid #e5e5e5;
    pointer-events: none;
}

/* Show dropdown when hovering over wrapper OR the bridge OR the dropdown itself */
.ecomzcare-account-wrapper:hover .ecomzcare-account-dropdown-menu,
.ecomzcare-account-wrapper .ecomzcare-account-dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition: 
        opacity 0.3s ease 0s,
        visibility 0.3s ease 0s,
        transform 0.3s ease 0s;
}

/* Add a small delay before hiding to allow moving mouse to dropdown */
.ecomzcare-account-wrapper:not(:hover) .ecomzcare-account-dropdown-menu {
    transition: 
        opacity 0.2s ease 0.2s,
        visibility 0.2s ease 0.2s,
        transform 0.2s ease 0.2s;
}

/* Keep menu visible when hovering over the invisible bridge */
.ecomzcare-account-wrapper:hover::after ~ .ecomzcare-account-dropdown-menu,
.ecomzcare-account-wrapper .ecomzcare-account-dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Dropdown Items - Uses your theme's menu item styles */
.ecomzcare-account-wrapper .ecomzcare-account-dropdown-menu .menu-item {
    margin: 0;
    padding: 0;
}

.ecomzcare-account-wrapper .ecomzcare-account-dropdown-menu .menu-item a {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    z-index: 1002;
}

.ecomzcare-account-wrapper .ecomzcare-account-dropdown-menu .menu-item a:hover {
    background: #f5f5f5;
    color: var(--header-bg);
    padding-left: 25px;
}

.ecomzcare-account-wrapper .ecomzcare-account-dropdown-menu .menu-item:last-child a {
    color: #e74c3c;
}

/* Touch device support - active class toggled by JavaScript */
@media (hover: none) and (pointer: coarse) {
    .ecomzcare-account-wrapper::after {
        display: none; /* Remove bridge for touch devices */
    }
    
    .ecomzcare-account-wrapper .ecomzcare-account-dropdown-menu {
        display: none;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
        top: 100%;
        transition: none;
    }
    
    .ecomzcare-account-wrapper.active .ecomzcare-account-dropdown-menu {
        display: block;
    }
    
    .ecomzcare-account-wrapper .dropdown-caret i {
        transition: transform 0.3s ease;
    }
    
    .ecomzcare-account-wrapper.active .dropdown-caret i {
        transform: rotate(180deg);
    }
}

/* ==========================================
   MOBILE ACCOUNT DROPDOWN - LIKE DOTS MENU (IMPROVED POSITIONING)
   ========================================== */

@media (max-width: 991px) {
    .desktop-account-wrapper {
        display: none !important;
    }
    
    #mobile-account-trigger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: auto;
        height: auto;
        text-decoration: none;
        color: inherit;
        position: relative;
        z-index: 1002;
    }
    
    #mobile-account-trigger i.fas.fa-user-circle {
        font-size: 20px;
        color: var(--white);
    }
    
    #mobile-account-trigger img.mobile-account-icon-avatar {
        width: 20px !important;
        height: 20px !important;
        border-radius: 50%;
        object-fit: cover;
    }
    
    /* Mobile Account Dropdown - IMPROVED POSITIONING */
    .mobile-account-dropdown {
        position: fixed; /* Changed from absolute to fixed */
        top: auto;
        right: 10px;
        width: 280px;
        max-width: calc(100% - 20px);
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        z-index: 10001;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        margin-top: 0; /* Reset margin */
        border: 1px solid #eee;
        overflow: hidden;
        /* Ensure it stays fixed relative to viewport */
        will-change: transform, opacity;
    }
    
    .mobile-account-dropdown.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        /* Position will be set by JavaScript dynamically */
    }
    
    /* Mobile Account Dropdown Header */
    .mobile-account-dropdown-header {
        padding: 15px;
        background: var(--header-bg);
        color: #fff;
    }
    
    .mobile-account-dropdown-header .user-info {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .mobile-account-dropdown-header .user-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        overflow: hidden;
    }
    
    .mobile-account-dropdown-header .user-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .mobile-account-dropdown-header .user-avatar i {
        font-size: 40px;
        color: #fff;
    }
    
    .mobile-account-dropdown-header .user-details {
        flex: 1;
    }
    
    .mobile-account-dropdown-header .user-name {
        font-size: 16px;
        font-weight: 600;
        color: #fff;
        margin-bottom: 4px;
    }
    
    .mobile-account-dropdown-header .user-email {
        font-size: 12px;
        color: rgba(255,255,255,0.8);
        word-break: break-all;
    }
    
    /* Mobile Account Dropdown Menu */
    .mobile-account-dropdown-menu {
        list-style: none;
        padding: 10px 0;
        margin: 0;
        max-height: 350px;
        overflow-y: auto;
    }
    
    .mobile-account-dropdown-menu .menu-item {
        margin: 0;
        padding: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .mobile-account-dropdown-menu .menu-item:last-child {
        border-bottom: none;
    }
    
    .mobile-account-dropdown-menu .menu-item a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 15px;
        color: #333;
        font-size: 14px;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .mobile-account-dropdown-menu .menu-item a i {
        width: 20px;
        color: var(--header-bg);
        font-size: 16px;
    }
    
    .mobile-account-dropdown-menu .menu-item a:hover,
    .mobile-account-dropdown-menu .menu-item a:active {
        background: #f9f9f9;
        padding-left: 20px;
    }
    
    .mobile-account-dropdown-menu .menu-item:last-child a {
        color: #e74c3c;
    }
    
    .mobile-account-dropdown-menu .menu-item:last-child a i {
        color: #e74c3c;
    }
    
    /* Guest user specific */
    .mobile-account-dropdown-menu.guest-menu .menu-item a {
        justify-content: center;
        text-align: center;
        font-weight: 500;
    }
    
    .mobile-account-dropdown-menu.guest-menu .menu-item:first-child a {
        background: var(--header-bg);
        color: #fff;
        margin: 10px 15px;
        padding: 12px;
        border-radius: 8px;
    }
    
    .mobile-account-dropdown-menu.guest-menu .menu-item:first-child a i {
        color: #fff;
    }
    
    .mobile-account-dropdown-menu.guest-menu .menu-item:last-child a {
        color: #666;
        justify-content: center;
        font-size: 13px;
    }
    
    .mobile-account-dropdown-menu.guest-menu .menu-item:last-child a i {
        color: #666;
    }
}

@media (min-width: 992px) {
    .desktop-account-wrapper {
        display: block !important;
    }
    
    #mobile-account-trigger {
        display: none !important;
    }
    
    .mobile-account-dropdown {
        display: none !important;
    }
}

/* Remove old mobile account panel styles */
.mobile-account-panel,
.mobile-account-panel-header,
.close-account-panel,
.mobile-account-panel-content {
    display: none !important;
}

/* ==========================================
   EYE-CATCHING MY ACCOUNT PAGE STYLES
   ========================================== */

/* Custom Tooltip for Notifications */
.custom-tooltip {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--header-bg);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    z-index: 99999;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
    animation: slideInRight 0.3s ease, pulse 2s infinite;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-tooltip.success {
    background: #27ae60;
    box-shadow: 0 10px 30px rgba(39, 174, 96, 0.3);
}

.custom-tooltip.error {
    background: #e74c3c;
    box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
}

.custom-tooltip.warning {
    background: #f39c12;
    box-shadow: 0 10px 30px rgba(243, 156, 18, 0.3);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
    }
    50% {
        box-shadow: 0 15px 40px rgba(231, 76, 60, 0.5);
    }
    100% {
        box-shadow: 0 10px 30px rgba(231, 76, 60, 0.3);
    }
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Enhanced Hover Effects */
.stat-card, .dashboard-card, .order-item, .rec-product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient Text Animation */
.gradient-text {
    background: linear-gradient(135deg, var(--header-bg) 0%, #c0392b 50%, #e67e22 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 3s linear infinite;
}

@keyframes gradientShift {
    to { background-position: 200% center; }
}

/* Floating Animation for Icons */
.floating-icon {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

/* Shimmer Effect for Cards */
.shimmer-effect {
    position: relative;
    overflow: hidden;
}

.shimmer-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: rotate(30deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    from { transform: translateX(-100%) rotate(30deg); }
    to { transform: translateX(100%) rotate(30deg); }
}

/* Order Status Badge Enhancements */
.order-status {
    position: relative;
    overflow: hidden;
}

.order-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: currentColor;
    opacity: 0.3;
}

/* Progress Bar for Order Completion */
.order-progress {
    height: 4px;
    background: #f0f0f0;
    border-radius: 2px;
    margin-top: 10px;
    overflow: hidden;
}

.order-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--header-bg) 0%, #c0392b 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Reward Points Card Enhancement */
.points-display {
    position: relative;
}

.points-value {
    background: linear-gradient(135deg, var(--header-bg) 0%, #c0392b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { text-shadow: 0 0 10px rgba(231, 76, 60, 0.5); }
    50% { text-shadow: 0 0 20px rgba(231, 76, 60, 0.8); }
    100% { text-shadow: 0 0 10px rgba(231, 76, 60, 0.5); }
}

/* Interactive Elements */
.interactive-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.interactive-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.interactive-card:active {
    transform: scale(0.98);
}

/* Mobile Menu Enhancement */
@media (max-width: 768px) {
    .account-header-section {
        background: linear-gradient(135deg, var(--header-bg) 0%, #c0392b 100%);
        padding: 30px 20px;
    }
    
    .quick-action-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .card-header {
        padding: 15px 20px;
    }
    
    .card-header h2 {
        font-size: 16px;
    }
    
    .order-item {
        padding: 15px;
    }
}

/* Account Avatar Styles - Exact size of fas fa-user-circle */
.ecomzcare-account-wrapper .account-avatar {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}

/* Target the fas fa-user-circle icon for exact size reference */
.ecomzcare-account-wrapper .signin-link i.fas.fa-user-circle {
    font-size: 20px;
    width: 20px;
    height: 20px;
    display: inline-block;
    line-height: 1;
}

/* Hover effect for desktop avatar */
.ecomzcare-account-wrapper:hover .account-avatar {
    border-color: var(--secondary-color);
    transform: scale(1.05);
}

/* Mobile avatar - exact size of mobile fas fa-user-circle */
.mobile-account-icon-avatar {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.3);
    display: inline-block;
    vertical-align: middle;
}

/* Mobile fas fa-user-circle exact size reference */
#mobile-account-trigger i.fas.fa-user-circle {
    font-size: 18px;
    width: 18px;
    height: 18px;
    display: inline-block;
    line-height: 1;
}

/* Ensure proper alignment */
.ecomzcare-account-wrapper .signin-link,
#mobile-account-trigger {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ecomzcare-account-wrapper .signin-link img.account-avatar,
#mobile-account-trigger img.mobile-account-icon-avatar {
    margin: 0;
    padding: 0;
}

/* Mobile account panel avatar - different size, keep as is */
.mobile-account-avatar img.avatar,
.mobile-account-avatar img {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--header-bg);
}

/* Ensure WordPress generated avatars match exact size */
.ecomzcare-account-wrapper .signin-link .avatar {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

#mobile-account-trigger .avatar {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

/* Override any WordPress default avatar sizes */
.ecomzcare-account-wrapper .signin-link .avatar.avatar-20,
.ecomzcare-account-wrapper .signin-link .avatar.avatar-24,
.ecomzcare-account-wrapper .signin-link .avatar.avatar-32,
.ecomzcare-account-wrapper .signin-link .avatar.avatar-96 {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
}

#mobile-account-trigger .avatar.avatar-18,
#mobile-account-trigger .avatar.avatar-24,
#mobile-account-trigger .avatar.avatar-32,
#mobile-account-trigger .avatar.avatar-96 {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
}

/* Remove the old media query that was changing sizes */
@media (max-width: 991px) {
    /* Keep sizes consistent across all devices */
    .ecomzcare-account-wrapper .account-avatar {
        width: 20px !important;
        height: 20px !important;
    }
    
    .mobile-account-icon-avatar {
        width: 18px !important;
        height: 18px !important;
    }
}

/* ==========================================
   ADDITIONAL STYLES FOR MOBILE ACCOUNT PANEL
   ========================================== */

/* Ensure mobile account panel appears above all other elements */
.mobile-account-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: #fff;
    z-index: 10001;
    transition: right 0.3s ease;
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
    overflow-y: auto;
}

.mobile-account-panel.active {
    right: 0;
}

/* Smooth scrolling inside panel */
.mobile-account-panel-content {
    height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 20px;
}

/* Mobile account panel header styling */
.mobile-account-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--header-bg);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-account-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

/* Close button styling */
.close-account-panel {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-account-panel:hover {
    background: rgba(255,255,255,0.2);
}

.close-account-panel:active {
    transform: scale(0.95);
}

/* Mobile account header within panel */
.mobile-account-header {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Mobile account avatar styling */
.mobile-account-avatar img,
.mobile-account-avatar i {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.mobile-account-avatar i {
    font-size: 50px;
    color: var(--header-bg);
}

/* Mobile account info */
.mobile-account-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-account-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.mobile-account-email {
    font-size: 12px;
    color: #666;
    word-break: break-all;
}

/* Mobile dropdown menu items */
.mobile-account-panel .ecomzcare-account-dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-account-panel .ecomzcare-account-dropdown-menu .menu-item {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #eee;
}

.mobile-account-panel .ecomzcare-account-dropdown-menu .menu-item:last-child {
    border-bottom: none;
}

.mobile-account-panel .ecomzcare-account-dropdown-menu .menu-item a {
    display: block;
    padding: 15px;
    color: #333;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mobile-account-panel .ecomzcare-account-dropdown-menu .menu-item a:active {
    background: #f5f5f5;
    padding-left: 20px;
}

.mobile-account-panel .ecomzcare-account-dropdown-menu .menu-item:last-child a {
    color: #e74c3c;
}

/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
    .mobile-account-panel .ecomzcare-account-dropdown-menu .menu-item a {
        padding: 18px 15px; /* Larger touch target */
    }
    
    .close-account-panel {
        width: 44px;
        height: 44px;
    }
}

/* Ensure overlay works with mobile panel */
.overlay.active ~ .mobile-account-panel {
    pointer-events: auto;
}

/* Animation for panel opening */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

.mobile-account-panel {
    animation: slideOutRight 0.3s ease forwards;
}

.mobile-account-panel.active {
    animation: slideInRight 0.3s ease forwards;
}

/* ==========================================
   ENSURE MOBILE ACCOUNT TRIGGER IS VISIBLE ON MOBILE
   ========================================== */
@media (max-width: 991px) {
    #mobile-account-trigger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: auto;
        height: auto;
        text-decoration: none;
        color: inherit;
    }
    
    #mobile-account-trigger i.fas.fa-user-circle {
        font-size: 20px;
        color: var(--white);
    }
    
    #mobile-account-trigger img.mobile-account-icon-avatar {
        width: 20px !important;
        height: 20px !important;
        border-radius: 50%;
        object-fit: cover;
    }
}

/* Desktop account wrapper visibility */
@media (min-width: 992px) {
    .desktop-account-wrapper {
        display: block !important;
    }
    
    #mobile-account-trigger {
        display: none !important;
    }
}

/* ==========================================
   ENSURE AVATARS ARE ALWAYS CIRCULAR
   ========================================== */
.account-avatar,
.mobile-account-icon-avatar,
.ecomzcare-account-wrapper .signin-link .avatar,
#mobile-account-trigger .avatar,
.mobile-account-avatar img,
.mobile-account-avatar .avatar,
.mobile-account-avatar i.fa-user-circle {
    border-radius: 50% !important;
    overflow: hidden;
}

/* Fix for any inherited border-radius issues */
img.avatar,
img.account-avatar,
img.mobile-account-icon-avatar {
    border-radius: 50% !important;
    object-fit: cover;
}

/* Delivery Progress Bar Styles */
    .delivery-progress-section {
        padding: 15px;
        background: #f8f9fa;
        border-bottom: 1px solid #e9ecef;
        margin-bottom: 0;
    }
    
    .progress-message {
        font-size: 13px;
        color: #495057;
        margin-bottom: 8px;
        font-weight: 500;
        text-align: center;
    }
    
    .progress-bar-container {
        background-color: #e9ecef;
        border-radius: 10px;
        overflow: hidden;
        height: 8px;
        margin: 10px 0;
    }
    
    .progress-bar-fill {
        background: linear-gradient(90deg, #28a745, #20c997);
        width: 0%;
        height: 100%;
        transition: width 0.3s ease;
        border-radius: 10px;
    }
    
    .cart-sidebar-header h3 {
        font-size: 18px;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    .cart-item-count-display {
        font-weight: bold;
        color: var(--header-text);
    }
    
    @media (max-width: 576px) {
        .delivery-progress-section {
            padding: 12px;
        }
        
        .progress-message {
            font-size: 12px;
        }
    }