/* Products Page - Flipkart Style */
.products-page-template {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background-color: #f1f3f6 !important;
    min-height: 100vh !important;
    margin: 0 !important;
}

.products-page-template .container {
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
}

/* Sort and Filter Bar */
.sort-filter-bar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e0e0e0 !important;
    padding: 12px 0 !important;
    position: sticky !important;
    top: 70px !important;
    z-index: 100 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

.sort-filter-bar .container {
    display: flex !important;
    gap: 15px !important;
    padding: 0 15px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.sort-filter-btn {
    flex: 1 !important;
    padding: 10px 15px !important;
    background-color: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #212121 !important;
    transition: all 0.2s ease !important;
}

.sort-filter-btn:hover {
    background-color: #f5f5f5 !important;
    border-color: #2874f0 !important;
}

.sort-filter-btn i {
    font-size: 16px !important;
    color: #2874f0 !important;
}

/* Horizontal Filter Chips */
.filter-chips-container {
    background-color: #ffffff !important;
    padding: 12px 0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.filter-chips-container::-webkit-scrollbar {
    display: none !important;
}

.filter-chips-scroll {
    display: flex !important;
    gap: 10px !important;
    padding: 0 15px !important;
    min-width: max-content !important;
}

.filter-chip {
    padding: 8px 16px !important;
    background-color: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 20px !important;
    text-decoration: none !important;
    color: #212121 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.2s ease !important;
}

.filter-chip i {
    font-size: 12px !important;
    color: #2874f0 !important;
}

.filter-chip:hover {
    background-color: #f0f0f0 !important;
    border-color: #2874f0 !important;
}

.filter-chip.active {
    background-color: #2874f0 !important;
    color: #ffffff !important;
    border-color: #2874f0 !important;
}

.filter-chip.active i {
    color: #ffffff !important;
}

/* Products Grid */
.products-grid-template {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    background-color: #f1f3f6 !important;
}

/* Product Card - Flipkart Style */
.products-grid-template .product-card-template {
    background-color: #ffffff !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    box-shadow: none !important;
    transition: box-shadow 0.2s ease !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 16px !important;
    border-right: 1px solid #e0e0e0 !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

/* Product Card Link - Makes entire card clickable */
.products-grid-template .product-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 1 !important;
}

.products-grid-template .product-card-link:link,
.products-grid-template .product-card-link:visited,
.products-grid-template .product-card-link:hover,
.products-grid-template .product-card-link:active,
.products-grid-template .product-card-link:focus {
    text-decoration: none !important;
    color: inherit !important;
    outline: none !important;
}

/* Remove any link styling from elements inside the card link */
.products-grid-template .product-card-link * {
    text-decoration: none !important;
}

.products-grid-template .product-card-template:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    transform: none !important;
    border-color: #e0e0e0 !important;
    z-index: 1 !important;
}

/* Product Image Wrapper */
.product-card-template .product-image-wrapper {
    position: relative !important;
    width: 100% !important;
    padding-top: 100% !important;
    background-color: #ffffff !important;
    overflow: hidden !important;
    border-bottom: none !important;
    margin: 0 0 12px 0 !important;
    border-radius: 0 !important;
}

.product-card-template .product-image-wrapper img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    transition: transform 0.3s ease !important;
    z-index: 0 !important;
    padding: 10px !important;
    box-sizing: border-box !important;
}

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

/* Wishlist Button */
.product-card-template .wishlist-btn {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 32px !important;
    height: 32px !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 20 !important;
    transition: all 0.2s ease !important;
    color: #666 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    pointer-events: auto !important;
}

.product-card-template .wishlist-btn:hover {
    background-color: #ffffff !important;
    color: #e74c3c !important;
    transform: scale(1.1) !important;
}

.product-card-template .wishlist-btn.active {
    background-color: #e74c3c !important;
    color: #ffffff !important;
    border-color: #e74c3c !important;
}

.product-card-template .wishlist-btn i {
    font-size: 14px !important;
}

/* Sponsored Badge */
.product-card-template .sponsored-badge {
    position: absolute !important;
    bottom: 8px !important;
    left: 8px !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    color: #ffffff !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    z-index: 5 !important;
}

/* Product Card Content */
.product-card-template .product-card-content {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    gap: 8px !important;
    box-sizing: border-box !important;
}

/* Product Name */
.product-card-template .product-name {
    min-height: 40px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-bottom: 4px !important;
    color: #212121 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    font-weight: 400 !important;
    transition: color 0.2s ease !important;
    word-break: break-word !important;
}

.product-card-template .product-card-link:hover .product-name {
    color: #2874f0 !important;
}

/* Product Rating */
.product-card-template .product-rating {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 4px !important;
}

.product-card-template .rating-value {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background-color: #388e3c !important;
    color: #ffffff !important;
    padding: 2px 6px !important;
    border-radius: 3px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.product-card-template .rating-value::after {
    content: '★' !important;
    font-size: 10px !important;
    margin-left: 2px !important;
}

/* Product Pricing */
.product-card-template .product-pricing {
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    margin: 4px 0 !important;
}

.product-card-template .original-price {
    color: #878787 !important;
    font-size: 14px !important;
    text-decoration: line-through !important;
    font-weight: 400 !important;
}

.product-card-template .current-price {
    color: #212121 !important;
    font-size: 18px !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}

.product-card-template .discount-badge {
    background-color: #388e3c !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 2px 6px !important;
    border-radius: 2px !important;
    white-space: nowrap !important;
}

/* Add to Cart Button */
.product-card-template .add-to-cart-btn {
    margin-top: 12px !important;
    padding: 10px 16px !important;
    background-color: #ff9f00 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 2px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-transform: none !important;
    position: relative !important;
    z-index: 20 !important;
    pointer-events: auto !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.product-card-template .add-to-cart-btn:hover {
    background-color: #fb641b !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.product-card-template .add-to-cart-btn:active {
    transform: scale(0.98) !important;
}

.product-card-template .add-to-cart-btn i {
    font-size: 14px !important;
}

.product-card-template .add-to-cart-btn span {
    font-size: 14px !important;
}

/* No Products Message */
.products-grid-template .no-products-message {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    padding: 60px 20px !important;
    background-color: #ffffff !important;
    margin: 20px !important;
    border-radius: 4px !important;
}

.products-grid-template .no-products-message i {
    font-size: 48px !important;
    color: #ccc !important;
    margin-bottom: 20px !important;
}

.products-grid-template .no-products-message h2 {
    margin-bottom: 10px !important;
    color: #212121 !important;
    font-size: 20px !important;
}

.products-grid-template .no-products-message p {
    color: #878787 !important;
    margin-bottom: 20px !important;
}

/* Sort Modal */
.modal-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 1000 !important;
    align-items: flex-end !important;
    animation: fadeIn 0.3s ease !important;
}

.modal-overlay.show {
    display: flex !important;
}

.modal-content {
    background-color: #ffffff !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    animation: slideUp 0.3s ease !important;
}

@keyframes slideUp {
    from {
        transform: translateY(100%) !important;
    }
    to {
        transform: translateY(0) !important;
    }
}

.modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px !important;
    border-bottom: 1px solid #e0e0e0 !important;
}

.modal-header h3 {
    margin: 0 !important;
    font-size: 18px !important;
    color: #212121 !important;
    font-weight: 500 !important;
}

.modal-close {
    background: none !important;
    border: none !important;
    font-size: 28px !important;
    color: #212121 !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: background-color 0.2s ease !important;
}

.modal-close:hover {
    background-color: #f5f5f5 !important;
}

.modal-body {
    padding: 10px 0 !important;
}

.sort-option {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 15px 20px !important;
    text-decoration: none !important;
    color: #212121 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    transition: background-color 0.2s ease !important;
}

.sort-option:last-child {
    border-bottom: none !important;
}

.sort-option:hover {
    background-color: #f5f5f5 !important;
}

.sort-option.active {
    background-color: #e3f2fd !important;
    color: #2874f0 !important;
    font-weight: 500 !important;
}

.sort-option i {
    width: 20px !important;
    text-align: center !important;
    color: #2874f0 !important;
}

/* Responsive Styles */
@media (min-width: 768px) {
    .products-grid-template {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .sort-filter-bar {
        top: 70px !important;
    }
}

@media (min-width: 1024px) {
    .products-grid-template {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .filter-chips-scroll {
        max-width: 1200px !important;
        margin: 0 auto !important;
    }
    
    .sort-filter-bar .container {
        max-width: 1200px !important;
    }
}

@media (min-width: 1440px) {
    .products-grid-template {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* Wishlist Page Styles */
.wishlist-page {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.wishlist-page h2 {
    color: #212121 !important;
    font-size: 24px !important;
    font-weight: 500 !important;
    margin-bottom: 20px !important;
}

.wishlist-count {
    padding: 12px 16px !important;
    background-color: #fff3e0 !important;
    border-left: 4px solid #ff9800 !important;
    border-radius: 4px !important;
    margin-bottom: 20px !important;
    font-size: 14px !important;
}

.wishlist-count i {
    margin-right: 8px !important;
}

.empty-wishlist {
    text-align: center !important;
    padding: 60px 20px !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

.empty-wishlist i {
    font-size: 64px !important;
    color: #ccc !important;
    margin-bottom: 20px !important;
}

.empty-wishlist h3 {
    margin-bottom: 10px !important;
    color: #212121 !important;
    font-size: 20px !important;
}

.empty-wishlist p {
    color: #878787 !important;
    margin-bottom: 30px !important;
    font-size: 14px !important;
}

.empty-wishlist .btn {
    padding: 12px 30px !important;
    font-size: 16px !important;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .product-card-template {
        padding: 12px !important;
    }
    
    .product-card-template .product-name {
        font-size: 13px !important;
    }
    
    .product-card-template .current-price {
        font-size: 16px !important;
    }
    
    .product-card-template .original-price {
        font-size: 12px !important;
    }
    
    .product-card-template .add-to-cart-btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    
    .product-card-template .wishlist-btn {
        width: 28px !important;
        height: 28px !important;
    }
    
    .wishlist-page h2 {
        font-size: 20px !important;
    }
    
    .empty-wishlist {
        padding: 40px 15px !important;
    }
    
    .empty-wishlist i {
        font-size: 48px !important;
    }
    
    .empty-wishlist h3 {
        font-size: 18px !important;
    }
}

