/* Base Styles with Lemon Gradient Background */
body {
    font-family: 'Poppins', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, #fffacd, #f0e68c, #adff2f);
    color: #333;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    color: #333;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.search-bar {
    margin: 10px 0;
}

.search-bar input {
    padding: 8px;
    width: 220px;
    border: 2px solid #fff;
    border-radius: 20px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    border-color: #adff2f;
    outline: none;
}

.search-bar button {
    padding: 8px 15px;
    background: #adff2f;
    color: #333;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-bar button:hover {
    background: #9acd32;
}

/* Catchy Filters */
.filters {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

.filters label {
    margin-right: 10px;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    font-size: 1.1em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.filters select {
    padding: 10px 15px;
    font-size: 1em;
    border: none;
    border-radius: 25px;
    background: #fff;
    color: #333;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 35px;
}

.filters select:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.filters select:focus {
    outline: none;
    box-shadow: 0 0 5px #adff2f;
}

/* Cart Icon and View Cart Button */
.cart-info {
    text-align: right;
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.cart-icon {
    font-size: 1.5em;
    color: #333;
    background: #fff;
    padding: 5px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.cart-info:hover .cart-icon {
    transform: scale(1.1);
}

.cart-icon.bounce {
    animation: bounce 0.5s ease; /* Bounce when item added */
}

#cartCount {
    font-weight: bold;
    color: #333;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

#viewCartButton {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#viewCartButton:hover {
    background: #0056b3;
}

/* Catalogue and Card Animations */
.catalogue-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.5s ease forwards; /* Fade-in animation */
    opacity: 0; /* Start hidden for animation */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.product-image {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.specs ul {
    list-style: none;
    padding: 0;
    font-size: 0.9em;
}

.price {
    font-size: 1.2em;
    color: #28a745;
    margin: 10px 0;
}

.tagline {
    font-style: italic;
    color: #666;
}

.accessory {
    color: #888;
    font-size: 0.9em;
}

.add-to-cart, .quick-view {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.add-to-cart {
    background: #007bff;
    color: white;
}

.quick-view {
    background: #ffc107;
    color: #333;
}

.add-to-cart:hover, .quick-view:hover {
    animation: pulse 0.5s infinite; /* Pulse on hover */
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    color: white;
    font-weight: bold;
}

.badge.new {
    background-color: #ff4444;
}

.badge.bestseller {
    background-color: #28a745;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 20px;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    text-align: center;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
}

.modal-image {
    width: 100%;
    max-height: 250px;
    object-fit: contain;
    border-radius: 10px;
}

/* Cart Modal Specific Styles */
.cart-total {
    font-size: 1.2em;
    font-weight: bold;
    margin: 15px 0;
    color: #28a745;
}

#cartItems {
    text-align: left;
    margin-bottom: 20px;
}

#cartItems ul {
    list-style: none;
    padding: 0;
}

#cartItems li {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

#clearCartButton {
    padding: 10px 20px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#clearCartButton:hover {
    background: #cc3333;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes bounce {
    0% { transform: translateY(0); }
    20% { transform: translateY(-10px); }
    50% { transform: translateY(0); }
    80% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}