body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 20px 20px 100px 20px; /* Added more bottom margin for floating buttons */
    background-color: #f9ffab;
    color: #333;
}

body::before {
    content: ''; /* This is required for pseudo-elements to work */
    position: fixed; /* Makes the overlay stay in place when scrolling */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* This applies your repeating texture */
    background-image: url('images/white-texture.png');
    background-repeat: repeat;

    /* This makes the texture subtle and not distracting */
    opacity: 1.0; 

    /* This is the key: it places the overlay behind your content */
    z-index: -1; 
}

header {
    text-align: center;
    margin-bottom: 40px;
}

#logo {
    max-width: 375px;
    width: 90%;
    height: auto;
}

/* Product Grid Layout */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    padding: 0 10px;
}

/* Individual Product Card Styles */
.product-card {
    border: 1px solid #eee;
    border-radius: 12px;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Helps align content vertically */
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.product-image-container {
    width: 100%;
    height: 220px;
    position: relative;
    margin-bottom: 15px;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease-in-out;
}

.product-image.hover-image {
    opacity: 0;
}

.product-image-container:hover .hover-image {
    opacity: 1;
}

.product-card h3 {
    margin: 0 0 10px 0;
}

.product-card p {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    font-weight: bold;
}

/* NEW: Styles for the image-based "Add to Cart" button */
.product-add-btn {
    width: 80%;
    height: auto;
    cursor: pointer;
    margin: auto auto 20px auto; /* Pushes button to bottom and centers it */
    transition: transform 0.2s ease;
}

.product-add-btn:hover {
    transform: scale(1.05);
}

/* Cart Section at the Bottom */
#cart-section {
    max-width: 800px;
    margin: 60px auto 40px auto;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
}

/* Styles for individual items within the cart */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.remove-from-cart-btn {
    background-color: #e0e0e0;
    color: #333;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.remove-from-cart-btn:hover {
    background-color: #c7c7c7;
    color: #000;
}

/* =================================== */
/* === NEW STYLES ADDED BELOW      === */
/* =================================== */

/* Styles for the Notification Pop-up */
#notification-popup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

#notification-popup.success {
    background-color: #28a745; /* Green for success */
}

#notification-popup.remove {
    background-color: #dc3545; /* Red for removal */
}

#notification-popup.hidden {
    opacity: 0;
    transform: translate(-50%, -50px);
}

/* Styles for the Floating Navigation Buttons */
.floating-btn {
    position: fixed;
    bottom: 20px;
    padding: 12px 18px;
    background-color: #E84A5F;
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.floating-btn:hover {
    transform: scale(1.1);
}

#go-to-cart-btn {
    right: 20px;
}

#back-to-top-btn {
    left: 20px;
}

#back-to-top-btn.hidden {
    opacity: 0;
    pointer-events: none; /* Prevents clicking when hidden */
}