:root {
    --primary-black: #0a0a0a;
    --accent-gold: #b49164;
    --accent-gold-light: #d4af37;
    --text-muted: #666666;
    --bg-light: #fdfbf7;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --premium-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.products-page-v1 {
    background-color: var(--bg-light);
    min-height: 100vh;
    font-family: 'Outfit', sans-serif;
}

/* Hero Section */
.products-hero {
    height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(78, 77, 77, 0.7)), url('/assets/images/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    border-bottom: 1px solid var(--accent-glow);
    overflow: hidden;
}

.products-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.1;
}

.breadcrumbs {
    display: flex;
    gap: 10px;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumbs span.current {
    color: var(--accent);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 800;
    text-transform: uppercase;
    color: white;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Bar - Glassmorphism */
.filter-bar-wrapper {
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.premium-filter-bar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 15px 30px;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.filter-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.custom-sort-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #fdfdfd;
    border-radius: 14px;
    padding: 0 15px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.custom-sort-wrapper:hover {
    border-color: var(--accent-gold);
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.sort-icon {
    width: 14px;
    height: 14px;
    color: var(--accent-gold);
    margin-right: 8px;
}

.premium-sort-select {
    border: none;
    background: transparent;
    padding: 12px 5px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    min-width: 160px;
}

.filter-btn {
    padding: 12px 24px;
    border-radius: 14px;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.05);
    font-weight: 600;
    font-size: 14px;
    color: #444;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-black);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Products Grid */
.products-container {
    margin-top: 60px;
}

.products-grid-v1 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

/* Premium Product Card - Enhanced */
.premium-card-v1 {
    background: #ffffff;
    border-radius: 20px;
    padding: 16px;
    position: relative;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    border: 1px solid rgba(241, 196, 15, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.premium-card-v1:hover {
    transform: translateY(-10px);
    border-color: #f1c40f;
    box-shadow: 0 20px 40px rgba(241, 196, 15, 0.12);
}

.card-image-wrapper {
    height: 240px; /* Slightly taller for better product presence */
    background: #fdfdfd;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.02);
    overflow: hidden;
    padding: 15px; /* Ensure space around the product */
}

.card-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05));
}

.premium-card-v1:hover .card-image-wrapper img {
    transform: scale(1.08) translateY(-5px);
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.1));
}

/* Card Badges */
.discount-tag {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    padding: 8px 15px;
    background: #e67e22; /* Orange */
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    border-bottom-right-radius: 20px;
    box-shadow: 2px 2px 10px rgba(230, 126, 34, 0.3);
}

.wishlist-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: 0.3s;
    color: #888;
}

.wishlist-btn:hover, .wishlist-btn.active {
    background: #fff;
    color: #e74c3c;
    transform: scale(1.1);
}

.wishlist-btn.active i {
    fill: #e74c3c;
    stroke: #e74c3c;
}

.wishlist-btn i {
    width: 20px;
    height: 20px;
}

/* Card Content */
.card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-meta {
    font-size: 11px;
    color: var(--accent-gold);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 2px;
}

.card-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
}

.card-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stars {
    display: flex;
    gap: 2px;
}

.rating-count {
    font-size: 13px;
    color: #95a5a6;
    font-weight: 500;
}

.card-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0;
}

.current-price {
    font-size: 20px;
    font-weight: 800;
    color: #000;
}

.old-price {
    font-size: 15px;
    color: #bdc3c7;
    text-decoration: line-through;
    font-weight: 500;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.btn-cart, .btn-buy {
    height: 42px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cart {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: #1a1a1a;
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-cart:hover {
    background: #000;
    transform: translateY(-2px) rotate(-5deg);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.btn-cart i {
    width: 20px;
    height: 20px;
    stroke-width: 2.5px;
}

.btn-buy {
    flex: 1;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f1c40f 0%, #e67e22 100%);
    border: none;
    color: #000;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(241, 196, 15, 0.4);
    background: linear-gradient(135deg, #f39c12 0%, #d35400 100%);
}

.btn-buy i {
    width: 18px;
    height: 18px;
}

/* Shine Effect */
.btn-buy::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(30deg);
    transition: 0.8s;
}

.btn-buy:hover::after {
    left: 120%;
}

/* Subtle Pulse for Buy Now */
@keyframes btnPulse {
    0% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(241, 196, 15, 0); }
    100% { box-shadow: 0 0 0 0 rgba(241, 196, 15, 0); }
}

.btn-buy {
    animation: btnPulse 2s infinite;
}

/* Animations */
.stagger-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ultra Responsiveness */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    .products-grid-v1 {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

@media (max-width: 1200px) {
    .products-grid-v1 {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    .hero-content h1 {
        font-size: 44px;
    }
}

@media (max-width: 992px) {
    .products-grid-v1 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .premium-filter-bar {
        padding: 15px 25px;
    }
}

@media (max-width: 768px) {
    .products-hero {
        height: 260px;
    }
    .hero-content h1 {
        font-size: 32px;
    }
    .filter-bar-wrapper {
        margin-top: -30px;
        padding: 0 10px;
    }
    .premium-filter-bar {
        flex-direction: column;
        gap: 15px;
        border-radius: 20px;
        padding: 15px;
        align-items: stretch;
    }
    .filter-group:first-child {
        overflow-x: auto;
        padding-bottom: 8px;
        margin: 0 -5px;
        padding: 0 5px 8px 5px;
        display: flex;
        gap: 10px;
        scrollbar-width: none; /* Firefox */
    }
    .filter-group:first-child::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    .filter-group:last-child {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        border-top: 1px solid rgba(0,0,0,0.05);
        padding-top: 12px;
    }
    .filter-btn {
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
        text-align: center;
        justify-content: center;
        width: auto;
    }
    .filter-group:last-child .filter-btn {
        width: 100%;
        background: #f9f9f9;
    }
    .products-container {
        margin-top: 30px;
    }
}

/* Mobile Ultra Optimization */
@media (max-width: 576px) {
    .products-grid-v1 {
        grid-template-columns: repeat(2, 1fr); /* 2 columns for a modern look */
        gap: 12px;
    }
    .premium-card-v1 {
        padding: 10px;
        border-radius: 15px;
    }
    .card-image-wrapper {
        height: 140px;
        border-radius: 12px;
        margin-bottom: 8px;
    }
    .card-meta {
        font-size: 10px;
    }
    .card-title {
        font-size: 13px;
        min-height: 34px;
        line-height: 1.3;
    }
    .card-rating {
        gap: 4px;
        margin-bottom: 4px;
    }
    .card-rating i {
        width: 12px;
        height: 12px;
    }
    .rating-count {
        font-size: 11px;
    }
    .current-price {
        font-size: 16px;
    }
    .old-price {
        font-size: 12px;
    }
    .card-actions {
        gap: 5px;
        margin-top: 8px;
    }
    .btn-cart {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 8px;
    }
    .btn-cart i {
        width: 16px;
        height: 16px;
    }
    .btn-buy {
        height: 34px;
        font-size: 11px;
        border-radius: 8px;
        gap: 4px;
    }
    .btn-buy i {
        width: 14px;
        height: 14px;
    }
    .discount-tag {
        padding: 5px 10px;
        font-size: 11px;
    }
    .wishlist-btn {
        width: 30px;
        height: 30px;
        top: 8px;
        right: 8px;
    }
    .wishlist-btn i {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 380px) {
    .products-grid-v1 {
        grid-template-columns: 1fr; /* Stack on very small screens */
        gap: 20px;
    }
    .card-image-wrapper {
        height: 200px;
    }
}

/* Real Project Pagination Styles */
.pagination-wrapper {
    margin-top: 80px;
    display: flex;
    justify-content: center;
    padding-bottom: 40px;
}

.premium-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
    max-width: 600px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.pag-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pag-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: #888;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
}

.pag-btn:hover:not(:disabled) {
    color: #000;
}

.pag-btn.next:hover:not(:disabled) i {
    transform: translateX(5px);
}

.pag-btn.prev:hover:not(:disabled) i {
    transform: translateX(-5px);
}

.pag-btn i {
    width: 18px;
    height: 18px;
    transition: 0.3s;
}

.pag-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #888;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pag-link:hover {
    background: #f9f9f9;
    color: #000;
}

.pag-link.active {
    background: #000;
    color: #f1c40f;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.pag-dots {
    color: #ccc;
    font-size: 18px;
    padding: 0 10px;
}

.pag-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* Pagination Responsiveness */
@media (max-width: 768px) {
    .pagination-wrapper {
        margin-top: 50px;
        padding: 0 15px 30px;
    }
    .premium-pagination {
        padding-top: 25px;
        gap: 12px;
        max-width: 100%;
        justify-content: space-between; /* Spread out for better touch targets on mobile */
    }
    .pag-btn span {
        display: none;
    }
    .pag-btn {
        width: 44px;
        height: 44px;
        background: #fdfdfd;
        border: 1px solid #eee;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    .pag-numbers {
        gap: 6px;
    }
    .pag-link {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pag-numbers {
        gap: 4px;
    }
    .pag-link {
        width: 34px;
        height: 34px;
    }
    .pag-dots {
        display: none; /* Hide dots to save space */
    }
    .pag-link:not(.active):not(:last-child):not(:first-child) {
        display: none; /* Only show first, active, and last page on very small screens */
    }
}

/* Cart Pulse Animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.cart-count.pulse {
    animation: pulse 0.5s ease-out;
}
