/* ========================================
   PREMIUM PRODUCTS PAGE STYLES
   ======================================== */

/* Remove default padding/margin and fix header gap */
body:has(.products-hero) {
    padding-top: 0 !important;
    margin: 0 !important;
}

body:has(.products-hero) main {
    padding: 0 !important;
    margin: 0 !important;
}

body:has(.products-hero) main > .container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

/* Products Hero Section */
.products-hero {
    background: var(--gradient-1);
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    padding: 0 0 80px;
    padding-top: 140px !important;
    margin: 0 !important;
}

.products-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 50%, rgba(240, 147, 251, 0.9) 100%);
    z-index: 0;
}

.products-hero .container {
    position: relative;
    z-index: 10;
}

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

/* Hero Particles Animation */
.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Floating Icons */
.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.float-icon {
    position: absolute;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.15);
    animation: float-icon 20s infinite ease-in-out;
}

.float-icon:nth-child(1) {
    animation-delay: 0s;
}

.float-icon:nth-child(2) {
    animation-delay: 2s;
}

.float-icon:nth-child(3) {
    animation-delay: 4s;
}

.float-icon:nth-child(4) {
    animation-delay: 1s;
}

.float-icon:nth-child(5) {
    animation-delay: 3s;
}

@keyframes float-icon {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.15;
    }
    25% {
        transform: translateY(-40px) rotate(10deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-80px) rotate(-10deg);
        opacity: 0.15;
    }
    75% {
        transform: translateY(-40px) rotate(5deg);
        opacity: 0.25;
    }
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

.particle:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    top: 20%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 60px;
    height: 60px;
    left: 80%;
    top: 30%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 100px;
    height: 100px;
    left: 50%;
    top: 60%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 40px;
    height: 40px;
    left: 20%;
    top: 70%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    width: 70px;
    height: 70px;
    left: 70%;
    top: 80%;
    animation-delay: 3s;
}

.particle:nth-child(6) {
    width: 50px;
    height: 50px;
    left: 30%;
    top: 40%;
    animation-delay: 5s;
}

.particle:nth-child(7) {
    width: 90px;
    height: 90px;
    left: 60%;
    top: 15%;
    animation-delay: 2.5s;
}

.particle:nth-child(8) {
    width: 45px;
    height: 45px;
    left: 85%;
    top: 65%;
    animation-delay: 4.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-30px) translateX(20px) rotate(90deg);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-60px) translateX(-20px) rotate(180deg);
        opacity: 0.3;
    }
    75% {
        transform: translateY(-30px) translateX(20px) rotate(270deg);
        opacity: 0.6;
    }
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px 25px;
    border-radius: 50px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: badge-glow 3s infinite;
}

@keyframes badge-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    }
}

.hero-badge i {
    color: #ffd700;
    font-size: 1.2rem;
    animation: bolt-pulse 1.5s infinite;
}

@keyframes bolt-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.hero-badge span {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

/* Hero Stats */
.hero-stats {
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 25px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #ffd700;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: white;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Popular Categories */
.popular-categories {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.categories-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-right: 5px;
}

.category-tag {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

/* Premium Search Bar */
.search-bar-premium {
    max-width: 700px;
    margin: 0 auto;
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 8px 8px 8px 60px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: 25px;
    font-size: 1.2rem;
    color: var(--primary);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    padding: 12px 15px;
    background: transparent;
}

.search-btn {
    padding: 12px 30px;
    background: var(--gradient-1);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}

.search-btn i {
    transition: transform 0.3s ease;
}

.search-btn:hover i {
    transform: translateX(5px);
}

/* Filters Card */
.filters-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
}

.filters-header h5 {
    color: #1a1a1a;
    font-weight: 700;
}

.btn-reset {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    color: var(--primary-dark);
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.filter-group:last-of-type {
    border-bottom: none;
}

.filter-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-option:hover {
    background: rgba(102, 126, 234, 0.05);
}

.filter-option input[type="radio"] {
    margin-right: 10px;
    accent-color: var(--primary);
}

.filter-option span {
    font-size: 0.95rem;
    color: #555;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-input-group {
    flex: 1;
}

.price-input-group label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
    display: block;
}

.price-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.price-input:focus {
    outline: none;
    border-color: var(--primary);
}

.price-divider {
    margin-top: 20px;
    color: #999;
}

.btn-filter-apply {
    width: 100%;
    padding: 12px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-filter-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* Products Toolbar */
.products-toolbar {
    background: white;
    padding: 20px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.toolbar-left h5 {
    color: #1a1a1a;
    font-weight: 700;
}

.sort-select {
    padding: 10px 40px 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* No Products */
.no-products {
    text-align: center;
    padding: 80px 20px;
}

.no-products-icon {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: 20px;
}

.no-products h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.no-products p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Premium Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
}

.pagination-premium {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    color: #555;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.pagination-link.active {
    background: var(--gradient-1);
    border-color: var(--primary);
    color: white;
}

/* ========================================
   ADVANCED PRODUCT CARDS
   ======================================== */

.product-card-premium {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-1);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    border-radius: 20px;
}

.product-card-premium:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.product-card-premium:hover::before {
    opacity: 0.03;
}

/* Product Image Container */
.product-image {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card-premium:hover .product-image img {
    transform: scale(1.15) rotate(2deg);
}

/* Product Badge */
.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gradient-2);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 3;
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Product Actions */
.product-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 3;
}

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

.btn-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    color: #333;
    text-decoration: none;
}

.btn-icon:hover {
    background: var(--gradient-1);
    color: white;
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-icon i {
    font-size: 1.1rem;
}

/* Product Content */
.product-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    min-height: 50px;
}

.product-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a:hover {
    color: var(--primary);
}

/* Product Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.product-rating i {
    color: #ffc107;
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.product-card-premium:hover .product-rating i {
    transform: scale(1.1);
}

.product-rating span {
    color: #999;
    font-size: 0.9rem;
    margin-left: 5px;
}

/* Product Price */
.product-price {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.price-new {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-old {
    font-size: 1.1rem;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
}

/* Add to Cart Button */
.btn-add-cart {
    width: 100%;
    padding: 14px;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-add-cart::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-add-cart:hover::before {
    width: 300px;
    height: 300px;
}

.btn-add-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.5);
    color: white;
}

.btn-add-cart i {
    transition: transform 0.3s ease;
}

.btn-add-cart:hover i {
    transform: scale(1.2) rotate(15deg);
}

/* Wave Effect at Bottom of Hero */
.hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

/* Products Section */
.products-section {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 60px 0;
    min-height: 100vh;
}

/* Button Premium */
.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--gradient-1);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.5);
    color: white;
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-shimmer {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f0f0f0 0%, #e0e0e0 20%, #f0f0f0 40%, #f0f0f0 100%);
    background-size: 1000px 100%;
}

/* Responsive */
@media (max-width: 991px) {
    .filters-card {
        position: static;
        margin-bottom: 30px;
    }
    
    .products-toolbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .toolbar-left,
    .toolbar-right {
        width: 100%;
    }
    
    .sort-select {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .products-hero {
        padding: 80px 0 40px;
    }
    
    .search-input-wrapper {
        padding: 6px 6px 6px 50px;
    }
    
    .search-input {
        font-size: 1rem;
        padding: 10px;
    }
    
    .search-btn {
        width: 40px;
        height: 40px;
    }
    
    .product-title {
        font-size: 1rem;
        min-height: 45px;
    }
    
    .price-new {
        font-size: 1.5rem;
    }
    
    .btn-add-cart {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .product-content {
        padding: 20px;
    }
}
