/* Products Page Styles */

/* Products Hero Section */
.products-hero {
    height: 300px;
    background: linear-gradient(rgba(44, 95, 62, 0.8), rgba(44, 95, 62, 0.8)),
                url('assets/images/hero/hero-main.jpg);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    margin-top: 90px;
}

.products-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.products-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Cart Icon */
.cart-icon {
    position: relative;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 1rem;
    transition: var(--transition);
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Product Categories */
.product-categories {
    padding: 4rem 0;
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    max-width: 100%;
    padding: 0 2rem;
}

.filter-btn {
    padding: 16px 32px;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-secondary);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.product-card.hidden {
    display: none;
}

/* Product Image */
.product-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

/* Product Overlay */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 95, 62, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: var(--transition);
}

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

.product-overlay button {
    padding: 12px 20px;
    border: 2px solid white;
    background: transparent;
    color: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.product-overlay button:hover {
    background: white;
    color: var(--primary-color);
}

.customize-btn {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
}

.customize-btn:hover {
    background: white !important;
    color: var(--accent-color) !important;
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

/* Product Info */
.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Product Features */
.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.feature {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Product Pricing */
.product-pricing {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.view-details {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.view-details:hover {
    color: var(--accent-color);
}

.customize-link {
    background: var(--accent-color);
    color: white !important;
    padding: 8px 16px;
    border-radius: var(--border-radius);
}

.customize-link:hover {
    background: var(--primary-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover {
    color: var(--accent-color);
}

.modal-body {
    padding: 2rem;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1500;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.cart-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.cart-close:hover {
    color: var(--accent-color);
}

.cart-items {
    flex: 1;
    padding: 1rem 2rem;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 18px;
}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
}

.cart-footer .btn {
    width: 100%;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-cart-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Navigation Active State */
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-hero h1 {
        font-size: 2rem;
    }

    .products-hero p {
        font-size: 1rem;
    }

    .category-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 10px;
    }

    .product-card {
        margin: 0 auto;
        max-width: 400px;
    }

    .product-overlay {
        flex-direction: column;
        gap: 0.5rem;
    }

    .product-overlay button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .cart-sidebar {
        width: 100vw;
        right: -100vw;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .cart-icon {
        order: -1;
        margin-left: 0;
        margin-right: 1rem;
    }
}

@media (max-width: 480px) {
    .product-info {
        padding: 1rem;
    }

    .product-pricing {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .customize-link {
        align-self: stretch;
        text-align: center;
    }
}