/* CSS Variables & Global Reset */
:root {
    --theme-color: #f2e4d3;
    --text-dark: #2c1e16;
    --accent-color: #8b5a2b;
    --accent-hover: #6b4423;
    --white: #ffffff;
    --light-bg: #fffaf5; /* Light color for mobile menu */
    --border-color: #d1c0a8;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--theme-color); color: var(--text-dark); line-height: 1.6; overflow-x: hidden; }

/* Header & Navigation */
header { background-color: var(--white); padding: 1rem 5%; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 100; }
.logo a { font-size: 1.8rem; font-weight: bold; color: var(--accent-color); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo img { height: 50px; width: 50px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-color); }

/* Desktop Navigation */
.desktop-nav { display: none; }
.nav-links { display: flex; gap: 20px; list-style: none; align-items: center; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 500; transition: 0.3s; }
.nav-links a:hover { color: var(--accent-color); }

/* Dropdown Menus */
.dropdown { position: relative; padding: 10px 0; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--white); box-shadow: 0 4px 10px rgba(0,0,0,0.1); list-style: none; min-width: 200px; z-index: 200; border-radius: 5px; overflow: hidden; }
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a { display: block; padding: 12px 15px; border-bottom: 1px solid #f0f0f0; }
.dropdown-menu li a:hover { background: var(--theme-color); }

.header-icons { display: flex; gap: 20px; align-items: center; }

/* Cart & Notification Tooltip */
.cart-icon { position: relative; cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; }
#cart-count { position: absolute; top: -10px; right: -10px; background: red; color: white; border-radius: 50%; padding: 2px 6px; font-size: 0.8rem; font-weight: bold; }
.cart-notification { visibility: hidden; opacity: 0; position: absolute; top: 150%; right: 0; background-color: var(--text-dark); color: var(--theme-color); padding: 10px 15px; border-radius: 8px; font-size: 0.9rem; white-space: nowrap; transition: 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.2); font-weight: bold; z-index: 300; }
.cart-notification::after { content: ''; position: absolute; bottom: 100%; right: 10px; border-width: 8px; border-style: solid; border-color: transparent transparent var(--text-dark) transparent; }
.cart-notification.show { visibility: visible; opacity: 1; transform: translateY(5px); }

.hamburger, .close-btn { font-size: 1.5rem; cursor: pointer; color: var(--text-dark); background: none; border: none; }

/* Mobile Menu (Light Theme) & Cart */
.mobile-menu, .cart-sidebar { position: fixed; top: 0; right: -100%; width: 350px; max-width: 100%; height: 100vh; background-color: var(--light-bg); box-shadow: -5px 0 15px rgba(0,0,0,0.1); transition: 0.3s ease-in-out; z-index: 1000; display: flex; flex-direction: column; padding: 1.5rem; overflow-y: auto; }
.cart-sidebar { background-color: var(--white); }
.mobile-menu.active, .cart-sidebar.active { right: 0; }
.mobile-menu ul { list-style: none; margin-top: 1rem; }
.mobile-menu > ul > li { margin-bottom: 1rem; border-bottom: 1px solid #eaddcc; padding-bottom: 0.5rem; }
.mobile-menu a { text-decoration: none; color: var(--text-dark); font-size: 1.1rem; font-weight: bold; display: block; transition: 0.2s; }
.mobile-menu a:hover { color: var(--accent-color); }
.mobile-sub-menu { list-style: none; padding-left: 15px; margin-top: 10px; display: none; }
.mobile-menu li.open .mobile-sub-menu { display: block; }
.mobile-sub-menu li { margin-bottom: 10px; border: none; padding: 0; }
.mobile-sub-menu a { font-size: 1rem; font-weight: 500; }
.menu-toggle-btn { float: right; background: none; border: none; font-size: 1.2rem; color: var(--accent-color); cursor: pointer; }

/* Cart Styling */
.cart-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; margin-bottom: 1rem; }
.cart-items { flex-grow: 1; overflow-y: auto; }
.cart-item { border-bottom: 1px solid #eee; padding: 10px 0; display: flex; justify-content: space-between; align-items: center; }
.checkout-btn { background-color: #25D366; color: white; border: none; padding: 1rem; font-size: 1.1rem; font-weight: bold; cursor: pointer; border-radius: 5px; display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 1rem; transition: 0.3s; }
.checkout-btn:hover { background-color: #128C7E; }

/* Homepage Hero Section */
.hero { background: linear-gradient(rgba(44, 30, 22, 0.8), rgba(44, 30, 22, 0.8)), url('hero-bg.jpg') center/cover; color: var(--white); text-align: center; padding: 6rem 5%; margin-bottom: 3rem; }
.hero h1 { font-size: 3.5rem; margin-bottom: 1rem; color: var(--theme-color); }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-btn { background-color: var(--accent-color); color: var(--white); padding: 15px 30px; text-decoration: none; font-size: 1.2rem; font-weight: bold; border-radius: 5px; transition: 0.3s; }
.hero-btn:hover { background-color: var(--accent-hover); }

/* Category Blocks */
.categories-section { padding: 2rem 5%; text-align: center; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.cat-card { background: var(--white); padding: 2rem; border-radius: 10px; text-decoration: none; color: var(--text-dark); font-weight: bold; font-size: 1.2rem; box-shadow: 0 4px 6px rgba(0,0,0,0.05); transition: 0.3s; border: 2px solid transparent; }
.cat-card:hover { transform: translateY(-5px); border-color: var(--accent-color); color: var(--accent-color); }

/* Products Main Grid */
main { padding: 3rem 5%; }
.section-title { text-align: center; margin-bottom: 2rem; font-size: 2.5rem; color: var(--accent-color); }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2.5rem; }
.product-card { background: var(--white); border-radius: 10px; padding: 1.5rem; box-shadow: 0 4px 6px rgba(0,0,0,0.05); text-align: center; transition: transform 0.3s; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }

/* Slider CSS */
.slider-container { position: relative; width: 100%; height: 350px; border-radius: 8px; overflow: hidden; margin-bottom: 1rem; background-color: #f9f9f9; border: 1px solid var(--border-color); }
.product-image { width: 100%; height: 100%; object-fit: contain; transition: opacity 0.3s ease-in-out; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.8); border: none; color: var(--text-dark); font-size: 1.2rem; cursor: pointer; padding: 8px 12px; border-radius: 50%; z-index: 10; transition: 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.slider-btn:hover { background: var(--accent-color); color: var(--white); }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }
.slide-indicator { position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.dot { width: 10px; height: 10px; background: rgba(0,0,0,0.3); border-radius: 50%; transition: 0.3s; }
.dot.active { background: var(--accent-color); }

.product-title { font-size: 1.2rem; margin-bottom: 0.5rem; height: 3rem; overflow: hidden; }
.product-code { font-size: 0.85rem; color: #777; margin-bottom: 1rem; }
.selectors { display: flex; justify-content: center; gap: 10px; margin-bottom: 1rem; }
select { padding: 8px; border: 1px solid var(--border-color); border-radius: 4px; background: var(--theme-color); cursor: pointer; font-weight: bold; outline: none; flex: 1; }
.add-to-cart-btn { background-color: var(--accent-color); color: var(--white); border: none; padding: 12px 20px; border-radius: 5px; cursor: pointer; font-weight: bold; width: 100%; transition: 0.3s; font-size: 1rem; }
.add-to-cart-btn:hover { background-color: var(--accent-hover); }

/* Detailed Footer */
footer { background-color: var(--text-dark); color: var(--theme-color); padding: 4rem 5% 1rem 5%; margin-top: 4rem; }
.footer-header { display: flex; align-items: center; gap: 15px; margin-bottom: 1.5rem; }
.footer-header img { height: 60px; width: 60px; background: white; border-radius: 50%; padding: 2px; object-fit: cover; }
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 3rem; }
.footer-section h3 { margin-bottom: 1.5rem; color: var(--white); font-size: 1.4rem; border-bottom: 2px solid var(--accent-color); padding-bottom: 0.5rem; display: inline-block; }
.footer-section p { font-size: 1.05rem; line-height: 1.8; margin-bottom: 1rem; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 1rem; }
.footer-section a { color: var(--theme-color); text-decoration: none; transition: color 0.3s; font-size: 1.05rem; }
.footer-section a:hover { color: var(--accent-color); text-decoration: underline; }
.social-icons { display: flex; gap: 15px; margin-top: 1.5rem; flex-wrap: wrap; }
.social-icons a { font-size: 1.8rem; text-decoration: none; }
.support-btn { display: inline-flex; align-items: center; gap: 10px; background: var(--accent-color); color: white; padding: 12px 20px; border-radius: 5px; text-decoration: none; margin-top: 10px; border: none; font-weight: bold; transition: 0.3s; }
.support-btn:hover { opacity: 0.9; }

/* Copyright Section */
.copyright-section { text-align: center; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid rgba(242, 228, 211, 0.2); font-size: 1rem; line-height: 2; }
.copyright-section a { color: var(--theme-color); text-decoration: none; transition: 0.3s; }
.copyright-section a:hover { color: var(--white); text-decoration: underline; }

/* Media Queries for Responsiveness */
@media (min-width: 992px) {
    .hamburger { display: none; }
    .desktop-nav { display: block; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero { padding: 4rem 5%; }
}
