/* Products Catalog Page Specific Styles */

/* Main Layout */
.products-main {
    padding-top: 120px;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Page Title */

.products-hero {
    padding: 60px 0;
    text-align: center;
}

@media (max-width: 768px) {
    .products-hero {
        padding-top: 120px;
        padding-bottom: 40px;
    }
}

.products-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0;
    line-height: 1.1;
    background: linear-gradient(135deg, #1a317d 0%, #d4a45f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    word-spacing: 0.1em;
    text-shadow: 0 2px 4px rgba(26, 49, 125, 0.1);
}

/* Enhanced responsive breakpoints for products title */
@media (max-width: 1200px) {
    .products-title {
        font-size: clamp(2.2rem, 5.5vw, 3.5rem);
    }
}

@media (max-width: 991.98px) {
    .products-title {
        font-size: clamp(2rem, 5vw, 3rem);
        letter-spacing: -0.01em;
    }
}

@media (max-width: 768px) {
    .products-title {
        font-size: clamp(1.8rem, 4.5vw, 2.5rem);
        line-height: 1.2;
        word-spacing: 0.05em;
    }
}

@media (max-width: 575.98px) {
    .products-title {
        font-size: clamp(1.5rem, 4vw, 2rem);
        line-height: 1.3;
        letter-spacing: 0;
        word-spacing: 0;
    }
}

@media (max-width: 400px) {
    .products-title {
        font-size: clamp(1.3rem, 3.5vw, 1.8rem);
        line-height: 1.4;
    }
}

/* Category Navigation */
.category-navigation {
    padding: 40px 0;
    margin-bottom: 40px;
}

.category-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.category-carousel-container {
    width: 645px; /* 3 buttons * 200px + 2 gaps * 15px + 15px padding */
    overflow: hidden;
    position: relative;
}

.category-buttons {
    display: flex;
    gap: 15px;
    transition: transform 0.3s ease;
    width: max-content;
}

/* Show only 3 categories at a time */
.category-buttons .category-btn {
    flex: 0 0 auto;
    min-width: 200px;
}

.category-btn {
    background: #d4a45f;
    border: none;
    border-radius: 40px;
    padding: 10px 12px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
    box-shadow: 0 4px 15px rgba(212, 164, 95, 0.3);
    min-width: 200px;
    text-align: center;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 164, 95, 0.4);
}

.category-btn.active {
    background: linear-gradient(135deg, #d4a45f 0%, #b8934a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 164, 95, 0.5);
}

.nav-arrow {
    background: #1a317d;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 49, 125, 0.3);
}

.nav-arrow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 49, 125, 0.4);
}

/* Products Grid */
.products-grid {
    padding: 40px 0;
}

/* Product Item Styles for Catalog Page */
.product-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d4a45f, #1a317d);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-item:hover::before {
    transform: scaleX(1);
}

.product-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.product-item:active {
    transform: translateY(-4px) scale(0.98);
    transition: all 0.1s ease;
}

.product-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 20px;
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

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

.product-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

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

.action-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #1a317d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

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

.add-btn:hover {
    background: #28a745;
}

.view-btn:hover {
    background: #007bff;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

.product-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a317d;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-price {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

/* Ensure proper grid layout */
.products-grid .row {
    margin: 0 -15px;
}

.products-grid .col-lg-4,
.products-grid .col-md-6 {
    padding: 0 15px;
    margin-bottom: 30px;
}

/* Legacy styles for backward compatibility */
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.product-card-catalog {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card-catalog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d4a45f, #1a317d);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card-catalog:hover::before {
    transform: scaleX(1);
}

.product-card-catalog:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.product-image-catalog {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 20px;
}

.product-info-catalog {
    text-align: center;
}

.product-name-catalog {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a317d;
    margin-bottom: 10px;
}

.product-price-catalog {
    font-family: 'Roboto', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #d4a45f;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-quick-view,
.btn-add-cart {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-quick-view {
    background: linear-gradient(135deg, #1a317d 0%, #2c4db8 100%);
    color: white;
}

.btn-quick-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 49, 125, 0.3);
}

.btn-add-cart {
    background: linear-gradient(135deg, #d4a45f 0%, #e8b76b 100%);
    color: white;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 164, 95, 0.3);
}

/* Quick View Modal */
.quick-view-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.quick-view-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

.quick-view-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.quick-view-product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.quick-view-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
}

.quick-view-details h3 {
    font-size: 2rem;
    color: #1a317d;
    margin-bottom: 15px;
}

.quick-view-price {
    font-size: 1.5rem;
    color: #d4a45f;
    font-weight: 600;
    margin-bottom: 20px;
}

.quick-view-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.quick-view-actions {
    display: flex;
    gap: 15px;
}

/* See More Products Button */
.btn-see-more-products {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--primary-gold) 50%, var(--primary-navy) 100%);
    background-size: 200% 100%;
    background-position: 100% 0;
    color: var(--white);
    border: none;
    padding: 18px 50px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 10px 30px rgba(25, 49, 125, 0.3);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    justify-content: center;
}

.btn-see-more-products::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s ease;
}

.btn-see-more-products::after {
    content: '→';
    font-size: 1.3rem;
    font-weight: bold;
    transition: all 0.3s ease;
    transform: translateX(0);
}

.btn-see-more-products:hover {
    background-position: 0% 0;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(25, 49, 125, 0.4);
    letter-spacing: 3px;
}

.btn-see-more-products:hover::before {
    left: 100%;
}

.btn-see-more-products:hover::after {
    transform: translateX(5px);
}

.btn-see-more-products:active {
    transform: translateY(-2px) scale(1.02);
}

/* Loading state */
.btn-see-more-products.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-see-more-products.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Load More Button */
.load-more-section {
    text-align: center;
    padding: 60px 0;
}

.btn-load-more {
    background: linear-gradient(135deg, #1a317d 0%, #d4a45f 100%);
    border: none;
    border-radius: 30px;
    padding: 15px 40px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(26, 49, 125, 0.3);
}

.btn-load-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(26, 49, 125, 0.4);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-container {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .products-grid .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .category-carousel-container {
        width: 400px; /* 2 buttons * 180px + 1 gap * 15px + 25px padding */
    }
    
    .category-buttons .category-btn {
        min-width: 180px;
    }
    
    .category-btn {
        min-width: 180px;
        font-size: 1rem;
        padding: 8px 10px;
    }
    
    .products-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    .products-grid .col-lg-4,
    .products-grid .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }
    
    .product-item {
        margin-bottom: 20px;
    }
    
    .quick-view-product {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .quick-view-content {
        padding: 20px;
        margin: 20px;
    }
}

@media (max-width: 576px) {
    .category-carousel-container {
        width: 300px; /* 1 button * 250px + 50px padding */
    }
    
    .category-buttons .category-btn {
        min-width: 250px;
    }
    
    .category-btn {
        min-width: 250px;
        font-size: 0.9rem;
        padding: 6px 8px;
    }
}

@media (max-width: 576px) {
    .category-tabs {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-arrow {
        width: 45px;
        height: 45px;
    }
    
    .products-container {
        gap: 20px;
    }
    
    .product-actions {
        position: static;
        opacity: 1;
        transform: none;
        flex-direction: row;
        justify-content: center;
        margin-top: 15px;
    }
    
    .products-main {
        padding-top: 100px;
    }
}

/* Animation for fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
