/* Products Page Specific Styles */

/* Hero Section */
.products-hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-container {
    position: relative;
    width: 100%;
    z-index: 2;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.9;
}

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
}

.min-vh-60 {
    min-height: 60vh;
}

.hero-text {
    color: white;
    z-index: 3;
    position: relative;
}

.hero-subtitle {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    position: relative;
}

.hero-subtitle::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #fbbf24;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hero-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.hero-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* Hero Images */
.hero-images {
    position: relative;
    height: 500px;
}

.hero-image-grid {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-image-item {
    position: absolute;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.hero-image-item:hover {
    transform: scale(1.05);
}

.main-image {
    width: 60%;
    height: 70%;
    top: 0;
    left: 0;
    z-index: 3;
}

.secondary-image {
    width: 45%;
    height: 50%;
    bottom: 0;
    right: 0;
    z-index: 2;
}

.accent-image {
    width: 35%;
    height: 40%;
    top: 20%;
    right: 10%;
    z-index: 1;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-image-item:hover .hero-img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.hero-image-item:hover .image-overlay {
    transform: translateY(0);
}

.overlay-text {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-badge {
    position: absolute;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

.sale-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    top: 10%;
    right: -10%;
    animation-delay: 0s;
}

.new-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    bottom: 30%;
    left: -15%;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Dot Flow Animation */
.dot-flow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.dot-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.dot {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    animation: dotFlow 15s linear infinite;
}

.dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    animation: pulse 2s ease-in-out infinite alternate;
}

/* Individual dot sizes and positions */
.dot-1 {
    width: 8px;
    height: 8px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.dot-2 {
    width: 12px;
    height: 12px;
    top: 20%;
    left: 15%;
    animation-delay: -2s;
    animation-duration: 18s;
}

.dot-3 {
    width: 6px;
    height: 6px;
    top: 30%;
    left: 8%;
    animation-delay: -4s;
    animation-duration: 14s;
}

.dot-4 {
    width: 10px;
    height: 10px;
    top: 15%;
    left: 25%;
    animation-delay: -1s;
    animation-duration: 16s;
}

.dot-5 {
    width: 14px;
    height: 14px;
    top: 40%;
    left: 12%;
    animation-delay: -6s;
    animation-duration: 20s;
}

.dot-6 {
    width: 8px;
    height: 8px;
    top: 50%;
    left: 3%;
    animation-delay: -3s;
    animation-duration: 13s;
}

.dot-7 {
    width: 16px;
    height: 16px;
    top: 60%;
    left: 18%;
    animation-delay: -8s;
    animation-duration: 22s;
}

.dot-8 {
    width: 6px;
    height: 6px;
    top: 70%;
    left: 7%;
    animation-delay: -5s;
    animation-duration: 15s;
}

.dot-9 {
    width: 12px;
    height: 12px;
    top: 80%;
    left: 20%;
    animation-delay: -7s;
    animation-duration: 17s;
}

.dot-10 {
    width: 10px;
    height: 10px;
    top: 25%;
    left: 35%;
    animation-delay: -9s;
    animation-duration: 19s;
}

.dot-11 {
    width: 8px;
    height: 8px;
    top: 45%;
    left: 30%;
    animation-delay: -2.5s;
    animation-duration: 14s;
}

.dot-12 {
    width: 14px;
    height: 14px;
    top: 65%;
    left: 40%;
    animation-delay: -4.5s;
    animation-duration: 21s;
}

.dot-13 {
    width: 6px;
    height: 6px;
    top: 85%;
    left: 32%;
    animation-delay: -6.5s;
    animation-duration: 16s;
}

.dot-14 {
    width: 12px;
    height: 12px;
    top: 35%;
    left: 45%;
    animation-delay: -1.5s;
    animation-duration: 18s;
}

.dot-15 {
    width: 10px;
    height: 10px;
    top: 55%;
    left: 50%;
    animation-delay: -3.5s;
    animation-duration: 15s;
}

.dot-16 {
    width: 8px;
    height: 8px;
    top: 75%;
    left: 48%;
    animation-delay: -5.5s;
    animation-duration: 17s;
}

.dot-17 {
    width: 16px;
    height: 16px;
    top: 20%;
    left: 60%;
    animation-delay: -7.5s;
    animation-duration: 23s;
}

.dot-18 {
    width: 6px;
    height: 6px;
    top: 40%;
    left: 65%;
    animation-delay: -9.5s;
    animation-duration: 14s;
}

.dot-19 {
    width: 12px;
    height: 12px;
    top: 60%;
    left: 70%;
    animation-delay: -11s;
    animation-duration: 20s;
}

.dot-20 {
    width: 10px;
    height: 10px;
    top: 80%;
    left: 75%;
    animation-delay: -13s;
    animation-duration: 16s;
}

@keyframes dotFlow {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.4;
    }
}

/* Enhanced dot effects for different screen sizes */
@media (max-width: 768px) {
    .dot {
        animation-duration: 10s;
    }
    
    .dot-1, .dot-3, .dot-6, .dot-8, .dot-11, .dot-13, .dot-16, .dot-18 {
        width: 6px;
        height: 6px;
    }
    
    .dot-2, .dot-4, .dot-9, .dot-10, .dot-12, .dot-14, .dot-15, .dot-19, .dot-20 {
        width: 8px;
        height: 8px;
    }
    
    .dot-5, .dot-7, .dot-17 {
        width: 10px;
        height: 10px;
    }
}

/* Featured Categories */
.featured-categories {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 0;
}

.category-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    color: inherit;
}

.category-image {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 1rem;
    aspect-ratio: 1;
}

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

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

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-overlay {
    opacity: 1;
}

.category-count {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.category-info {
    text-align: center;
}

.category-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

/* Products Header */
.products-header {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

/* Filter Sidebar */
.filter-sidebar {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
    position: relative;
    padding-bottom: 0.5rem;
}

.filter-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-image: linear-gradient(to right, #3b82f6, #0d9488);
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-item {
    margin-bottom: 0.5rem;
}

.filter-link {
    color: #4b5563;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    display: block;
    padding: 0.25rem 0;
}

.filter-link:hover,
.filter-link.active {
    color: #2563eb;
}

.custom-range {
    height: 0.5rem;
    border-radius: 1rem;
}

.custom-range::-webkit-slider-thumb {
    background: #2563eb;
}

.price-range-labels {
    font-size: 0.875rem;
    color: #6b7280;
}

.rating-stars {
    color: #f59e0b;
    display: inline-block;
}

.rating-up {
    font-size: 0.875rem;
    color: #6b7280;
    margin-left: 0.25rem;
}

/* Products Toolbar */
.products-toolbar {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.view-btn.active {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Product Cards */
.product-card {
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image-container {
    position: relative;
    overflow: hidden;
    padding-top: 125%; /* 4:5 aspect ratio */
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

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

.product-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
    z-index: 1;
}

.product-badge.bestseller {
    background-color: #ef4444;
    color: white;
}

.product-badge.sale {
    background-color: #10b981;
    color: white;
}

.product-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s, transform 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: #4b5563;
    transition: background 0.3s, color 0.3s, transform 0.3s;
}

.product-action-btn:hover {
    background: #2563eb;
    color: white;
    transform: scale(1.1);
}

.product-info {
    padding: 1.25rem;
}

.product-category {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-rating {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.rating-stars {
    color: #f59e0b;
    font-size: 0.875rem;
}

.rating-count {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

.product-price-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.product-original-price {
    font-size: 0.875rem;
    color: #6b7280;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.product-buttons {
    display: flex;
    gap: 0.5rem;
}

.add-to-cart-btn {
    flex: 1;
}

.buy-now-btn {
    width: auto;
}

/* Small Product Cards (for Recently Viewed) */
.product-card.small .product-image-container {
    padding-top: 100%; /* 1:1 aspect ratio */
}

.product-card.small .product-title {
    font-size: 0.875rem;
}

.product-card.small .product-price {
    font-size: 1rem;
}

.product-card.small .rating-stars {
    font-size: 0.75rem;
}

/* Recently Viewed Section */
.recently-viewed-section {
    background-color: #f9fafb;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
}

.view-all-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s;
}

.view-all-link:hover {
    color: #1d4ed8;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 3rem;
}

.pagination .page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 0.25rem;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}

.pagination .page-link:hover {
    background-color: #f3f4f6;
    color: #2563eb;
    border-color: #e5e7eb;
}

.pagination .page-item.active .page-link {
    background-color: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* Mobile Filter Toggle */
.filter-toggle {
    display: flex;
    align-items: center;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        z-index: 1050;
        overflow-y: auto;
        transition: left 0.3s;
    }
    
    .filter-sidebar.active {
        left: 0;
    }
    
    .filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: none;
    }
    
    .filter-overlay.active {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .product-buttons {
        flex-direction: column;
    }
    
    .products-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .view-options {
        margin-top: 1rem;
        align-self: flex-end;
    }
}

/* List View */
.products-grid.list-view .col-sm-6 {
    width: 100%;
}

.products-grid.list-view .product-card {
    display: flex;
    flex-direction: row;
}

.products-grid.list-view .product-image-container {
    width: 200px;
    padding-top: 0;
    height: auto;
}

.products-grid.list-view .product-info {
    flex: 1;
}

@media (max-width: 767.98px) {
    .products-grid.list-view .product-card {
        flex-direction: column;
    }
    
    .products-grid.list-view .product-image-container {
        width: 100%;
        padding-top: 125%;
    }
}

/* Hero Section Responsive */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-images {
        height: 400px;
        margin-top: 2rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .products-hero {
        min-height: 70vh;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
        max-width: none;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .hero-images {
        height: 300px;
        margin-top: 1.5rem;
    }
    
    .main-image {
        width: 70%;
        height: 60%;
    }
    
    .secondary-image {
        width: 50%;
        height: 45%;
    }
    
    .accent-image {
        width: 40%;
        height: 35%;
    }
    
    .floating-badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .featured-categories .col-6 {
        margin-bottom: 1rem;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .stat-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .hero-images {
        height: 250px;
    }
}