*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{--success:#16a34a;--danger:#dc2626;--warning:#f59e0b;--bg:#f8fafc;--bg-card:#fff;--text:#1e293b;--text-secondary:#64748b;--border:#e2e8f0;--radius:8px;--shadow:0 1px 3px rgba(0,0,0,.1);--max-width:1200px}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;background:var(--bg);color:var(--text);line-height:1.6}
a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;height:auto}
.container{max-width:var(--max-width);margin:0 auto;padding:0 1rem}
/* NAVBAR */
.navbar{background:var(--bg-card);border-bottom:1px solid var(--border);padding:.75rem 0;position:sticky;top:0;z-index:100}
.navbar .container{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.navbar-brand,.nav-brand{font-size:1.25rem;font-weight:700;color:var(--primary)}
.navbar-nav,.nav-links{display:flex;align-items:center;gap:1rem;list-style:none}
.navbar-nav a,.nav-links a{color:var(--text);font-weight:500}
.navbar-nav a:hover,.nav-links a:hover{text-decoration:none;color:var(--primary)}
.nav-search{display:flex;gap:.5rem}
.nav-search input{padding:.5rem;border:1px solid var(--border);border-radius:var(--radius);width:250px}
.nav-cart,.nav-links .badge{position:relative}
.cart-badge{position:absolute;top:-8px;right:-8px;background:var(--danger);color:#fff;font-size:.7rem;padding:2px 6px;border-radius:50%}
.nav-user-menu{position:relative}
.nav-user-btn{background:none;border:none;cursor:pointer;font-weight:600;color:var(--text);font-size:1rem}
.nav-dropdown{display:none;position:absolute;right:0;top:100%;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);min-width:180px;z-index:200;box-shadow:var(--shadow)}
.nav-user-menu:hover .nav-dropdown,.nav-dropdown:hover{display:block}
.nav-dropdown a{display:block;padding:.6rem 1rem;color:var(--text);font-weight:400}
.nav-dropdown a:hover{background:var(--bg);text-decoration:none}
.lang-switcher select{padding:.3rem;border:1px solid var(--border);border-radius:var(--radius)}
/* BUTTONS */
.btn{display:inline-block;padding:.6rem 1.2rem;border:none;border-radius:var(--radius);font-weight:600;cursor:pointer;text-align:center;transition:all .15s}
.btn:hover{text-decoration:none;opacity:.9}
.btn-primary{background:var(--primary);color:#fff}
.btn-outline{background:transparent;border:1px solid var(--border);color:var(--text)}
.btn-outline:hover{background:var(--bg)}
.btn-danger{background:var(--danger);color:#fff}
.btn-sm{padding:.4rem .8rem;font-size:.875rem}
.btn-lg{padding:.8rem 1.6rem;font-size:1.1rem}
.btn-block{display:block;width:100%}
.inline-form{display:inline}
/* HERO */
.hero-section{background:linear-gradient(135deg,var(--primary),var(--primary-dark));color:#fff;padding:4rem 1rem;text-align:center}
.hero-section h1{font-size:2.5rem;margin-bottom:1rem}
.hero-section .btn{background:#fff;color:var(--primary)}
/* SECTIONS */
.section{padding:3rem 1rem;max-width:var(--max-width);margin:0 auto}
.section-title{font-size:1.5rem;margin-bottom:1.5rem}
/* CATEGORY GRID */
.category-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:1rem}
.category-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:1.5rem;text-align:center;transition:all .2s}
.category-card:hover{box-shadow:var(--shadow);transform:translateY(-2px)}
.category-card h3{font-size:1rem;margin-top:.5rem}
/* PRODUCT GRID */
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1.5rem}
.product-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;transition:all .2s}
.product-card:hover{box-shadow:var(--shadow);transform:translateY(-2px)}
.product-card a{color:inherit;text-decoration:none}
.product-image{height:200px;background:#f1f5f9;display:flex;align-items:center;justify-content:center;position:relative}
.product-img-placeholder{font-size:3rem;color:var(--secondary)}
.badge-sale{position:absolute;top:8px;left:8px;background:var(--danger);color:#fff;padding:2px 8px;border-radius:var(--radius);font-size:.75rem;font-weight:600}
.product-info{padding:1rem}
.product-info h3{font-size:1rem;margin-bottom:.25rem}
.product-seller{font-size:.8rem;color:var(--text-secondary);margin-bottom:.25rem}
.product-price{margin-bottom:.25rem}
.price-current{font-weight:700;color:var(--primary)}
.price-current.large{font-size:1.5rem}
.price-old{text-decoration:line-through;color:var(--text-secondary);font-size:.9rem;margin-right:.5rem}
.product-rating{color:var(--warning);font-size:.9rem}
.star.filled{color:var(--warning)}
.star{color:#cbd5e1}
.rating-count{color:var(--text-secondary);font-size:.8rem}
.product-add-cart{padding:0 1rem 1rem}
/* CATALOG */
.catalog-layout{display:grid;grid-template-columns:250px 1fr;gap:2rem;max-width:var(--max-width);margin:0 auto;padding:2rem 1rem}
.catalog-sidebar{position:sticky;top:80px;align-self:start}
.category-list{list-style:none;margin-bottom:1.5rem}
.category-list li a{display:block;padding:.4rem .5rem;color:var(--text);border-radius:var(--radius)}
.category-list li a:hover,.category-list li a.active{background:var(--primary);color:#fff;text-decoration:none}
.filter-group{margin-top:1rem}
.filter-group h4{margin-bottom:.5rem;font-size:.9rem}
.filter-group select{width:100%;padding:.5rem;border:1px solid var(--border);border-radius:var(--radius)}
/* PRODUCT DETAIL */
.product-detail{display:grid;grid-template-columns:1fr 1fr;gap:3rem;max-width:var(--max-width);margin:0 auto;padding:2rem 1rem}
.product-detail-image{background:#f1f5f9;border-radius:var(--radius);display:flex;align-items:center;justify-content:center;min-height:400px}
.product-img-placeholder.large{font-size:6rem}
.product-detail-right h1{margin-bottom:.5rem}
.product-meta{display:flex;justify-content:space-between;color:var(--text-secondary);margin-bottom:1rem;font-size:.9rem}
.product-price-block{margin:1.5rem 0;padding:1rem;background:#f1f5f9;border-radius:var(--radius)}
.discount-badge{background:var(--danger);color:#fff;padding:2px 8px;border-radius:var(--radius);font-size:.85rem;margin-left:.5rem}
.product-stock{margin-bottom:1rem}
.in-stock{color:var(--success)}
.out-of-stock{color:var(--danger)}
.product-seller-block{padding:1rem;border:1px solid var(--border);border-radius:var(--radius);margin-bottom:1rem}
.product-buy-form{margin:1.5rem 0}
.product-buy-form label{display:block;margin-bottom:.25rem;font-weight:600}
.product-buy-form input[type=number]{width:80px;padding:.5rem;border:1px solid var(--border);border-radius:var(--radius);margin-bottom:1rem}
/* TABS */
.product-tabs{display:flex;gap:0;max-width:var(--max-width);margin:0 auto;padding:0 1rem;border-bottom:1px solid var(--border)}
.tab{padding:1rem 1.5rem;cursor:pointer;font-weight:600;color:var(--text-secondary);border-bottom:2px solid transparent}
.tab.active{color:var(--primary);border-bottom-color:var(--primary)}
.tab-content{display:none;max-width:var(--max-width);margin:0 auto;padding:2rem 1rem}
.tab-content.active{display:block}
/* AUTH */
.auth-page{display:flex;justify-content:center;padding:3rem 1rem}
.auth-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:2rem;width:100%;max-width:480px}
.auth-card h2{margin-bottom:1.5rem;text-align:center}
.auth-links{text-align:center;margin-top:1rem;color:var(--text-secondary)}
/* FORMS */
.form-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:2rem;max-width:var(--max-width)}
.form-group{margin-bottom:1rem}
.form-group label{display:block;margin-bottom:.25rem;font-weight:600}
.form-group input,.form-group select,.form-group textarea{width:100%;padding:.6rem;border:1px solid var(--border);border-radius:var(--radius)}
.form-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem}
/* TABLES */
.table{width:100%;border-collapse:collapse;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}
.table th,.table td{padding:.75rem 1rem;text-align:left;border-bottom:1px solid var(--border)}
.table th{background:#f1f5f9;font-weight:600;font-size:.85rem;text-transform:uppercase;color:var(--text-secondary)}
/* CART */
.cart-layout{display:grid;grid-template-columns:1fr 350px;gap:2rem;max-width:var(--max-width);margin:0 auto;padding:2rem 1rem}
.cart-item{display:flex;align-items:center;gap:1rem;background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:1rem;margin-bottom:1rem}
.cart-item-image{width:80px;height:80px;background:#f1f5f9;border-radius:var(--radius);display:flex;align-items:center;justify-content:center}
.cart-item-info{flex:1}
.cart-item-info h3{font-size:1rem}
.cart-item-price{color:var(--primary);font-weight:600}
.cart-item-qty input{width:60px;padding:.4rem;border:1px solid var(--border);border-radius:var(--radius);text-align:center}
.cart-item-total{font-weight:700;white-space:nowrap}
/* CART SUMMARY */
.cart-summary{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:1.5rem;position:sticky;top:80px}
.cart-summary h3{margin-bottom:1rem}
.cart-summary-row{display:flex;justify-content:space-between;padding:.4rem 0}
.cart-summary-row.total{font-size:1.25rem;font-weight:700;border-top:2px solid var(--border);margin-top:.5rem;padding-top:.5rem}
/* ORDERS */
.orders-list{max-width:var(--max-width);margin:0 auto;padding:0 1rem}
.order-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:1.5rem;margin-bottom:1rem}
.order-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}
.order-meta{display:flex;gap:1.5rem;color:var(--text-secondary);font-size:.9rem;margin-bottom:.5rem}
.order-status{padding:2px 8px;border-radius:var(--radius);font-size:.8rem;font-weight:600}
.status-pending{background:#fef3c7;color:#92400e}
.status-confirmed{background:#d1fae5;color:#065f46}
.status-shipped{background:#dbeafe;color:#1e40af}
.status-delivered{background:#d1fae5;color:#065f46}
.status-cancelled{background:#fee2e2;color:#991b1b}
/* ADDRESS */
.address-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem;margin-bottom:2rem}
.address-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:1.5rem}
.address-card.default{border-color:var(--primary)}
.badge{background:var(--primary);color:#fff;padding:2px 8px;border-radius:var(--radius);font-size:.75rem}
/* CHECKOUT */
.checkout-layout{display:grid;grid-template-columns:1fr 400px;gap:2rem;max-width:var(--max-width);margin:0 auto;padding:2rem 1rem}
.payment-options{display:flex;gap:1rem;margin:1rem 0}
.radio-card{border:1px solid var(--border);border-radius:var(--radius);padding:1rem;cursor:pointer;display:flex;align-items:center;gap:.5rem;flex:1}
.radio-card:has(input:checked){border-color:var(--primary);background:#eff6ff}
.radio-card input{margin:0}
/* DASHBOARD */
.dashboard-header{display:flex;justify-content:space-between;align-items:center;max-width:var(--max-width);margin:0 auto;padding:2rem 1rem 1rem}
.dashboard-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:1rem;max-width:var(--max-width);margin:0 auto 2rem;padding:0 1rem}
.stat-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:1.5rem;text-align:center}
.stat-value{font-size:1.75rem;font-weight:700;color:var(--primary)}
.stat-label{color:var(--text-secondary);font-size:.85rem;margin-top:.25rem}
/* EMPTY STATE */
.empty-state{text-align:center;padding:3rem;color:var(--text-secondary)}
.empty-state p{margin-bottom:1rem;font-size:1.1rem}
/* ALERTS */
.alert{padding:1rem;border-radius:var(--radius);margin-bottom:1rem}
.alert-error{background:#fee2e2;color:#991b1b;border:1px solid #fca5a5}
.alert-success{background:#d1fae5;color:#065f46;border:1px solid #6ee7b7}
/* REVIEW */
.review-item{border-bottom:1px solid var(--border);padding:1rem 0}
.review-header{display:flex;justify-content:space-between;align-items:center}
/* FOOTER */
.footer{background:#1e293b;color:#94a3b8;padding:2rem 1rem;margin-top:3rem}
.footer-content{max-width:var(--max-width);margin:0 auto}
.footer-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:2rem}
.footer-col h4{color:#e2e8f0;margin-bottom:.75rem}
.footer-col a,.footer-col p{display:block;color:#94a3b8;margin-bottom:.5rem;font-size:.9rem}
.footer-col a:hover{color:#e2e8f0;text-decoration:none}
.footer-col select{padding:.4rem;border:1px solid #475569;border-radius:var(--radius);background:#334155;color:#e2e8f0}
/* MESSAGES */
.messages-list{max-width:var(--max-width);margin:0 auto;padding:0 1rem}
.message-card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--radius);padding:1.5rem;margin-bottom:1rem}
.message-card.unread{border-left:3px solid var(--primary)}
.message-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.5rem}
.message-date{color:var(--text-secondary);font-size:.8rem}
.message-product{color:var(--text-secondary);font-size:.85rem;margin-bottom:.5rem}
.message-body{margin-top:.5rem}
/* RESPONSIVE */
@media(max-width:768px){
  .catalog-layout,.cart-layout,.checkout-layout{grid-template-columns:1fr}
  .product-detail{grid-template-columns:1fr}
  .catalog-sidebar{position:static}
  .navbar .container{flex-direction:column}
  .nav-search input{width:100%}
  .hero-section h1{font-size:1.75rem}
}

/* Coupon section */
.coupon-section{margin:.5rem 0}
.coupon-input-row{display:flex;gap:.5rem;align-items:center}
.coupon-input-row input{flex:1;padding:.5rem;border:1px solid var(--border);border-radius:var(--radius);text-transform:uppercase}
.coupon-message{font-size:.85rem;margin-top:.3rem;min-height:1.2em}
.coupon-message.success{color:var(--success,#16a34a)}
.coupon-message.error{color:var(--danger,#dc2626)}

/* Badges */
.badge{display:inline-block;padding:2px 8px;border-radius:4px;font-size:.75rem;font-weight:600;white-space:nowrap}
.badge-blue{background:#dbeafe;color:#1d4ed8}
.badge-green{background:#dcfce7;color:#16a34a}
.badge-gray{background:#f1f5f9;color:#64748b}

/* Form help text */
.form-help{font-size:.8rem;color:var(--text-secondary);margin:-.5rem 0 .8rem}
