/* Reset and General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    font-size: 18px; /* Improved base font size for readability */
}



/* Main Content */
main {
    padding: 30px 15px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

/* Product Section */
.product-section {
    max-width: 1200px;
    margin: 50px auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 20px;
    justify-content: center; /* Ensures perfect center alignment */
}


/* Responsive Grid Fix */
@media (max-width: 768px) {
    .product-section {
        grid-template-columns: repeat(2, minmax(150px, 1fr)); /* Ensure 2 products per row */
        gap: 15px; /* Adjust gap for better spacing */
    }
}

@media (max-width: 480px) {
    .product-section {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 products per row even on smaller screens */
        gap: 10px;
    }
}

/* Ensure All Product Cards Have Equal Height */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    align-items: stretch; /* Makes all cards the same height */
}

/* 🔹 Ensure all product cards have the same height */
.product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensures even spacing */
    background: linear-gradient(to bottom, #ffffff, #f9f9f9);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease, box-shadow 0.3s ease;
    height: 100%;  /* 🔥 Forces all cards to be of equal height */
      perspective: 1000px; /* Enables 3D effect */
    transform-style: preserve-3d;
}

/* 🔹 Product Image (Perfectly Aligned) */
.product-card img {
    width: 100%;
    height: 220px; /* 🔥 Set a fixed height for uniformity */
    object-fit: contain;
    border-radius: 10px;
    transition: transform 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    display: block;
    backface-visibility: hidden;
    transform-origin: center center;
}

.product-card:hover img {
 transform: translateY(-8px) scale(1.02);
    background: linear-gradient(to bottom, #ffffff, #f0f0f0);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);}



/* ✅ Responsive Adjustments */
@media (max-width: 768px) {
    .product-card img {
        height: 180px; /* 🔥 Adjusts height for tablets */
    }
}

@media (max-width: 480px) {
    .product-card img {
        height: 150px; /* 🔥 Smaller image for mobile */
    }
}
/* 🔹 Product Info (Ensures Text Alignment) */
.product-info {
    flex-grow: 1; /* 🔥 Pushes content evenly */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* Centers text */
}

.product-card h3 {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    min-height: 50px;  /* 🔥 Ensures titles stay aligned */
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
}

.product-card .price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ff6600;
    margin-bottom: 15px;
}

/* 🔹 Button Container */
.button-container {
    display: flex;
    flex-direction: row; /* Default: Buttons side by side */
    gap: 12px; /* More space between buttons */
    width: 100%;
    align-items: center;
    justify-content: center; /* Ensures proper centering */
    margin-top: auto; /* Pushes buttons to bottom */
}

/* 🔹 Professional Button Design */
.button-container button {
    flex: 1; /* Ensures buttons take equal space */
    max-width: 200px;
    background: linear-gradient(45deg, #ff6600, #ff3300);
    color: white;
    border: none;
    padding: 7px 9px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s ease-in-out;
    text-align: center;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* 🔥 Glowing Shadow Animation */
.button-container button::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 102, 0, 0.4), transparent 60%);
    transition: transform 0.4s ease;
    transform: translate(-50%, -50%) scale(0);
    z-index: -1;
}

/* 🔥 Button Hover Effects */
.button-container button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.6);
}

.button-container button:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

/* 🔥 Click Effect */
.button-container button:active {
    transform: translateY(2px);
    box-shadow: 0 3px 10px rgba(255, 102, 0, 0.4);
}

/* ✅ Responsive Fix for Small Screens (Stacked Buttons) */
@media (max-width: 600px) {
    .button-container {
        flex-direction: column; /* 🔥 Stacks buttons vertically */
    }

    .button-container button {
        width: 100%; /* Full width for mobile */

        padding: 8px 8px;

        .product-section {
            display: grid;
            grid-template-columns: repeat(2, 1fr); /* Ensures 2 products per row */
            gap: 15px;
        }
    
    }
}






/* Animated Product Entry */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease forwards;
}

@media (max-width: 768px) {
    nav a {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .products {
        display: grid;  /* Ensure grid is applied */
        grid-template-columns: repeat(2, minmax(150px, 1fr)); 
        gap: 15px;  /* Add spacing between cards */
    }
}

@media (max-width: 600px) {
    .products {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Always 2 per row */
        gap: 10px;
    }

    .product-card {
        width: 100%; /* Ensure full width inside grid */
    }
}

@media (max-width: 480px) {
    .products {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 per row on mobile */
    }

    .product-card h3 {
        font-size: 1rem;
    }
    .product-card p {
        font-size: 0.8rem;
    }
    .product-card .price {
        font-size: 1.1rem;
    }
    nav a {
        font-size: 0.8rem;
    }
}
