/* =========================
   PRODUCTS PAGE
========================= */

.products-section {
    max-width: 1400px;
    margin-inline: auto;
    padding: 20px;
    animation: fadeUp 1s ease;
}


/* =========================
   SECTION TITLE
========================= */

.products-section h2 {
    margin: 0 0 20px;
    text-align: center;
    color: #087f23;
    font-size: 2.5rem;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.4);
}

.products-intro {
    max-width: 850px;
    margin: 0 auto 50px;
    text-align: center;
    color: #333;
    font-size: 1.1rem;
    line-height: 1.8;
}


/* =========================
   PRODUCT GRID
========================= */

.products-grid {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(280px, 1fr)
    );
    gap: 30px;
}


/* =========================
   PRODUCT CARD
========================= */

.product-card {
    position: relative;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;

    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);

    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.25);
}


/* =========================
   PRODUCT IMAGE
========================= */

.product-card img {
    display: block;

    width: 100%;
    height: 230px;

    object-fit: cover;
}


/* =========================
   PRODUCT CONTENT
========================= */

.product-content {
    display: flex;
    flex: 1;
    flex-direction: column;

    padding: 22px;
}

.product-content h3 {
    margin: 0 0 10px;

    color: #0d6efd;
    font-size: 1.35rem;
}

.product-content p {
    margin: 0 0 18px;

    color: #444;
    line-height: 1.6;
}


/* =========================
   PRODUCT PRICE
========================= */

.product-price {
    margin: 0 0 18px;

    color: #198754;
    font-size: 1.3rem;
    font-weight: 700;
}


/* =========================
   VIEW PRODUCT BUTTON
========================= */

.view-product {
    width: 100%;
    margin-top: auto;
    padding: 14px;

    border: 0;
    border-radius: 50px;

    color: #fff;
    background: linear-gradient(
        135deg,
        #198754,
        #0d6efd
    );

    font-size: 16px;
    font-weight: 700;

    cursor: pointer;

    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);

    transition:
        transform 0.35s ease,
        background 0.35s ease;
}

.view-product:hover {
    transform: translateY(-3px);

    background: linear-gradient(
        135deg,
        #ffc107,
        #ff9800
    );
}


/* =========================
   PRODUCT MODAL
========================= */

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.65);

    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.product-modal.active {
    display: flex;
    animation: modalFade 0.35s ease;
}


/* =========================
   MODAL BOX
========================= */

.product-modal-box {
    position: relative;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;

    width: 90%;
    max-width: 850px;
    max-height: 90vh;

    overflow-y: auto;

    padding: 30px;

    background: rgba(255, 255, 255, 0.75);
    border-radius: 35px;

    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);

    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);

    animation: modalZoom 0.35s ease;
}


/* =========================
   MODAL IMAGE
========================= */

.modal-image {
    width: 100%;
    height: 350px;

    object-fit: cover;

    border-radius: 25px;
}


/* =========================
   MODAL CONTENT
========================= */

.modal-content h2 {
    margin: 0 0 20px;
    padding-right: 20px;

    color: #087f23;
    font-size: 2rem;
    line-height: 1.3;
}

.modal-description {
    color: #333;
    font-size: 1.1rem;
    line-height: 1.7;
}

.modal-price {
    margin: 25px 0;

    color: #198754;
    font-size: 1.8rem;
    font-weight: 800;
}


/* =========================
   MODAL CLOSE BUTTON
========================= */

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 20;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 45px;
    height: 45px;

    border: 0;
    border-radius: 50%;

    color: #fff;
    background: #dc3545;

    font-size: 22px;

    cursor: pointer;

    transition:
        transform 0.3s ease,
        background-color 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
    background: #ff0000;
}


/* =========================
   PRODUCT CONTACT BOX
========================= */

.contact-box {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;

    width: 320px;
    max-width: 90%;

    padding: 35px 25px 25px;

    text-align: center;

    background: #fff;
    border-radius: 25px;

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);

    opacity: 0;
    visibility: hidden;

    transform: translate(-50%, -50%) scale(0.8);

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease,
        transform 0.3s ease;
}

.contact-box.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.contact-box h3 {
    margin: 0 0 20px;
    padding-right: 35px;

    color: #087f23;
    line-height: 1.3;
}

.contact-box p {
    margin: 12px 0;

    color: #333;
    font-size: 16px;
}


/* =========================
   CONTACT CLOSE BUTTON
========================= */

.contact-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    color: #fff;
    background: #dc3545;

    cursor: pointer;

    transition: background-color 0.3s ease;
}

.contact-close:hover {
    background: #ff0000;
}


/* =========================
   ANIMATIONS
========================= */

@keyframes modalFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalZoom {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* =========================
   TABLET
========================= */

@media (max-width: 800px) {
    .product-modal-box {
        grid-template-columns: 1fr;
    }

    .modal-image {
        height: 250px;
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .products-section {
        padding: 15px;
    }

    .products-section h2 {
        font-size: 2rem;
    }
}


/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {
    .products-section,
    .product-card,
    .product-modal.active,
    .product-modal-box {
        animation: none;
    }

    .product-card,
    .view-product,
    .modal-close,
    .contact-box,
    .contact-close {
        transition: none;
    }
}