/* ============================================
   PRODUCTS PAGE STYLES
   ============================================ */

:root {
    --primary-blue: #1E65A5;
    --primary-red: #E02A2A;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --text-light: #ffffff;
    --text-dark: #333333;
    --transition: all 0.3s ease;
}

/* ============================================
   PRODUCTS HERO SECTION WITH BACKGROUND IMAGE
   ============================================ */
.products-hero {
    position: relative;
    padding: 140px 0;
    text-align: center;
    color: var(--text-light);
    overflow: hidden;
}

.products-hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* object-fit: cover; */
    z-index: 0;
}

.products-hero .container {
    position: relative;
    z-index: 2;
}

.products-hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
    letter-spacing: 1px;
    animation: fadeInDown 0.8s ease;
}

.products-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease 0.3s both;
}

/* Floating Icons */
.products-hero .floating-icon {
    position: absolute;
    font-size: 24px;
    opacity: 0.08;
    animation: floatSoft 8s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
    color: white;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes floatSoft {
    0%, 100% { transform: translateY(0); opacity: 0.08; }
    50% { transform: translateY(-10px); opacity: 0.12; }
}

/* ============================================
   FILTER SECTION
   ============================================ */
.filter-section {
    padding: 30px 0;
    background: white;
    border-bottom: 1px solid #e9ecef;
}

.filter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-categories {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-blue);
    color: white;
}

.filter-search form {
    display: flex;
    gap: 10px;
}

.filter-search input {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 50px;
    width: 250px;
    font-size: 0.95rem;
}

.filter-search input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.filter-search button {
    padding: 10px 25px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-search button:hover {
    background: var(--primary-red);
}

/* ============================================
   PRODUCTS GRID SECTION
   ============================================ */
.products-section {
    padding: 50px 0 80px;
    background: var(--light-gray);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(30,101,165,0.2);
}

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Image Navigation Dots */
.image-nav {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 5px;
    z-index: 2;
}

.image-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.image-dot.active {
    background: var(--primary-red);
    transform: scale(1.2);
}

/* Product Content */
.product-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 8px;
    line-height: 1.3;
    height: 2.6rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-description {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    margin-bottom: 12px;
    height: 2.4rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #eee;
    min-height: 60px;
}

/* Add to Cart Button */
.add-to-cart-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-to-cart-btn:hover {
    background: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(224, 42, 42, 0.3);
}

.add-to-cart-btn i {
    font-size: 1rem;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.quantity-controls .quantity-btn {
    width: 32px;
    height: 32px;
    background: white;
    border: 1px solid var(--primary-blue);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--primary-blue);
    font-size: 0.9rem;
}

.quantity-controls .quantity-btn:hover {
    background: var(--primary-blue);
    color: white;
    transform: scale(1.05);
}

.quantity-controls .quantity-btn.decrease:hover {
    background: #dc3545;
    border-color: #dc3545;
}

.quantity-controls .quantity-btn.increase:hover {
    background: #28a745;
    border-color: #28a745;
}

.quantity-controls .quantity-display {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1.1rem;
    min-width: 30px;
    text-align: center;
}

/* Products Count */
.products-count {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: linear-gradient(to right, #f8f9fa, #ffffff, #f8f9fa);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.products-count p {
    margin: 0;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* No Products Found */
.no-products {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    grid-column: 1 / -1;
}

.no-products i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.no-products h3 {
    font-size: 1.5rem;
    color: var(--dark-gray);
    margin-bottom: 10px;
}

.no-products p {
    color: #6c757d;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    width: 100%;
}

.pagination-list {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.page-link i {
    font-size: 0.8rem;
}

.page-item:not(.disabled) .page-link:hover {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 101, 165, 0.3);
}

.page-item.active .page-link {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
    cursor: default;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
    color: #6c757d;
}

/* ============================================
   NOTIFICATION
   ============================================ */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: white;
    border-left: 4px solid var(--primary-blue);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 3px;
}

.notification-message {
    font-size: 0.85rem;
    color: #6c757d;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #adb5bd;
    cursor: pointer;
    transition: var(--transition);
}

.notification-close:hover {
    color: var(--dark-gray);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    .products-hero {
        padding: 100px 20px;
    }
    
    .products-hero h1 {
        font-size: 3rem;
    }
    
    .products-hero p {
        font-size: 1.1rem;
        max-width: 600px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-categories {
        justify-content: center;
    }
    
    .filter-search form {
        width: 100%;
    }
    
    .filter-search input {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .products-hero {
        padding: 80px 20px;
    }
    
    .products-hero h1 {
        font-size: 2.5rem;
    }
    
    .products-hero p {
        font-size: 1rem;
        max-width: 500px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto 30px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .quantity-controls {
        padding: 6px 10px;
    }
    
    .quantity-controls .quantity-btn {
        width: 28px;
        height: 28px;
    }
    
    .quantity-controls .quantity-display {
        font-size: 1rem;
    }
    
    .pagination-list {
        gap: 5px;
    }
    
    .page-link {
        min-width: 35px;
        height: 35px;
        padding: 0 8px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .products-hero {
        padding: 60px 15px;
    }
    
    .products-hero h1 {
        font-size: 2rem;
    }
    
    .products-hero p {
        font-size: 0.95rem;
        max-width: 90%;
    }
    
    .filter-categories {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 6px 15px;
        font-size: 0.85rem;
    }
    
    .filter-search form {
        flex-direction: column;
    }
    
    .filter-search input {
        width: 100%;
    }
    
    .quantity-controls {
        gap: 8px;
    }
    
    .quantity-controls .quantity-btn {
        width: 26px;
        height: 26px;
    }
    
    .pagination {
        margin-top: 30px;
    }
    
    .pagination-list {
        gap: 4px;
    }
    
    .page-link {
        min-width: 32px;
        height: 32px;
        padding: 0 6px;
        font-size: 0.8rem;
        border-width: 1px;
    }
    
    .notification {
        left: 20px;
        right: 20px;
    }
}