*{ margin: 0; padding: 0; box-sizing: border-box; }
body{ font-family: 'Roboto', sans-serif; background: #f4f4f4; color: #333; line-height: 1.6; }
:root{ --primary: #d32f2f; --dark: #1a1a1a; }
a{ text-decoration: none; color: inherit; }
ul{ list-style: none; }

.topbar{ background: var(--dark); color: white; padding: 10px 0; font-size: 13px; text-align: center; }

header{ background: white; padding: 15px 0; border-bottom: 3px solid var(--primary); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.container{ max-width: 1200px; margin: 0 auto; padding: 0 15px; display: flex; justify-content: space-between; align-items: center; }
.logo h1{ color: var(--primary); font-size: 28px; font-weight: 900; text-transform: uppercase; }

.header-right{ display: flex; align-items: center; gap: 12px; }
.auth-btn{ background: var(--primary); color: white; border: none; padding: 10px 16px; border-radius: 6px; font-weight: 700; cursor: pointer; transition: 0.3s; }
.auth-btn:hover{ background: #b71c1c; }

.hero{ background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.pexels.com/photos/100582/pexels-photo-100582.jpeg'); background-size: cover; background-position: center; height: 250px; display: flex; justify-content: center; align-items: center; text-align: center; color: white; }
.hero h2{ font-size: 40px; font-weight: 900; }

.main-content{ max-width: 1200px; margin: 0 auto; padding: 30px 15px; display: flex; gap: 30px; }
.sidebar{ width: 250px; flex-shrink: 0; }
.sidebar-box{ background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.sidebar-title{ background: var(--primary); color: white; padding: 15px; font-weight: 700; text-align: center; }
.sidebar-box ul li a{ display: block; padding: 12px 15px; border-bottom: 1px solid #eee; font-size: 14px; transition: 0.3s; }
.sidebar-box ul li a:hover{ background: #fff1f1; color: var(--primary); padding-left: 20px; }

.product-grid{ flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.product-card{ background: white; border-radius: 10px; overflow: hidden; border: 1px solid #eee; display: flex; flex-direction: column; transition: 0.3s; }
.product-card:hover{ transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.product-img{ height: 200px; background: #fff; padding: 10px; }
.product-img img{ width: 100%; height: 100%; object-fit: contain; }
.product-info{ padding: 15px; flex: 1; display: flex; flex-direction: column; }
.product-info h3{ font-size: 15px; height: 44px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 10px; font-weight: 700; }
.price{ color: var(--primary); font-size: 19px; font-weight: 900; margin-bottom: 15px; }
.btn-buy{ background: #222; color: white; padding: 10px; text-align: center; border-radius: 5px; cursor: pointer; font-weight: 700; margin-top: auto; transition: 0.3s; }
.btn-buy:hover{ background: var(--primary); }

footer{ background: var(--dark); color: white; padding: 40px 0 20px; margin-top: 30px; }
.footer-content{ max-width: 1200px; margin: 0 auto; padding: 0 15px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; }
.footer-bottom{ text-align: center; border-top: 1px solid #333; margin-top: 30px; padding-top: 20px; color: var(--primary); font-weight: 900; font-size: 20px; }

.modal{ display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 2000; justify-content: center; align-items: center; backdrop-filter: blur(3px); }
.modal-content{ background: white; width: 95%; max-width: 400px; border-radius: 12px; overflow: hidden; position: relative; animation: slideUp 0.3s ease; }

.close{ position: absolute; right: 15px; top: 10px; font-size: 24px; cursor: pointer; color: #999; z-index: 10; }
.modal-tabs{ display: flex; background: #eee; }
.modal-tab{ flex: 1; text-align: center; padding: 15px; font-weight: 700; cursor: pointer; }
.modal-tab.active{ background: white; color: var(--primary); border-bottom: 3px solid var(--primary); }

.form-box{ padding: 25px; display: none; }
.form-box.active{ display: block; }

.input-group{ margin-bottom: 15px; }
.input-group input{ width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; }

.submit-btn{ width: 100%; background: var(--primary); color: white; border: none; padding: 12px; border-radius: 6px; }

@media(max-width: 850px){
    .main-content{ flex-direction: column; }
    .sidebar{ width: 100%; }
    .footer-content{ grid-template-columns: 1fr; }
}