/* 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: #e8e2e2;
    line-height: 1.6;
    font-size: 18px; /* Improved base font size for readability */
}

/* Hero Section */


.hero-content {
    position: relative;
    z-index: 1;
    color: white;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}




@media (max-width: 768px) {
    .hero {
        height: auto; /* Adjusts height based on content */
        min-height: 99vh; /* Ensures it still looks good */
        padding: 15px 1px;
    }

    .hero-content h1 {
        font-size: 2rem; /* Reduce font size for better readability */
    }

    .hero-content p {
        font-size: 1rem;
    }

    .cta-button {
        padding: 2px 4px;
        font-size: 1rem;
    }
}

/* Responsive Fix for Mobile */
@media (max-width: 768px) {
    .hero {
        background-size: contain; /* Keeps full image visible */
        background-position: center;
        background-repeat: no-repeat;
        height: auto; /* Adjusts height dynamically */
        min-height: 43vh; /* Ensures it fills the screen */
    }
}


.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
}

.hero .cta-button {
    background-color: #ff9900;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.hero .cta-button:hover {
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
/* 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;
}

/* 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 */
}

/* Product Card */
.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-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: linear-gradient(to bottom, #ffffff, #f0f0f0);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}


/* 🔹 Product Image (Perfectly Aligned) */

.product-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    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;
}

/* Enhanced Hover/Focus/Active Animation */
.product-card:hover img,
.product-card:focus-within img,
.product-card:active img {
    transform: scale(1.05) rotateX(6deg) rotateY(-6deg) translateY(-6px);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2), 0 8px 12px rgba(0, 0, 0, 0.08);
}


/* Ensure All Product Info & Button Aligns */
.product-info {
    flex-grow: 1; /* Takes available space */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-card h3 {
    font-size: 1.2rem;         /* Slightly reduced for better balance */
    font-weight: 600;          /* Medium bold for elegance */
    color: #222;               /* Darker gray for contrast */
    margin: 10px 0 6px;        /* Balanced top/bottom spacing */
    line-height: 1.4;          /* Improves readability on multi-line */
    text-align: center;        /* Centers the title under the image */
        white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;     /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;

}

.product-card p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 12px;
}

/* Price Styling */
.product-card .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #ff6600;
    margin-bottom: 15px;
    display: inline-block;
    transition: color 0.3s ease;
}

.product-card:hover .price {
    color: #ff3300;
}
/* Universal Button Styles */
 .view-details {
    margin-top: auto; /* Pushes button to the bottom */
    background: linear-gradient(45deg, #ff6600, #ff3300);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}
 .view-details:hover {
    background: linear-gradient(45deg, #ff3300, #cc0000);
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.button-secondary {
    background-color: #28a745;
}

.button-secondary:hover {
    background-color: #218838;
}

.button-danger {
    background-color: #dc3545;
}

.button-danger:hover {
    background-color: #c82333;
}

/* Tooltip for Additional Information */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: pointer;
}




/* 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); /* 2 cards per row for compact view */
        gap: 12px;                             /* Add spacing between cards */
        padding: 10px;
    }

    .product-card {
        padding: 12px;
        border-radius: 12px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }

    .product-card h3 {
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.3;
        text-align: center;
        color: #222;
        margin: 8px 0 4px;
    }

    .product-card p {
        font-size: 0.85rem;
        color: #555;
        text-align: center;
        margin: 0 0 6px;
    }

    .product-card .price {
        font-size: 1rem;
        font-weight: 600;
        color: #e65100; /* Optional: Use your theme color */
        text-align: center;
        margin-bottom: 8px;
    }

    nav a {
        font-size: 0.85rem;
        padding: 6px 10px;
        display: inline-block;
    }

    .product-card button,
    .product-card .btn {
        font-size: 0.9rem;
        padding: 8px 12px;
        border-radius: 6px;
        width: 100%;
    }
}
