*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --bg-input: #1e1e1e;
  --border: #2a2a2a;
  --text: #f0f0f0;
  --text-muted: #888;
  --accent: #e0e0e0;
  --primary: #fff;
  --primary-bg: #f0f0f0;
  --primary-hover: #d0d0d0;
  --danger: #ff4444;
  --success: #00c853;
  --warning: #ffd600;
  --radius: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

a { color: var(--accent); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -0.02em; }

/* NAV */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(10,10,10,0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.5rem; font-weight: 900; color: var(--text); letter-spacing: 0.05em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; font-size: 0.95rem; }
.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--text); }
.cart-link { position: relative; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }
.mobile-menu { padding: 1rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.mobile-menu a { color: var(--text-muted); }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
}

/* DISCOUNT BANNER */
#discount-banner { background: var(--warning); color: #000; text-align: center; padding: 0.6rem 1rem; font-weight: 700; font-size: 0.9rem; position: fixed; top: 0; left: 0; right: 0; z-index: 101; }
#discount-banner ~ nav { top: 38px; }
#discount-banner ~ #hero { margin-top: 38px; }

/* HERO */
#hero { margin-top: 60px; min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%); background-size: cover; background-position: center; position: relative; overflow: hidden; }
#hero::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.hero-content { position: relative; z-index: 1; padding: 2rem; }
.hero-content h1 { font-size: clamp(2rem, 6vw, 4rem); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.hero-content p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 2rem; }

/* BUTTONS */
.btn { display: inline-block; padding: 0.75rem 2rem; border: none; border-radius: var(--radius); cursor: pointer; font-size: 0.95rem; font-weight: 600; transition: all 0.2s; text-align: center; }
.btn-primary { background: var(--primary-bg); color: #000; }
.btn-primary:hover { background: var(--primary-hover); color: #000; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn-full { width: 100%; }

/* SECTION */
.section-title { text-align: center; font-size: 2rem; margin: 4rem 0 2rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* PRODUCT GRID */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; padding-bottom: 3rem; }
.product-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: all 0.3s; }
.product-card:hover { border-color: #444; transform: translateY(-2px); }
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-card-body { padding: 1rem; }
.product-card-body h4 { margin-bottom: 0.25rem; }
.product-card-body .category { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.product-card-body .price { font-size: 1.1rem; font-weight: 700; margin-top: 0.5rem; }
.product-placeholder { width: 100%; aspect-ratio: 1; background: var(--bg-input); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 3rem; }

/* CUSTOM SECTIONS */
.custom-section { padding: 4rem 0; }
.custom-section-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.custom-section:nth-child(even) .custom-section-inner { direction: rtl; }
.custom-section:nth-child(even) .custom-section-inner > * { direction: ltr; }
.custom-section-text h2 { font-size: 2rem; margin-bottom: 1rem; }
.custom-section-text p { color: var(--text-muted); margin-bottom: 1.5rem; }
.custom-section img { width: 100%; border-radius: var(--radius); }
@media (max-width: 768px) {
  .custom-section-inner { grid-template-columns: 1fr; }
  .custom-section:nth-child(even) .custom-section-inner { direction: ltr; }
}

/* NEWSLETTER */
.newsletter-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 3rem; text-align: center; margin: 4rem 0; }
.newsletter-box h2 { margin-bottom: 0.5rem; }
.newsletter-box p { color: var(--text-muted); margin-bottom: 1.5rem; }
.newsletter-form { display: flex; gap: 0.5rem; max-width: 600px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.newsletter-form input { flex: 1; min-width: 180px; }

/* SEO CONTENT BLOCK */
#homepage-seo { border-top: 1px solid var(--border); margin-top: 2rem; display: block; }
.seo-content-block { max-width: 900px; margin: 0 auto; padding: 3rem 1.5rem 2.5rem; }
.seo-content-block h2 { font-size: 1.6rem; margin-bottom: 1rem; color: var(--text); line-height: 1.4; }
.seo-content-block h3 { font-size: 1.2rem; margin-top: 1.5rem; margin-bottom: 0.5rem; color: var(--text); }
.seo-content-block p { color: var(--text-muted); line-height: 1.7; margin-bottom: 1rem; font-size: 0.95rem; }
.seo-content-block ul, .seo-content-block ol { color: var(--text-muted); margin-left: 1.5rem; margin-bottom: 1rem; line-height: 1.7; }
.seo-content-block a { color: var(--accent); text-decoration: underline; }
.seo-content-block:empty { display: none; }

/* FOOTER */
footer { border-top: 1px solid var(--border); padding: 2rem 0; text-align: center; color: var(--text-muted); font-size: 0.85rem; }
footer a { color: var(--text-muted); }

.auth-divider { display: flex; align-items: center; gap: 1rem; margin: 1.25rem 0; color: var(--text-muted); font-size: 0.85rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.google-btn-wrap { display: flex; justify-content: center; min-height: 44px; }

/* INPUTS */
input, textarea, select { background: var(--bg-input); border: 1px solid var(--border); color: var(--text); padding: 0.7rem 1rem; border-radius: var(--radius); font-size: 0.95rem; width: 100%; outline: none; transition: border-color 0.2s; font-family: var(--font); }
input:focus, textarea:focus, select:focus { border-color: #555; }
label { display: block; margin-bottom: 1rem; font-size: 0.9rem; color: var(--text-muted); }
label input, label textarea, label select { margin-top: 0.3rem; }

/* MODAL */
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.8); display: flex; align-items: center; justify-content: center; padding: 1rem; overflow-y: auto; }
.modal-content { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; max-width: 600px; width: 100%; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 800px; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; z-index: 1; }

/* PRODUCT DETAIL */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.product-detail img { width: 100%; border-radius: var(--radius); }
.product-detail-info h2 { margin-bottom: 0.5rem; }
.product-detail-info .category { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; margin-bottom: 1rem; }
.product-detail-info .description { color: var(--text-muted); margin-bottom: 1.5rem; }
.variant-select { margin-bottom: 1rem; }
.variant-option { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.5rem; cursor: pointer; transition: border-color 0.2s; }
.variant-option:hover, .variant-option.selected { border-color: var(--text); }
.variant-option .v-name { flex: 1; }
.variant-option .v-price { font-weight: 700; }
.qty-control { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.qty-control button { width: 36px; height: 36px; background: var(--bg-input); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }
.qty-control span { font-size: 1.1rem; min-width: 2rem; text-align: center; }
@media (max-width: 640px) {
  .product-detail { grid-template-columns: 1fr; }
}

/* CART DRAWER */
.cart-overlay { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,0.6); }
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 100vw; z-index: 151; background: var(--bg); border-left: 1px solid var(--border); display: flex; flex-direction: column; }
.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; border-bottom: 1px solid var(--border); }
.cart-header h3 { margin: 0; }
.cart-header .modal-close { position: static; }
#cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
#cart-footer { padding: 1.5rem; border-top: 1px solid var(--border); }
.cart-total { font-size: 1.1rem; margin-bottom: 1rem; display: flex; justify-content: space-between; }
.cart-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 4px; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.cart-item-info .variant { font-size: 0.8rem; color: var(--text-muted); }
.cart-item-info .item-price { font-weight: 700; margin-top: 0.3rem; }
.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
.cart-item-actions .qty-control { margin: 0; }
.cart-item-actions .qty-control button { width: 28px; height: 28px; font-size: 1rem; }
.cart-item-actions .remove-btn { color: var(--danger); background: none; border: none; cursor: pointer; font-size: 0.8rem; }
.cart-empty { text-align: center; color: var(--text-muted); padding: 3rem 0; }

/* ALERTS */
.alert { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: rgba(255,68,68,0.15); color: #ff6666; border: 1px solid rgba(255,68,68,0.3); }
.alert-success { background: rgba(0,200,83,0.15); color: #66ff99; border: 1px solid rgba(0,200,83,0.3); }

/* TAB BAR */
.tab-bar { display: flex; gap: 0; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.tab-bar button { flex: 1; background: transparent; border: none; color: var(--text-muted); padding: 0.75rem; cursor: pointer; font-size: 0.95rem; border-bottom: 2px solid transparent; transition: all 0.2s; }
.tab-bar button.active { color: var(--text); border-bottom-color: var(--text); }

/* AUTH FORM */
.auth-form { padding-top: 1rem; }

/* ORDERS */
.order-card { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; }
.order-card h4 { margin-bottom: 0.5rem; }
.order-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; }
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 1rem; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.badge-pending { background: rgba(255,214,0,0.2); color: #ffd600; }
.badge-processing { background: rgba(0,100,255,0.2); color: #6699ff; }
.badge-shipped { background: rgba(0,200,83,0.2); color: #66ff99; }
.badge-delivered { background: rgba(0,200,83,0.3); color: #00c853; }
.badge-cancelled { background: rgba(255,68,68,0.2); color: #ff6666; }

.tracking-timeline { margin-top: 1rem; padding-left: 1.5rem; border-left: 2px solid var(--border); }
.tracking-event { padding: 0.5rem 0 0.5rem 1rem; position: relative; }
.tracking-event::before { content: ''; position: absolute; left: -1.75rem; top: 0.75rem; width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); border: 2px solid var(--bg); }
.tracking-event:last-child::before { background: var(--success); }
.tracking-event .t-status { font-weight: 700; }
.tracking-event .t-meta { font-size: 0.8rem; color: var(--text-muted); }

.order-items-table { width: 100%; font-size: 0.9rem; border-collapse: collapse; margin-top: 0.5rem; }
.order-items-table th, .order-items-table td { padding: 0.4rem 0.5rem; text-align: left; border-bottom: 1px solid var(--border); }
.order-items-table th { color: var(--text-muted); font-weight: 600; }

/* SUCCESS SCREEN */
.success-screen { text-align: center; padding: 3rem; }
.success-screen h2 { color: var(--success); margin-bottom: 1rem; }

/* SEARCH & FILTERS */
.product-filters { display: flex; gap: 1rem; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.product-filters input { flex: 2; }
.product-filters select { flex: 1; min-width: 140px; }

/* SOLD OUT BADGE */
.product-card { position: relative; }
.product-share-row { display: flex; gap: 0.4rem; padding: 0 1rem 0.75rem; }
.product-share-row .share-icon { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg); color: var(--text-muted); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.product-share-row .share-icon:hover { border-color: var(--accent); color: var(--accent); background: rgba(255,204,0,0.08); }
.product-share-row .share-icon.copied { border-color: #4caf50; color: #4caf50; }
.sold-out-badge { position: absolute; top: 1rem; left: 1rem; background: var(--danger); color: #fff; padding: 0.25rem 0.75rem; border-radius: var(--radius); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; z-index: 2; }

/* RATING STARS */
.rating-stars { color: var(--warning); font-size: 0.85rem; margin-top: 0.3rem; }
.rating-stars span { color: var(--text-muted); font-size: 0.8rem; }
.product-rating { color: var(--warning); margin-bottom: 0.5rem; }

/* IMAGE GALLERY */
.product-gallery img { width: 100%; border-radius: var(--radius); }
.gallery-thumbs { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.gallery-thumbs img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 2px solid transparent; opacity: 0.6; transition: all 0.2s; }
.gallery-thumbs img.active, .gallery-thumbs img:hover { border-color: var(--text); opacity: 1; }

/* WISHLIST */
.wishlist-btn { margin-bottom: 1rem; }
.wishlist-btn .heart { color: var(--danger); }
.wishlist-btn.wishlisted { border-color: var(--danger); }
.wishlist-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--border); align-items: center; }
.wishlist-item img { width: 70px; height: 70px; object-fit: cover; border-radius: 4px; }
.wishlist-item-info { flex: 1; }
.wishlist-item-info h4 { margin-bottom: 0.2rem; }
.wishlist-item-actions { display: flex; gap: 0.5rem; }

/* VARIANT OUT OF STOCK */
.variant-option.out-of-stock { opacity: 0.5; cursor: not-allowed; }
.text-danger { color: var(--danger); }

/* REVIEWS */
.product-reviews-section, .related-products-section { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.reviews-wrapper h3, .related-products-section h3 { margin-bottom: 1.5rem; }
.review-form { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.review-form h4 { margin-bottom: 1rem; }
.review-form input, .review-form textarea { margin-bottom: 0.75rem; }
.star-input { margin-bottom: 1rem; }
.star-pick { font-size: 1.5rem; cursor: pointer; color: var(--text-muted); transition: color 0.2s; }
.star-pick.active, .star-pick:hover { color: var(--warning); }
.review-card { background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 0.75rem; }
.review-header { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 0.5rem; flex-wrap: wrap; }
.review-stars { color: var(--warning); }
.review-author { font-weight: 600; font-size: 0.9rem; }
.review-date { color: var(--text-muted); font-size: 0.8rem; }
.review-card h4 { margin-bottom: 0.3rem; font-size: 0.95rem; }
.review-card p { color: var(--text-muted); font-size: 0.9rem; }

/* RELATED PRODUCTS */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.related-grid .product-card img { aspect-ratio: 1; }

/* PROMO CODE */
.promo-section { margin-bottom: 1rem; }
.promo-input-row { display: flex; gap: 0.5rem; }
.promo-input-row input { flex: 1; }

/* FOOTER GRID */
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; text-align: left; padding: 2rem 0; }
.footer-grid h4 { margin-bottom: 0.75rem; font-size: 1rem; color: var(--text); }
.footer-grid p { margin-bottom: 0.3rem; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; text-align: center; }
.social-links { display: flex; flex-direction: column; gap: 0.3rem; }
.social-links a { color: var(--text-muted); font-size: 0.9rem; }
.social-links a:hover { color: var(--text); }

/* SIZE GUIDE */
.size-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.size-table th, .size-table td { padding: 0.75rem 1rem; text-align: center; border: 1px solid var(--border); }
.size-table th { background: var(--bg-input); color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.85rem; }
.size-table td { font-size: 0.95rem; }

/* TRUST BADGES */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; padding: 3rem 0; }
.trust-item { text-align: center; padding: 2rem 1rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.3s; }
.trust-item:hover { border-color: #444; }
.trust-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.trust-item h4 { margin-bottom: 0.5rem; font-size: 1rem; }
.trust-item p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.5; }

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .product-filters { flex-direction: column; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
}
