/* ============================= */
/* Event Products Section Styles */
/* ============================= */

.evts-products-section {
    position: relative;
    padding: 80px 0;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;

    /* Fixed background */
    background-image: url("../images/hero/tailor.jpg");
    /* change path */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    /* Smooth scroll */
    scroll-behavior: smooth;
}

/* Optional dark overlay for better text contrast */
.evts-products-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 0;
}

/* Keep actual content above overlay */
.evts-products-section .container {
    position: relative;
    z-index: 1;
}

/* Section Header */
.evts-section-header {
    margin-bottom: 30px;
    text-align: center;
    color: #fff;
}

.evts-section-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}

.evts-section-desc {
    font-size: 16px;
    color: #ddd;
}

/* Category Buttons */
.evts-category-buttons,
.evts-subcategory-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.evts-category-btn {
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid var(--color-primary);
    background: var(--color-white);
    color: var(--color-primary);
}

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

/* Products Grid */
.evts-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Product Card */
.evts-product-card {
    border: 1px solid #ddd;
    border-radius: var(--card-radius);
    overflow: hidden;
    text-align: center;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease, transform 0.6s ease;
    opacity: 0;
    transform: translateY(30px);
}

.evts-product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.evts-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Product Image */
.evts-product-image {
    width: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 100%;
}

.evts-product-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.4s ease-in-out;
}

/* Hover Image */
.evts-hover-image {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.evts-product-card:hover .evts-hover-image {
    opacity: 1;
}

.evts-product-card:hover img:not(.evts-hover-image) {
    opacity: 0;
}

/* Product Name */
.evts-product-name {
    padding: 10px;
    font-weight: bold;
    font-size: 14px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 992px) {
    .evts-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 5px;
    }

    .evts-product-image {
        padding-top: 110%;
    }

    .evts-product-name {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .evts-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 5px;
    }

    .evts-product-image {
        padding-top: 120%;
    }

    .evts-product-name {
        font-size: 12px;
    }
}

/* Modal Styles */
.product-image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.85);
    animation: fadeIn 0.3s;
}

.product-image-modal-content {
    position: relative;
    margin: auto;
    top: 50%;
    transform: translateY(-50%);
    max-width: 90%;
    max-height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image-modal-content img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    animation: zoomIn 0.3s;
}

.product-image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.product-image-modal-close:hover {
    color: #ff7100;
}

.product-image-modal-prev,
.product-image-modal-next {
    position: absolute;
    top: 50%;
    color: #fff;
    font-size: 50px;
    padding: 10px;
    cursor: pointer;
    user-select: none;
    border: none;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    transform: translateY(-50%);
    transition: 0.3s;
}

.product-image-modal-prev:hover,
.product-image-modal-next:hover {
    background: rgba(0, 0, 0, 0.6);
}

.product-image-modal-prev {
    left: 20px;
}

.product-image-modal-next {
    right: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
    }

    to {
        transform: scale(1);
    }
}

@media (max-width: 768px) {

    .product-image-modal-prev,
    .product-image-modal-next {
        font-size: 35px;
        padding: 5px;
    }
}
