/* HERO */
.home-hero {
    background: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 116px 50px;
    margin-top: 2rem;
    border-radius: 20px;
}

.hero-banner {
    aspect-ratio: 14 / 4;
    overflow: hidden;
    position: relative;
}

#heroBannerImage {
    width: 100%;
    object-fit: cover;
}

.hero-inner {

    max-width: 800px;
    margin: auto;
}

.home-hero h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

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


.home-hero-image {
    margin-top: 2rem;
    border-radius: 20px;
    overflow: hidden;
    height: 340px; 
    position: relative;
}

.home-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    /* display: block; */
}


.home-section {
    padding: 20px 40px;
    padding-bottom: 0;
}

.section-title {
    font-size: 2.5rem;
    margin-top: 20px;
    margin-bottom: 50px;
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}


.category-card {
    position: relative;
    height: 200px;
    padding: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.68rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    overflow: hidden;

    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}




.category-card span {
    position: relative;
    z-index: 2;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6);
}

/* dark overlay */
.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}


.category-woody {
    background-image: url("/static/website_images/category_images/woody.jpg");
}

.category-floral {
    background-image: url("/static/website_images/category_images/floral.jpg");
}

.category-fresh {
    background-image: url("/static/website_images/category_images/fresh.webp");
}

.category-oriental {
    background-image: url("/static/website_images/category_images/oriental.webp");
}

.product-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, 280px);  */
    /* grid-template-columns: repeat(auto-fit, minmax(280px, 350px)); */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 50px;
    justify-content: center;
}


.product-card {
    background: #1c1c1c;
    border-radius: 14px;
    position: relative;
    cursor: pointer;

    border: 1px solid rgba(255, 255, 255, 0.06);

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.25),
        0 1px 0 rgba(255, 255, 255, 0.03) inset;

    transition: transform 0.3s ease, box-shadow 0.3s ease;

    -webkit-tap-highlight-color: transparent;
    /* To prevent the blue click highlight on touch screens */
}





.product-image {
    height: 260px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
}

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

.product-actions {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;

    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}



.product-card.active .product-actions {
    opacity: 1;
    visibility: visible;
}

.product-actions button {
    width: 70%;
    margin: 0 auto;
    padding: 12px 0;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}



.product-actions button:active {
    transform: scale(0.94) !important;
}


.btn-add-cart {
    background: rgba(255, 255, 255, 0.9);
    color: #111;
}

.btn-buy-now {
    background: #2e7d32;
    color: #ffffff;
}

/* Effect for product card actions */

.product-actions button {
    opacity: 0;
    transform: translateY(10px);
}



/*  */

.product-content {
    padding: 18px;
    text-align: center;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
}


.product-pricing {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.price-current {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.price-compare {
    font-size: 0.9rem;
    color: #888;
    text-decoration: line-through;
}


.discount-flag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #2e7d32;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 9px 12px;
    border-radius: 6px;
    z-index: 2;
}


.value-strip {
    background: #151515;
    padding: 50px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    text-align: center;
    margin-top: 4rem;
    border-radius: 20px;
}

.value-item h3 {
    margin-bottom: 6px;
}


.toast {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translate(-50%, -120%);

    background: #2e7d32;
    color: #fff;
    padding: 18px 32px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1.05rem;

    display: flex;
    align-items: center;
    gap: 12px;

    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;

    opacity: 0;
    z-index: 9999;
    transition: transform 0.6s cubic-bezier(.22,1,.36,1), opacity 0.3s ease;
}

.toast.show {
    transform: translate(-50%, 40px);
    opacity: 1;
}

@media (hover : hover) {
    .category-card:hover {
        transform: translateY(-8px);
    }

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

    .product-card:hover .product-actions {
        opacity: 1;
        visibility: visible;
    }

    .product-actions button:hover {
        transform: scale(1.06) !important;
    }

    .product-card:hover .product-actions button {
        opacity: 1;
        transform: translateY(0);
    }

    .product-card:hover .product-actions button:nth-child(1) {
        transition-delay: 0.05s;
    }

    .product-card:hover .product-actions button:nth-child(2) {
        transition-delay: 0.12s;
    }
}

@media (max-width: 750px) {
    .home-section {
        padding: 20px 5px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .category-card {
        height: 160px;
        font-size: 1.2rem;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .product-image {
        height: 160px;
    }

    .toast {
        left: 50%;
        right: auto;
        transform: translate(-50%, -20px);
        top: 20px;
    }

    .toast.show {
        transform: translate(-50%, 0);
    }

}


@media (max-width: 750px) {
    main {
        padding: 20px;
    }
}