:root {
    --minjon-orange: #ff6600;
    /* Approximate color from the logo/button */
    --minjon-dark-text: #333;
    --minjon-light-text: #fff;
    --minjon-gray: #f8f9fa;
    --card-text-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
    /* Added for text readability over images */
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
        /* Starts 100px to the left and invisible */
    }

    100% {
        opacity: 1;
        transform: translateX(0);
        /* Ends at its natural position and fully visible */
    }
}


/* Hero Section Styling (No change needed here based on previous discussion) */
.hero-section {
    position: relative;
    width: 100%;
    height: 500px;
    background-image: url('../mainimg/products1.jpeg');
    /* This path needs to be correct relative to public/css/ */
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: var(--minjon-light-text);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    padding-left: 10%;
}

.hero-section .container {
    margin-top: -75px;
}

.hero-section .hero-content h1 {
    font-size: 3.8em;
    color: White;
    margin-bottom: 10px;
    line-height: 1.2;
    max-width: 600px;
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInFromLeft 0.8s ease-out forwards;
    animation-delay: 1.5s;
}

.hero-section .hero-content p {
    font-size: 1.5em;
    color: white;
    margin-bottom: 20px;
    max-width: 600px;
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInFromLeft 0.8s ease-out forwards;
    animation-delay: 1.5s;
}


/* --- Product Card Container --- */
.prodisplay {
    display: flex;
    flex-wrap: wrap;
    /* gap: 20px; */
    /* Space between cards */
    justify-content: space-around;
    /* Center cards in the container */
    padding: 20px;
}

.product-card {
    /* Removed background-color: #f8f8f8; here. The front/back will handle their own backgrounds. */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    color: #333;
    /* Default text color for the card, can be overridden by front/back */
    min-height: 350px;
    /* Consistent height for all cards */
    width: 100%;
    /* Default to full width on small screens */
    max-width: 320px;
    /* Max width for individual cards */
    transition: transform 0.3s ease-in-out;
}

/* --- Inner Element (The flippable part) --- */
.product-card-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    /* Controls the speed of the flip animation */
    transform-style: preserve-3d;
    /* Essential for child elements to be positioned in 3D space */
}

/* --- Hover Effect: Flip the card --- */
.product-card:hover .product-card-inner {
    transform: rotateY(180deg);
    /* Rotates 180 degrees horizontally on hover */
}

/* --- Front and Back Sides --- */
.product-card-front,
.product-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* padding: 20px; */
    box-sizing: border-box;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #eee;
}

.product-card-front {
    color: var(--minjon-dark-text);
    text-shadow: var(--card-text-shadow);
}

.product-card-front .backtrans{
    background-color: rgba(0, 0, 0, 0.4);
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.product-card-back .backtrans{
    background-color: rgba(0, 0, 0, 0.4);
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.product-card-front .product-name {
    
    margin-bottom: 15px;
    color: white;
    font-weight: bolder;
}

.product-card-back {
    background-color: var(--minjon-orange);
    color: var(--minjon-light-text);
    transform: rotateY(180deg);
    text-shadow: var(--card-text-shadow);
}

.product-card-back .product-name {
    margin-bottom: 15px;
    color: white;
}

.product-card-back p {
    margin-bottom: 5px;
    font-size: 1em;
    text-align: center;
    /* Center text */
    color: inherit;
    /* Inherit color from parent */
}


/* read more button */

.read-more-btn {
    background-color:black ;
    color: #ff6600;
    font-size: 1.1em;
    font-weight: bold;
    padding: 10px 20px;
    border: 2px solid #4a4747;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.read-more-btn:hover {
    background-color:  #ff6600;
    color: #333;
}

/* Added a general padding for the section to keep content off edges */
.product-section {
    padding: 40px 0;
}

/* Category Heading Style */
.category-heading {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 2.5em;
    color: var(--minjon-dark-text);
    border-bottom: 2px solid var(--minjon-orange);
    padding-bottom: 10px;
    display: inline-block;
    /* To make border-bottom only as wide as text */
    padding-left: 20px;
    padding-right: 20px;
}

/* Optional: For the "No products found" message */
.alert.alert-info {
    margin-top: 30px;
    padding: 15px;
    border-radius: 5px;
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* this is for tro shwo product at 500px*/
@media (max-width: 576px) {
    .col-sm-12 {
        flex: 0 0 auto;
        width:100%;
}
}

/* --- Optional: Responsive adjustments if needed --- */
@media (max-width: 767px) {
    .prodisplay {
        display: flex;
        /* Keep flex for wrapping, but allow single column */
        flex-direction: column;
        /* Stack cards vertically */
        align-items: center;
        /* Center them */
        padding: 10px;
    }

    .product-card {
        height: 300px;
        /* Slightly smaller height on mobile */
        max-width: 90%;
        /* Adjust max-width for better mobile display */
        margin-bottom: 20px;
        /* Add margin between stacked cards */
    }

    .hero-section {
        height: 350px;
        /* Make hero smaller on mobile */
        padding-left: 5%;
        /* Adjust padding */
    }

    .hero-section .hero-content h1 {
        font-size: 2.5em;
    }

    .hero-section .hero-content p {
        font-size: 1.2em;
    }
}