/* =========================================
   1. BASE & VARIABLES
   ========================================= */
:root {
    --primary: #d32f2f;
    --primary-dark: #b71c1c;
    --secondary: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 10px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }
body { background-color: var(--secondary); color: var(--text-dark); line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* =========================================
   2. NAVIGATION
   ========================================= */
header { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 1000; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.logo span { color: var(--text-dark); }
.nav-links { display: flex; gap: 2rem; }
.nav-links a { font-weight: 600; font-size: 0.95rem; position: relative; padding: 0.5rem 0; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a.active::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background: var(--primary); border-radius: 2px; }
.cart-icon { position: relative; font-size: 1.5rem; cursor: pointer; user-select: none; }
.cart-count { position: absolute; top: -8px; right: -10px; background: var(--primary); color: white; font-size: 0.7rem; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.hamburger { display: none; font-size: 1.5rem; cursor: pointer; }

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero {
    background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)), url('https://images.unsplash.com/photo-1607623814075-e51df1bdc82f?auto=format&fit=crop&w=1920&q=80');
    background-size: cover; background-position: center; background-attachment: fixed;
    height: 75vh; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white);
}
.hero-content h1 { font-size: 3.5rem; margin-bottom: 1rem; font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero-content p { font-size: 1.25rem; margin-bottom: 2rem; opacity: 0.9; max-width: 600px; margin-left: auto; margin-right: auto; }
.btn { background: var(--primary); color: var(--white); padding: 1rem 2.5rem; border: none; border-radius: 50px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: var(--transition); display: inline-block; box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4); }
.btn:hover { background: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(211, 47, 47, 0.6); }

/* =========================================
   4. CORE SECTIONS (Shared Styles)
   ========================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section-padding { padding: 5rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2.5rem; color: var(--text-dark); margin-bottom: 0.5rem; font-weight: 700; }
.section-title p { color: var(--text-light); font-size: 1.1rem; }
.section-title span { color: var(--primary); }

/* =========================================
   5. CATEGORIES GRID
   ========================================= */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.category-card { background: var(--white); border-radius: 15px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); text-align: center; }
.category-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.category-card .icon { height: 200px; overflow: hidden; }
.category-image { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.category-card:hover .category-image { transform: scale(1.1); }
.category-card h3 { padding: 1.2rem; color: var(--text-dark); font-weight: 700; font-size: 1.2rem; }

/* =========================================
   6. WHY CHOOSE US (Features)
   ========================================= */
.features-section { background: var(--white); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.feature-card { text-align: center; padding: 2rem; border-radius: 15px; background: var(--secondary); transition: var(--transition); }
.feature-card:hover { background: var(--white); box-shadow: var(--shadow-hover); transform: translateY(-5px); }
.feature-icon { width: 70px; height: 70px; background: rgba(211, 47, 47, 0.1); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; font-size: 2rem; }
.feature-card h3 { margin-bottom: 0.8rem; font-size: 1.2rem; }
.feature-card p { color: var(--text-light); font-size: 0.95rem; }

/* =========================================
   7. ABOUT US SECTION
   ========================================= */
.about-section { background: var(--secondary); }
.about-container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-image { border-radius: 15px; overflow: hidden; box-shadow: var(--shadow-hover); }
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-content h2 { font-size: 2.5rem; margin-bottom: 1.5rem; line-height: 1.2; }
.about-content p { color: var(--text-light); margin-bottom: 1.5rem; font-size: 1.05rem; }
.about-list { margin-bottom: 2rem; }
.about-list li { display: flex; align-items: center; gap: 10px; margin-bottom: 0.8rem; font-weight: 600; color: var(--text-dark); }
.about-list li::before { content: '✓'; color: var(--primary); font-weight: bold; font-size: 1.2rem; }

/* =========================================
   8. TESTIMONIALS
   ========================================= */
.testimonials-section { background: var(--white); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.testimonial-card { background: var(--secondary); padding: 2rem; border-radius: 15px; position: relative; }
.testimonial-card::before { content: '"'; position: absolute; top: 10px; left: 20px; font-size: 4rem; color: var(--primary); opacity: 0.2; font-family: serif; }
.testimonial-text { font-style: italic; color: var(--text-dark); margin-bottom: 1.5rem; position: relative; z-index: 1; }
.testimonial-author { display: flex; align-items: center; gap: 1rem; }
.author-avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.2rem; }
.author-info h4 { font-size: 1rem; margin-bottom: 0.2rem; }
.author-info .stars { color: #ffc107; font-size: 0.9rem; }

/* =========================================
   9. PRODUCT PAGES STYLES
   ========================================= */
.page-header {
    position: relative; background-size: cover; background-position: center; padding: 6rem 2rem; text-align: center; color: var(--white);
}
.page-header::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 1; }
.page-header h1, .page-header p { position: relative; z-index: 2; }
.page-header h1 { font-size: 3rem; margin-bottom: 0.5rem; font-weight: 800; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; margin-top: 2rem; }
.product-card { background: var(--white); border-radius: 15px; padding: 1rem; box-shadow: var(--shadow); transition: var(--transition); display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.product-image { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: 1rem; }
.product-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; color: var(--text-dark); min-height: 50px; font-weight: 600; }
.product-card .price { font-size: 1.4rem; font-weight: 800; color: var(--primary); margin: 0.5rem 0; }
.product-card .unit { font-size: 0.9rem; color: var(--text-light); font-weight: 500; }
.product-card .note { font-size: 0.85rem; color: var(--text-light); font-style: italic; margin-top: -10px; margin-bottom: 10px; }
.add-to-cart { background: var(--text-dark); color: var(--white); border: none; padding: 0.8rem; border-radius: 8px; cursor: pointer; transition: var(--transition); font-weight: 600; margin-top: auto; }
.add-to-cart:hover { background: var(--primary); }

/* =========================================
   10. CART SIDEBAR
   ========================================= */
.cart-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1999; opacity: 0; visibility: hidden; transition: var(--transition); backdrop-filter: blur(3px); }
.cart-overlay.active { opacity: 1; visibility: visible; }
.cart-sidebar { position: fixed; top: 0; right: -450px; width: 400px; max-width: 90%; height: 100%; background: var(--white); z-index: 2000; box-shadow: -5px 0 30px rgba(0,0,0,0.2); transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); display: flex; flex-direction: column; }
.cart-sidebar.active { right: 0; }
.cart-header { background: var(--primary); color: var(--white); padding: 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.close-cart { background: none; border: none; color: var(--white); font-size: 2rem; cursor: pointer; line-height: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 1.5rem; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid #eee; gap: 1rem; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 0.95rem; margin-bottom: 0.3rem; }
.cart-item-info .item-price { font-size: 0.85rem; color: var(--text-light); }
.qty-controls { display: flex; align-items: center; gap: 0.5rem; background: var(--secondary); border-radius: 20px; padding: 0.2rem; }
.qty-btn { width: 28px; height: 28px; border: none; background: var(--white); border-radius: 50%; cursor: pointer; font-weight: bold; color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,0.1); transition: var(--transition); }
.qty-btn:hover { background: var(--primary); color: var(--white); }
.qty-value { min-width: 25px; text-align: center; font-weight: 600; font-size: 0.9rem; }
.remove-item { background: none; border: none; color: #999; cursor: pointer; font-size: 1.2rem; padding: 0.3rem; transition: var(--transition); }
.remove-item:hover { color: var(--primary); }
.cart-footer { border-top: 2px solid var(--secondary); padding: 1.5rem; background: var(--secondary); }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; font-size: 1.2rem; font-weight: 700; }
.cart-total .amount { color: var(--primary); font-size: 1.5rem; }
.whatsapp-btn { width: 100%; background: #25D366; color: var(--white); border: none; padding: 1rem; border-radius: 8px; font-size: 1rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem; transition: var(--transition); }
.whatsapp-btn:hover { background: #1ebe5d; transform: translateY(-2px); }
.whatsapp-btn:disabled { background: #ccc; cursor: not-allowed; transform: none; }

/* =========================================
   11. ENHANCED FOOTER
   ========================================= */
footer { background: #1a1a1a; color: #ccc; padding: 4rem 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; max-width: 1200px; margin: 0 auto; padding: 0 2rem 3rem; }
.footer-col h3 { color: var(--white); font-size: 1.3rem; margin-bottom: 1.5rem; position: relative; padding-bottom: 0.8rem; }
.footer-col h3::after { content: ''; position: absolute; bottom: 0; left: 0; width: 50px; height: 3px; background: var(--primary); }
.footer-col p { margin-bottom: 1rem; font-size: 0.95rem; line-height: 1.8; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: #ccc; transition: var(--transition); display: flex; align-items: center; gap: 8px; }
.footer-links a:hover { color: var(--primary); padding-left: 5px; }
.contact-info li { display: flex; gap: 12px; margin-bottom: 1rem; align-items: flex-start; }
.contact-info span { color: var(--primary); font-size: 1.1rem; margin-top: 3px; }
.footer-bottom { background: #111; text-align: center; padding: 1.5rem; margin-top: 2rem; font-size: 0.9rem; border-top: 1px solid #333; }

/* Toast notification */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px); background: var(--text-dark); color: var(--white); padding: 1rem 2rem; border-radius: 50px; z-index: 3000; opacity: 0; transition: all 0.4s ease; box-shadow: 0 10px 30px rgba(0,0,0,0.3); font-weight: 600; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =========================================
   12. RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
    .about-container { grid-template-columns: 1fr; gap: 2rem; }
    .hero-content h1 { font-size: 2.8rem; }
}
@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--white); flex-direction: column; padding: 1.5rem; box-shadow: var(--shadow); gap: 1rem; }
    .nav-links.active { display: flex; }
    .hero { height: 60vh; }
    .hero-content h1 { font-size: 2.2rem; }
    .page-header { padding: 4rem 1.5rem; }
    .page-header h1 { font-size: 2.2rem; }
}
@media (max-width: 480px) {
    .cart-sidebar { width: 100%; right: -100%; }
    .section-title h2 { font-size: 2rem; }
}