/* 
 * Home Products CSS
 * Styling cho product cards trên trang chủ
 */

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #333;
    margin-bottom: 4rem;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(-20px);
    animation: heroFadeInDown 0.8s ease forwards;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* Search Section */
.search-section {
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    animation: titleFadeInUp 0.8s ease forwards;
    animation-delay: 0.1s;
}

.search-container {
    max-width: 700px;
    margin: 0 auto;
}

.search-input-group {
    display: flex;
    align-items: center;
    position: relative;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    overflow: visible;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.search-input-group:focus-within {
    border-color: #007bff;
    box-shadow: 0 4px 20px rgba(0,123,255,0.2);
}

.search-input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: none;
    font-size: 1rem;
    background: transparent;
    outline: none;
    color: #333;
}

.search-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.search-btn {
    padding:  1.2rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 0 23px 23px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.search-btn:hover {
    background: #0056b3;
    transform: scale(1.05);
}

.search-btn i {
    font-size: 1rem;
}

.clear-search-btn {
    padding: 0.8rem;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    border-left: 1px solid #dee2e6;
}

.clear-search-btn:hover {
    background: #545b62;
    transform: scale(1.05);
}

.clear-search-btn i {
    font-size: 0.9rem;
}

.search-info {
    margin-top: 1rem;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

.search-info strong {
    color: #333;
}

.search-count {
    margin-left: 0.5rem;
    color: #007bff;
    font-weight: 500;
}

/* Search Suggestions Dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    z-index: 1000;
    margin-top: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    backdrop-filter: blur(10px);
}

.search-suggestions.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.suggestions-list {
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: #f8f9fa;
    border-left: 3px solid #007bff;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-icon {
    color: #6c757d;
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.suggestion-item.type-product .suggestion-icon {
    color: #007bff;
}

.suggestion-item.type-description .suggestion-icon {
    color: #28a745;
}

.suggestion-text {
    flex: 1;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
}

.suggestion-text .highlight {
    background: #fff3cd;
    color: #856404;
    font-weight: 600;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

.suggestions-footer {
    padding: 0.6rem 1.2rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    text-align: center;
}

.suggestions-footer small {
    color: #6c757d;
    font-size: 0.75rem;
}

.suggestions-footer i {
    margin-right: 0.3rem;
    color: #ffc107;
}

/* Loading state */
.suggestions-loading {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.85rem;
}

.suggestions-loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* No suggestions */
.suggestions-empty {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Mobile Suggestions Responsive */
@media (max-width: 768px) {
    .search-suggestions {
        border-radius: 10px;
        margin-top: 3px;
    }
    
    .suggestion-item {
        padding: 0.7rem 1rem;
        gap: 0.6rem;
    }
    
    .suggestion-text {
        font-size: 0.85rem;
    }
    
    .suggestions-footer {
        padding: 0.5rem 1rem;
    }
    
    .suggestions-footer small {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .search-suggestions {
        border-radius: 8px;
    }
    
    .suggestion-item {
        padding: 0.6rem 0.8rem;
        gap: 0.5rem;
    }
    
    .suggestion-text {
        font-size: 0.8rem;
    }
    
    .suggestion-icon {
        font-size: 0.8rem;
        width: 14px;
    }
}

/* Dynamic styles for when clear button is present */
.search-input-group:has(.clear-search-btn) .search-btn {
    border-radius: 0 23px 23px 0;
}

.search-input-group:not(:has(.clear-search-btn)) .search-btn {
    border-radius: 0 23px 23px 0;
}

/* Mobile Search Responsive */
@media (max-width: 768px) {
    .search-container {
        max-width: none;
        padding: 0 1rem;
    }
    
    .search-input {
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
    }
    
    .search-btn, .clear-search-btn {
        padding:  1rem;
        min-width: 45px;
    }
    
    .search-btn {
        border-radius: 0 18px 18px 0;
    }
    
    .search-btn i {
        font-size: 0.9rem;
    }
    
    .search-info {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .search-section {
        margin-bottom: 1.5rem;
    }
    
    .search-container {
        padding: 0 0.5rem;
    }
    
    .search-input {
        font-size: 0.85rem;
        padding: 0.6rem 0.8rem;
    }
    
    .search-btn, .clear-search-btn {
        padding:  0.8rem;
        min-width: 40px;
    }
    
    .search-btn {
        border-radius: 0 15px 15px 0;
    }
    
    .search-btn i, .clear-search-btn i {
        font-size: 0.8rem;
    }
}

/* Products Section */
.products-section {
    padding: 3rem 0;
}

/* Product Filters */
.product-filters {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transform: translateY(20px);
    animation: titleFadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

/* Mobile Filter Toggle */
.filter-toggle-mobile {
    display: none;
    margin-bottom: 1rem;
}

.filter-toggle-btn {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-toggle-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.filter-toggle-btn .toggle-icon {
    transition: transform 0.3s ease;
}

.filter-toggle-btn.active .toggle-icon {
    transform: rotate(180deg);
}

.filters-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: nowrap;
    transition: all 0.3s ease;
    overflow: hidden;
}

.filters-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.filters-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.filter-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-group select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 12px;
    background-color: white;
    font-size: 0.9rem;
    color: #495057;
    min-width: 140px;
    transition: all 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.filter-btn:active {
    transform: translateY(0);
}

#apply-filters {
    background-color: #007bff;
    color: white;
}

#apply-filters:hover {
    background-color: #0056b3;
}

.filter-btn-reset {
    background-color: #6c757d;
    color: white;
}

.filter-btn-reset:hover {
    background-color: #545b62;
}

.filter-btn i {
    font-size: 0.8rem;
}

/* Filter button as link */
a.filter-btn {
    text-decoration: none;
    background-color: #007bff;
    color: white;
    display: inline-flex;
}

a.filter-btn:hover {
    background-color: #0056b3;
    color: white;
    text-decoration: none;
}

/* Mobile Responsive cho Filters */
@media (max-width: 768px) {
    .filter-toggle-mobile {
        display: block;
    }
    
    .filters-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
    
    .filters-content.show {
        max-height: 500px;
        opacity: 1;
        transform: translateY(0);
        padding-top: 1rem;
    }
    
    .filters-left {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .filters-right {
        justify-content: center;
        gap: 1rem;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem;
    }
    
    .filter-group label {
        font-size: 0.8rem;
        text-align: left;
    }
    
    .filter-group select {
        min-width: auto !important;
        width: 100% !important;
        font-size: 0.85rem !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex: 1 !important;
        box-sizing: border-box !important;
    }
    
    .filter-group select option {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .filter-btn {
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        flex: 1;
    }
}

@media (max-width: 576px) {
    .product-filters {
        margin-bottom: 1.5rem;
        padding: 0.8rem;
    }
    
    .filter-group label {
        font-size: 0.75rem;
    }
    
    .filter-group select {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .filter-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .filter-btn i {
        font-size: 0.7rem;
    }
}

.products-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #333;
    opacity: 0;
    transform: translateY(20px);
    animation: titleFadeInUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 0;
    width: 100%;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .product-card {
        height: 120px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
    
    /* Simple mobile card layout - no hover effects */
    .product-card {
        flex-direction: column !important;
        height: auto !important;
        min-height: 240px !important; /* Reduced from 280px */
        width: 100% !important;
        max-width: none !important;
        margin: 0 auto !important;
        cursor: pointer !important;
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 16px !important;
    }
    
    /* Remove hover effects on mobile */
    .product-card:hover {
        transform: none !important;
        box-shadow: 
            0 1px 3px rgba(0, 0, 0, 0.1),
            0 4px 20px rgba(0, 0, 0, 0.05),
            0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    }
    
    .product-card:hover .product-image img {
        transform: none !important;
    }
}

/* Product Card */
.product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    animation: cardFadeInUp 0.6s ease forwards;
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.1),
        0 4px 20px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: stretch;
    height: 140px;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 16px 48px rgba(0, 0, 0, 0.1),
        0 24px 64px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

/* Product Image */
.product-image {
    position: relative;
    width: 100px;
    min-width: 100px;
    height: 140px; /* Fixed height for desktop */
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 12px 0 0 12px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .product-image {
        width: 90px;
        min-width: 90px;
        height: 120px; /* Fixed height for tablet */
    }
}

@media (max-width: 576px) {
    .product-image {
        width: 100%;
        min-width: unset;
        height: 80px; /* Reduced height for mobile - more rectangular */
        border-radius: 12px 12px 0 0;
    }
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #adb5bd;
    font-size: 2rem;
}

@media (max-width: 576px) {
    .product-image .no-image {
        font-size: 1.2rem;
    }
}

/* Discount Badge - Hidden */
.discount-badge {
    display: none;
}



/* Product Info */
.product-info {
    padding: 0.8rem 0.6rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    position: relative;
}

@media (max-width: 576px) {
    .product-info {
        padding: 0.75rem !important;
        position: relative !important;
        min-height: 120px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        background: white !important;
        border-radius: 0 0 16px 16px !important;
        z-index: 10 !important;
    }
    
    /* Force all text elements to be visible */
    .product-card .product-name,
    .product-card h3,
    .product-card .product-title {
        color: #111827 !important;
        font-size: 0.875rem !important;
        font-weight: 600 !important;
        line-height: 1.4 !important;
        margin: 0 0 0.5rem 0 !important;
        padding: 0 !important;
        text-shadow: none !important;
        background: transparent !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    /* Force all price elements to be visible */
    .product-card .product-price,
    .product-card .price,
    .product-card .price-current,
    .product-card .price-original {
        color: #dc2626 !important;
        font-weight: 700 !important;
        font-size: 1rem !important;
        margin: 0.5rem 0 0 0 !important;
        padding: 0 !important;
        text-shadow: none !important;
        background: transparent !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }
    
    /* Original price styling */
    .product-card .price-original {
        text-decoration: line-through !important;
        color: #6b7280 !important;
        font-size: 0.875rem !important;
        margin-right: 0.5rem !important;
    }
    
    /* Ensure discount badge is visible */
    .product-card .discount-badge,
    .product-card .badge {
        background: #dc2626 !important;
        color: white !important;
        border: 2px solid #dc2626 !important;
        font-weight: 700 !important;
        text-shadow: none !important;
        padding: 0.25rem 0.5rem !important;
        border-radius: 0.5rem !important;
        font-size: 0.75rem !important;
        position: absolute !important;
        top: 0.5rem !important;
        right: 0.5rem !important;
        z-index: 15 !important;
    }
    
    /* No image icon visibility */
    .product-card .product-image .no-image {
        background: #f3f4f6 !important;
        color: #6b7280 !important;
        font-size: 1.5rem !important;
        border: 1px solid #e5e7eb !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Ensure action buttons are visible if present */
    .product-card .btn,
    .product-card button {
        background: #2563eb !important;
        color: white !important;
        border: none !important;
        padding: 0.5rem 1rem !important;
        border-radius: 0.5rem !important;
        font-weight: 600 !important;
        margin-top: 0.5rem !important;
        cursor: pointer !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

.product-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.4rem;
    line-height: 1.3;
    min-height: 2.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 576px) {
    .product-name {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
        min-height: 1.8rem;
        font-weight: 600;
        line-height: 1.3;
    }
}

/* Product Meta Row - Category left, Cart right */
.product-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    width: 100%;
}

.product-category {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.product-cart-info {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    color: #6b7280;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.product-cart-info i {
    font-size: 0.6rem;
    color: #9ca3af;
}

@media (max-width: 576px) {
    .product-meta-row {
        margin-bottom: 0.3rem;
    }
    
    .product-category {
        font-size: 0.55rem;
        padding: 0.1rem 0.3rem;
    }
    
    .product-cart-info {
        font-size: 0.55rem;
    }
    
    .product-cart-info i {
        font-size: 0.5rem;
    }
}

/* Product Pricing */
.product-pricing {
    margin-bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
}

.product-price-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.price-current {
    font-size: 0.9rem;
    font-weight: 700;
    color: #dc3545 !important;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .price-current {
        font-size: 0.8rem;
        font-weight: 700;
    }
    
    .product-pricing {
        margin-top: auto;
    }
    
    .product-price-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
}

.price-current.free {
    color: #28a745;
    font-size: 0.75rem;
    background: #d4edda;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
}

@media (max-width: 576px) {
    .price-current.free {
        font-size: 0.65rem;
        padding: 0.1rem 0.3rem;
        border-radius: 6px;
    }
}

.price-original {
    font-size: 0.7rem;
    color: #9ca3af !important;
    text-decoration: line-through;
    font-weight: 400;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .price-original {
        font-size: 0.6rem;
    }
}

/* Enhanced Price Visibility - Override any conflicting styles */
.product-card .price-current,
.product-card .price,
.product-card .product-price,
.product-card .price-regular {
    color: #dc3545 !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    background: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.product-card .price-original {
    color: #9ca3af !important;
    text-decoration: line-through !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.product-card .price-current.free {
    color: #28a745 !important;
    background: #d4edda !important;
    border: 1px solid #c3e6cb !important;
}

/* Pricing container visibility */
.product-card .product-pricing,
.product-card .product-price-group {
    opacity: 1 !important;
    visibility: visible !important;
    display: flex !important;
}

/* Force high contrast for better visibility */
.product-card .price-current {
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8) !important;
}

/* Debug: Force price visibility with maximum specificity */
.product-card .price-current,
.product-card .price-regular {
    color: #dc3545 !important;
    background-color: transparent !important;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8) !important;
    font-weight: 700 !important;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Alternative color for better contrast if needed */
.product-card .price-current.high-contrast,
.product-card .price-regular.high-contrast {
    color: #000 !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    border: 1px solid #dc3545 !important;
}

/* Specific fix for price-regular when no discount */
span.price-regular,
.price-regular,
.product-card span.price-regular,
.product-card .price-regular {
    color: #dc3545 !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8) !important;
    background: transparent !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
}

/* Add to Cart Button */
.add-to-cart-btn {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
    z-index: 10;
}

.add-to-cart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.add-to-cart-btn:active {
    transform: scale(0.95);
}

@media (max-width: 576px) {
    .add-to-cart-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
        bottom: 0.6rem;
        right: 0.6rem;
    }
}

/* Product Meta - Hidden in new design */
.product-meta {
    display: none;
}

@media (max-width: 576px) {
    .product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.4rem;
        margin-bottom: 0;
        font-size: 0.65rem;
    }
    
    /* Mobile tooltip adjustments */
    .quantity-info::before,
    .delivery-info::before {
        font-size: 0.55rem;
        padding: 0.25rem 0.4rem;
        max-width: 100px;
        margin-top: 3px;
    }
    
    .quantity-info::after,
    .delivery-info::after {
        border-width: 2px;
        margin-top: 1px;
    }
    
    .quantity-info i,
    .delivery-info i {
        font-size: 0.8rem;
    }
}

.quantity-info, .delivery-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #666;
    cursor: help;
    transition: all 0.2s ease;
    position: relative;
}

.quantity-info:hover, .delivery-info:hover {
    color: #333;
    transform: translateY(-1px);
}

.quantity-info.unlimited {
    color: #28a745;
}

.quantity-info.unlimited:hover {
    color: #1e7e34;
}

.quantity-info i {
    color: #007bff;
    font-size: 0.9rem;
}

.delivery-info i {
    color: #ff6b35;
    font-size: 0.9rem;
}

.quantity-info.unlimited i {
    color: #28a745;
}

/* Tooltip styling */
.quantity-info::before,
.delivery-info::before {
    content: attr(title);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 0.3rem 0.5rem;
    border-radius: 3px;
    font-size: 0.6rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 5px;
    max-width: 120px;
    text-align: center;
    word-wrap: break-word;
    white-space: normal;
}

.quantity-info::after,
.delivery-info::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid transparent;
    border-bottom-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 2px;
}

.quantity-info:hover::before,
.quantity-info:hover::after,
.delivery-info:hover::before,
.delivery-info:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Prevent tooltip overflow */
.product-meta {
    overflow: visible;
    position: relative;
}

.product-card {
    overflow: visible;
}

/* Product Card Cursor */
.product-card {
    cursor: pointer;
}

/* Product Modal */
.product-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0);
    backdrop-filter: blur(0px);
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    transition: all 0.3s ease;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.product-modal.show {
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

/* Ensure smooth scrolling on all devices */
.product-modal {
    scroll-behavior: smooth;
}

.modal-content {
    scroll-behavior: smooth;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    max-width: 700px;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    transform: scale(0.7) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-overflow-scrolling: touch;
    position: relative;
    margin-top: 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.product-modal.show .modal-content {
    opacity: 1;
    transform: scale(1) translateY(0);
}



.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    color: #333;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s ease;
    transition-delay: 0.1s;
}

.product-modal.show .modal-header {
    opacity: 1;
    transform: translateY(0);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 2rem;
}

.modal-product-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
    transition-delay: 0.2s;
}

.product-modal.show .modal-product-info {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .product-modal {
        align-items: flex-start;
        padding: 20px 10px;
    }
    
    .modal-content {
        max-width: none;
        width: calc(100% - 20px);
        max-height: calc(100vh - 40px);
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-product-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        align-items: start;
    }
    
    .modal-image-section {
        height: auto;
        width: 100%;
    }
    
    .modal-product-image {
        height: 280px;
        width: 100%;
        flex: none;
    }
}

/* Modal Image Section */
.modal-image-section {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.modal-product-image {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    position: relative;
    flex: 1;
}

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

.modal-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    color: #adb5bd;
    font-size: 4rem;
}

.modal-discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    z-index: 2;
}

.modal-badge-free {
    background: #28a745;
    color: white;
}

.modal-badge-discount {
    background: #dc3545;
    color: white;
}

/* Modal Details Section */
.modal-details-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.modal-details-section p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Modal Pricing */
.modal-pricing {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.modal-price-current {
    font-size: 1.4rem;
    font-weight: 700;
    color: #dc3545;
    display: block;
    margin-bottom: 0.3rem;
}

.modal-price-current.modal-price-free {
    color: #28a745;
    background: #d4edda;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    display: inline-block;
    border: 1px solid #c3e6cb;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.modal-price-original {
    font-size: 1rem;
    color: #adb5bd;
    text-decoration: line-through;
    font-weight: 500;
}

/* Modal Meta */
.modal-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.modal-quantity, .modal-delivery {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-weight: 500;
}

.modal-quantity i, .modal-delivery i {
    color: #007bff;
    font-size: 1.1rem;
}

/* Modal Actions */
.modal-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
}

.modal-btn {
    flex: 1;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.modal-btn-primary {
    background: #007bff;
    color: white;
}

.modal-btn-primary:hover {
    background: #0056b3;
}

.modal-btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #dee2e6;
}

.modal-btn-secondary:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 10px;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-details-section h3 {
        font-size: 1.5rem;
    }
    
    .modal-price-current {
        font-size: 1.5rem;
    }
    
    .modal-meta {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-btn {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .product-modal {
        padding: 10px;
        align-items: flex-start;
    }
    
    .modal-content {
        max-height: calc(100vh - 20px);
        border-radius: 3px;
        width: calc(100% - 20px);
        max-width: none;
        min-height: auto;
    }
    
    .modal-header {
        padding: 0.8rem 1rem;
    }
    
    .modal-header h2 {
        font-size: 1rem;
    }
    
    .modal-close {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-product-image {
        height: 150px;
    }
    
    .modal-details-section h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .modal-details-section p {
        font-size: 0.8rem;
        margin-bottom: 1rem;
        line-height: 1.4;
    }
    
    .modal-pricing {
        padding: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .modal-price-current {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }
    
    .modal-price-current.modal-price-free {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
    }
    
    .modal-price-original {
        font-size: 0.9rem;
    }
    
    .modal-meta {
        padding: 0.8rem;
        margin-bottom: 1.5rem;
    }
    
    .modal-quantity, .modal-delivery {
        font-size: 0.75rem;
    }
    
    .modal-quantity i, .modal-delivery i {
        font-size: 0.9rem;
    }
    
    .modal-actions {
        gap: 0.8rem;
    }
    
    .modal-btn {
        padding: 0.7rem 1rem;
        font-size: 0.8rem;
        gap: 0.4rem;
    }
    
    .modal-discount-badge {
        top: 8px;
        right: 8px;
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
}

/* No Products */
.no-products {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem;
    min-height: 400px;
    opacity: 0;
    transform: translateY(20px);
    animation: titleFadeInUp 0.8s ease forwards;
    animation-delay: 0.5s;
}

.no-products-content {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 3rem 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
}

.no-products-content i {
    font-size: 5rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    display: block;
}

.no-products-content h3 {
    font-size: 1.75rem;
    color: #475569;
    margin-bottom: 1rem;
    font-weight: 600;
}

.no-products-content p {
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.no-products-content .filter-btn {
    margin-top: 1rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .no-products {
        padding: 3rem 1rem;
        min-height: 300px;
    }
    
    .no-products-content {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }
    
    .no-products-content i {
        font-size: 4rem;
    }
    
    .no-products-content h3 {
        font-size: 1.5rem;
    }
    
    .no-products-content p {
        font-size: 1rem;
    }
    
    .no-products-content .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
    
    .hero-section {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .product-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .products-section {
        padding: 1rem 0;
    }
    
    .products-section h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .hero-section {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
}

/* Hero responsive for very small screens */
@media (max-width: 480px) {
    .hero-section {
        padding: 1.5rem 0.8rem !important;
        margin-bottom: 1.5rem;
    }
    
    .hero-section h1 {
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.8rem !important;
    }
    
    .hero-section p {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin-top: 0.5rem !important;
    }
    
    /* Button in hero section */
    .hero-section .btn-3d {
        font-size: 0.8rem !important;
        padding: 0.6rem 1rem !important;
    }
    
    .hero-section .btn-3d i {
        font-size: 0.7rem !important;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .hero-section h1 {
        font-size: 1.2rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-section p {
        font-size: 0.8rem !important;
    }
    
    .hero-section .btn-3d {
        font-size: 0.75rem !important;
        padding: 0.5rem 0.8rem !important;
    }
}

/* Animation for product cards */
@keyframes cardFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Hero animation */
@keyframes heroFadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Title animation */
@keyframes titleFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation delays for sequential appearance */
.product-card:nth-child(1) { animation-delay: 0.5s; }
.product-card:nth-child(2) { animation-delay: 0.6s; }
.product-card:nth-child(3) { animation-delay: 0.7s; }
.product-card:nth-child(4) { animation-delay: 0.8s; }
.product-card:nth-child(5) { animation-delay: 0.9s; }
.product-card:nth-child(6) { animation-delay: 1.0s; }
.product-card:nth-child(7) { animation-delay: 1.1s; }
.product-card:nth-child(8) { animation-delay: 1.2s; }
.product-card:nth-child(9) { animation-delay: 1.3s; }
.product-card:nth-child(10) { animation-delay: 1.4s; }
.product-card:nth-child(11) { animation-delay: 1.5s; }
.product-card:nth-child(12) { animation-delay: 1.6s; }

/* Responsive fix cho modal ảnh sản phẩm trên mobile */
@media (max-width: 576px) {
  .modal-product-image {
    width: 100%;
    max-width: 320px;
    min-height: 160px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
  }
  .modal-product-image img,
  .modal-no-image {
    width: 100%;
    max-width: 320px;
    height: auto;
    min-height: 120px;
    object-fit: contain;
    display: block;
  }
  .modal-no-image {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #adb5bd;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border-radius: 8px;
    min-height: 120px;
    width: 100%;
  }
}

/* Categories Section */
.categories-section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    animation: titleFadeInUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-title i {
    color: #2563eb;
    font-size: 1.5rem;
}

/* Category Breadcrumb */
.category-breadcrumb {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Category Breadcrumb Top (positioned at top left) */
.category-breadcrumb-top {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
    text-align: left;
}

.breadcrumb-link {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #9ca3af;
}

.breadcrumb-current {
    color: #374151;
    font-weight: 500;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
    padding: 0;
}

.category-card {
    position: relative;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 200px;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #2563eb;
}

.category-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #6b7280;
    text-align: center;
}

.category-image .no-image i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #9ca3af;
}

.category-image .no-image span {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 1.5rem 1rem 1rem;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.category-card:hover .category-overlay {
    transform: translateY(0);
    opacity: 1;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white;
}

.category-description {
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.9;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.no-categories {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.no-categories i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

/* Products Section */
.products-section {
    margin-bottom: 3rem;
}

/* Mobile Responsive for Categories */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .category-card {
        height: 150px;
    }
    
    .category-image .no-image i {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .category-image .no-image span {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-card {
        height: 120px;
    }
    
    .category-overlay {
        padding: 1rem 0.75rem 0.75rem;
    }
    
    .category-name {
        font-size: 1.1rem;
    }
    
    .category-description {
        font-size: 0.8rem;
    }
}
/* Fix icon size in 'Về trang chủ' button in no-products */
.no-products-content .filter-btn i {
    font-size: 1.3rem;
    margin-bottom: 0;
}

/* Chỉ icon lớn khi là con trực tiếp (không phải trong button) */
.no-products-content > i {
    font-size: 5rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
    display: block;
}

@media (max-width: 768px) {
    .filter-toggle-mobile .btn-3d,
    .filter-toggle-mobile .filter-toggle-btn {
        width: 100%;
        display: block;
        box-sizing: border-box;
    }
    .filters-content.show .filter-mobile-actions {
        display: flex;
    }
    /* Ẩn nút trong filters-content trên mobile */
    .filters-content .filters-right {
        display: none !important;
    }
}
@media (min-width: 769px) {
    .filter-mobile-actions {
        display: none !important;
    }
}