:root {
    --primary-color: #4CAF50;
    --secondary-color: #FFC107;
    --background-color: #f0f8ea;
    --text-color: #333;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

.cart-icon-container {
    position: relative;
    cursor: pointer;
}

#cart-icon {
    width: 40px;
    height: 40px;
    filter: invert(1);
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--secondary-color);
    color: var(--text-color);
    font-weight: bold;
    border-radius: 50%;
    padding: 3px 7px;
    font-size: 0.9rem;
    border: 2px solid white;
    transition: transform 0.2s ease-in-out;
}

#cart-count.updated {
    transform: scale(1.3);
}

main {
    padding: 0 2rem 2rem 2rem;
    transition: filter 0.3s ease;
}

main.sidebar-open {
    filter: blur(4px);
    pointer-events: none;
}

.hero {
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('hero-background.png');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 6rem 2rem;
    margin: 0 -2rem; /* Extend to full width */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
}

.hero-content {
    max-width: 700px;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

.cta-button {
    background-color: var(--secondary-color);
    color: var(--text-color);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s, transform 0.3s;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
    background-color: #ffca28;
    transform: translateY(-3px);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-weight: 700;
}

#products-title {
    margin-top: 1rem;
    margin-bottom: 3rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.products-grid.sidebar-open {
    filter: blur(2px);
}

.product-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card img.product-image {
    max-width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.product-card:hover img.product-image {
    transform: scale(1.05);
}

.product-card h3 {
    margin: 0.5rem 0;
    font-size: 1.25rem;
}

.product-card .price {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.add-to-cart-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s, transform 0.2s, opacity 0.2s;
}

.add-to-cart-btn:disabled {
    background-color: #6eaf71;
    cursor: not-allowed;
    opacity: 0.8;
}

.add-to-cart-btn:hover:not(:disabled) {
    background-color: #45a049;
    transform: scale(1.05);
}

/* Reviews Section */
#reviews-section {
    margin-top: 4rem;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.review-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px var(--shadow-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 5px solid var(--primary-color);
}

.review-card .review-text {
    font-style: italic;
    color: #555;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
    position: relative;
    padding-left: 2rem;
}

.review-card .review-text::before {
    content: '“';
    position: absolute;
    left: -0.5rem;
    top: -1rem;
    font-size: 3.5rem;
    color: var(--primary-color);
    opacity: 0.8;
    font-family: Georgia, serif;
}

.review-author {
    text-align: right;
}

.review-author .author-name {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.review-author .stars {
    color: var(--secondary-color);
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.cart-sidebar {
    width: 380px;
    background: var(--card-bg);
    padding: 2rem;
    box-shadow: -4px 0 15px var(--shadow-color);
    position: fixed;
    right: -100%;
    top: 0;
    height: 100vh;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.cart-sidebar.open {
    right: 0;
}

.cart-sidebar h2 {
    margin-top: 0;
    text-align: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

#close-cart-button {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
}

#close-cart-button:hover {
    color: var(--text-color);
}

#cart-items-container {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    position: relative;
}

.cart-empty-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #888;
}

#cart-items {
    list-style: none;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 1rem;
}

.cart-item-info {
    flex-grow: 1;
    margin-right: 0.5rem;
}

.cart-item-info span {
    display: block;
}

.cart-item-info .item-name {
    font-weight: 600;
}

.cart-item-info .item-price {
    color: #888;
    font-size: 0.9rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
}

.quantity-controls .quantity {
    padding: 0 0.75rem;
    font-weight: 600;
}

.quantity-controls .quantity-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 26px;
    text-align: center;
    transition: background-color 0.2s, border-color 0.2s;
}

.quantity-controls .quantity-btn:hover {
    background-color: #eee;
    border-color: #aaa;
}

.cart-item .remove-item-btn {
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    width: 28px;
    height: 28px;
    font-weight: bold;
    line-height: 28px;
    text-align: center;
    transition: background-color 0.2s;
    font-size: 1.2rem;
    padding: 0;
}

.cart-item .remove-item-btn:hover {
    background-color: #45a049;
}

.cart-summary {
    border-top: 2px solid #eee;
    padding-top: 1rem;
    text-align: center;
}

.cart-summary p {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
}

#checkout-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.2s;
}

#checkout-button:hover {
    background-color: #45a049;
}

footer {
    text-align: left;
    padding: 3rem 2rem 0;
    background: #333;
    color: #ccc;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.footer-section p {
    line-height: 1.6;
}

.footer-section.links ul {
    list-style: none;
    padding: 0;
}

.footer-section.links ul li {
    margin-bottom: 0.75rem;
}

.footer-section.links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section.links a:hover {
    color: var(--secondary-color);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a img {
    width: 32px;
    height: 32px;
    opacity: 0.8;
    transition: opacity 0.2s, transform 0.2s;
}

.social-icons a:hover img {
    opacity: 1;
    transform: scale(1.1);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid #444;
    margin-top: 1rem;
    font-size: 0.9rem;
}