:root {
    --primary-color: #D32F2F; 
    --primary-dark: #B71C1C;
    --accent-color: #FF9800; 
    --text-light: #FFFFFF;
    --text-dark: #111111;
    --background-dark: #111111; 
    --background-light: #FFFFFF;
    --font-main: 'Roboto', sans-serif;
    --font-heading: 'Oswald', sans-serif;
    --transition-smooth: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font-main); }
body { background-color: #f4f4f4; color: var(--text-dark); overflow-x: hidden; }

.container-inner { max-width: 1200px; margin: 0 auto; padding: 0 15px;}

/* HEADER */
.main-header { background-color: var(--background-light); position: sticky; top: 0; width: 100%; z-index: 1000; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.top-bar { background: var(--background-dark); color: var(--text-light); text-align: center; padding: 8px; font-size: 13px; }
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; max-width: 1300px; margin: 0 auto; position: relative; }
.logo { font-family: var(--font-heading); font-size: 30px; font-weight: bold; color: var(--text-dark); text-transform: uppercase; }
.logo span { color: var(--primary-color); }

/* NAV LINKS */
.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 700; font-size: 15px; text-transform: uppercase; position: relative; padding: 5px 0; transition: var(--transition-smooth); }
.nav-links > li { position: relative; padding: 10px 0; }
.arrow { font-size: 12px; margin-left: 4px; display: inline-block; transition: transform 0.3s ease; }
.dropdown:hover .arrow { transform: rotate(180deg); }
.dropdown-menu { position: absolute; top: 100%; left: 0; background-color: var(--background-light); min-width: 220px; box-shadow: 0 8px 20px rgba(0,0,0,0.1); border-radius: 6px; opacity: 0; visibility: hidden; transform: translateY(15px); transition: all 0.3s ease; z-index: 1000; list-style: none; padding: 10px 0; border: 1px solid #eee; }
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu li { width: 100%; }
.dropdown-menu a { display: block; padding: 12px 20px; font-size: 14px; font-weight: 500; text-transform: none; transition: 0.2s ease; }
.dropdown-menu a:hover { background-color: #f8f9fa; color: var(--primary-color); padding-left: 25px; }

/* ICONS & BUTTONS */
.nav-icons { display: flex; gap: 20px; color: var(--text-dark); font-size: 20px; align-items: center; }
.icon-cart { position: relative; cursor: pointer; }
.cart-count { position: absolute; top: -8px; right: -12px; background: var(--primary-color); color: white; font-size: 11px; padding: 2px 6px; border-radius: 50%; }

/* CATEGORY PAGE LAYOUT */
.category-page { padding: 20px 15px 60px; }
.breadcrumb { display: flex; list-style: none; padding: 15px 0; font-size: 14px; color: #666; }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li:not(:last-child)::after { content: '❯'; margin: 0 10px; font-size: 10px; color: #999; }
.breadcrumb a { color: #666; text-decoration: none; transition: 0.2s; }
.breadcrumb a:hover { color: var(--primary-color); }

.category-banner { width: 100%; height: 250px; border-radius: 8px; overflow: hidden; margin-bottom: 30px; }
.category-banner img { width: 100%; height: 100%; object-fit: cover; }

.category-layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; align-items: start; }

/* SIDEBAR FILTER */
.sidebar-filter { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.filter-group { margin-bottom: 25px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.filter-group:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.filter-title { font-family: var(--font-heading); font-size: 18px; margin-bottom: 15px; text-transform: uppercase; color: var(--primary-dark); }
.filter-list { list-style: none; }
.filter-list li { margin-bottom: 10px; }
.filter-list label { font-size: 14px; color: #444; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.2s; }
.filter-list label:hover { color: var(--primary-color); }
.filter-list input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary-color); cursor: pointer; }

/* MAIN PRODUCTS AREA */
.toolbar { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.toolbar-title h1 { display: inline-block; font-family: var(--font-heading); font-size: 24px; text-transform: uppercase; margin-right: 10px; }
.toolbar-title span { color: #666; font-size: 14px; }
.category-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* PRODUCT CARDS */
.bs-grid { display: grid; }
.bs-card { background: #fff; border-radius: 8px; padding: 15px; position: relative; border: 1px solid #eee; transition: 0.3s; }
.bs-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); border-color: var(--primary-color); }
.bs-badge { position: absolute; color: white; font-size: 12px; font-weight: bold; padding: 4px 8px; border-radius: 4px; z-index: 2; }
.hot-badge { top: 15px; left: 15px; background: #FF0000; }
.discount-badge { top: 15px; right: 15px; background: #FF9800; }
.bs-img { height: 220px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 15px; }
.bs-img img { max-width: 100%; max-height: 100%; object-fit: contain; transition: 0.3s; }
.bs-card:hover .bs-img img { transform: scale(1.05); }
.bs-name { font-size: 14px; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; height: 40px;}
.bs-price-wrap { display: flex; gap: 10px; margin-bottom: 15px; align-items: center; }
.bs-price-new { color: var(--primary-color); font-size: 18px; font-weight: bold; }
.bs-price-old { color: #aaa; font-size: 14px; text-decoration: line-through; }
.bs-add-btn { width: 100%; padding: 10px; background: #fff; color: var(--primary-color); border: 1px solid var(--primary-color); border-radius: 4px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.bs-add-btn:hover { background: var(--primary-color); color: white; }

/* PAGINATION */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.page-btn { width: 40px; height: 40px; border: 1px solid #ddd; background: #fff; border-radius: 4px; font-size: 16px; font-weight: bold; cursor: pointer; transition: 0.2s; color: var(--text-dark); display: flex; align-items: center; justify-content: center;}
.page-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.page-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* CART SYSTEM */
.cart-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 1001; display: none; opacity: 0; transition: opacity 0.3s ease; }
.cart-overlay.active { display: block; opacity: 1; }
.cart-sidebar { position: fixed; top: 0; right: -450px; width: 400px; max-width: 100%; height: 100vh; background: #fff; z-index: 1002; box-shadow: -5px 0 15px rgba(0,0,0,0.1); display: flex; flex-direction: column; transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
.cart-sidebar.active { right: 0; }
.cart-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.cart-header h2 { font-family: var(--font-heading); font-size: 24px; color: var(--primary-dark); }
.close-cart { font-size: 32px; background: none; border: none; cursor: pointer; color: #666; transition: 0.3s; line-height: 1; }
.close-cart:hover { color: var(--primary-color); transform: scale(1.1); }
.cart-items { flex: 1; overflow-y: auto; padding: 20px; }
.cart-item { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.cart-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid #eee; }
.cart-item-info { flex: 1; }
.cart-item-title { font-size: 14px; font-weight: 500; margin-bottom: 5px; line-height: 1.4; }
.cart-item-price { color: var(--primary-color); font-weight: bold; margin-bottom: 10px; }
.cart-item-quantity { display: flex; align-items: center; gap: 15px; }
.qty-btn { background: #f4f4f4; border: none; width: 28px; height: 28px; cursor: pointer; font-weight: bold; border-radius: 4px; transition: 0.2s; }
.qty-btn:hover { background: #ddd; }
.remove-item { color: #888; font-size: 13px; cursor: pointer; text-decoration: underline; transition: 0.2s; }
.remove-item:hover { color: var(--primary-color); }
.cart-footer { padding: 20px; border-top: 1px solid #eee; background: #fafafa; }
.cart-total { display: flex; justify-content: space-between; font-size: 18px; font-weight: bold; margin-bottom: 15px; color: var(--text-dark); }
.checkout-btn { width: 100%; padding: 15px; background: var(--primary-color); color: white; border: none; border-radius: 4px; font-family: var(--font-heading); font-size: 18px; cursor: pointer; transition: 0.3s; }
.checkout-btn:hover { background: var(--primary-dark); }

/* NEW FOOTER */
.main-footer { background-color: var(--background-dark); color: #ccc; padding-top: 50px; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding-bottom: 40px; }
.footer-col h3 { color: var(--text-light); font-family: var(--font-heading); font-size: 18px; text-transform: uppercase; margin-bottom: 20px; position: relative; padding-bottom: 10px; }
.footer-col h3::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; background: var(--primary-color); }
.footer-col p { font-size: 14px; line-height: 1.6; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul a { color: #ccc; text-decoration: none; font-size: 14px; transition: var(--transition-smooth); }
.footer-col ul a:hover { color: var(--primary-color); padding-left: 8px; }
.footer-bottom { background-color: #000; padding: 15px 0; font-size: 13px; color: #777; text-align: center;}

/* MOBILE MENU BARS */
.menu-toggle { display: none; cursor: pointer; color: var(--text-dark); margin-right: 15px; }

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
    /* Mobile Menu */
    .menu-toggle { display: block; }
    
    .nav-links {
        position: fixed; top: 0; left: -300px; width: 280px; height: 100vh;
        background-color: var(--background-light); flex-direction: column; gap: 0;
        padding-top: 60px; box-shadow: 2px 0 15px rgba(0,0,0,0.1);
        transition: left 0.3s ease; z-index: 1001; overflow-y: auto;
    }
    
    .nav-links.active { left: 0; }
    .nav-links > li { width: 100%; border-bottom: 1px solid #eee; padding: 0; }
    .nav-links a { display: block; padding: 15px 20px; }
    
    .dropdown-menu { position: static; box-shadow: none; border: none; opacity: 1; visibility: visible; transform: none; display: none; background-color: #f9f9f9; padding: 0; }
    .dropdown:hover .dropdown-menu { display: block; }
    .dropdown-menu a { padding-left: 40px; }

    /* Layout & Footer */
    .category-layout { grid-template-columns: 1fr; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .toolbar { flex-direction: column; align-items: flex-start; gap: 15px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .category-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .category-layout { gap: 20px; }
}