/* albom.az — main.css */
:root {
  --primary: #1a56db;
  --secondary: #fbbf24;
  --primary-dark: #1245b5;
  --primary-light: #eff6ff;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f5f7fa;
  --white: #ffffff;
  --success: #059669;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --transition: 0.2s ease;
  --header-h: 58px;
  --announce-h: 36px;
}

[data-theme="dark"] {
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --border: #374151;
  --bg: #111827;
  --white: #1f2937;
  --primary-light: #1e3a5f;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  padding-top: var(--header-h);
}
body.has-announce { padding-top: calc(var(--header-h) + var(--announce-h)); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* Announcement bar */
.announcement-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1001;
  background: var(--primary); color: #fff;
  text-align: center; font-size: 13px;
  padding: 8px 1rem; height: var(--announce-h);
}

/* Header */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000; background: var(--primary);
  height: var(--header-h); box-shadow: var(--shadow-md);
}
body.has-announce .site-header { top: var(--announce-h); }

.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1rem;
  height: 100%; display: flex; align-items: center; gap: 0.75rem;
}

.site-logo { flex-shrink: 0; }
.logo-text {
  font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -0.5px;
}
.logo-dot { color: var(--secondary); }

.main-nav {
  display: flex; gap: 2px; flex: 1;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; align-items: center;
  max-width: calc(100vw - 280px);
}
.main-nav::-webkit-scrollbar { display: none; }
.nav-link {
  display: flex; align-items: center; gap: 4px;
  color: rgba(255,255,255,0.85); font-size: 12px;
  padding: 5px 8px; border-radius: var(--radius-sm);
  white-space: nowrap; transition: var(--transition);
  flex-shrink: 0;
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.12); color: #fff;
}
.nav-link i { font-size: 14px; }

.header-actions { display: flex; gap: 4px; align-items: center; margin-left: auto; }

.btn-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: transparent; border: none; color: rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; position: relative; transition: var(--transition);
}
.btn-icon:hover { background: rgba(255,255,255,0.12); color: #fff; }
.cart-badge, .mob-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; background: var(--secondary);
  color: #0a0a0a; font-size: 10px; font-weight: 700;
  border-radius: 999px; display: flex; align-items: center;
  justify-content: center; padding: 0 3px; line-height: 1;
}

.menu-toggle { display: none; }
@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .main-nav {
    display: none; position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--primary); flex-direction: column;
    padding: 0.75rem; gap: 2px; z-index: 999;
    box-shadow: var(--shadow-md); overflow-y: auto;
    max-height: calc(100vh - var(--header-h));
    max-width: 100%;
  }
  .main-nav.open { display: flex; }
  .nav-link { font-size: 14px; padding: 10px 12px; }
}

/* Search bar */
.search-bar {
  display: none; background: var(--white);
  border-bottom: 1px solid var(--border);
  position: fixed; top: var(--header-h); left: 0; right: 0;
  z-index: 998;
}
body.has-announce .search-bar { top: calc(var(--header-h) + var(--announce-h)); }
.search-bar.open { display: block; }
.search-inner {
  max-width: 700px; margin: 0 auto; padding: 10px 1rem;
  display: flex; gap: 8px; align-items: center;
}
.search-inner form {
  flex: 1; display: flex; border: 1.5px solid var(--primary);
  border-radius: var(--radius); overflow: hidden;
}
.search-inner input {
  flex: 1; padding: 9px 14px; border: none; outline: none;
  font-size: 14px; background: transparent; color: var(--text);
}
.search-inner button[type=submit] {
  background: var(--primary); border: none; color: #fff;
  padding: 0 14px; font-size: 18px;
}
.search-close {
  background: none; border: none; font-size: 20px;
  color: var(--text-muted); padding: 4px;
}

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 2.5rem 0; }
.section-title {
  font-size: 22px; font-weight: 700; margin-bottom: 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.section-title a { font-size: 13px; color: var(--primary); font-weight: 400; }

/* Hero/Slider */
.hero-slider { background: var(--primary); position: relative; overflow: hidden; }
.hero-slide {
  display: flex; align-items: center; min-height: 360px;
  padding: 3rem 1.5rem; max-width: 1200px; margin: 0 auto;
  gap: 2rem;
}
.hero-content { flex: 1; color: #fff; }
.hero-eyebrow { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.7); margin-bottom: 0.75rem; }
.hero-title { font-size: clamp(24px, 4vw, 42px); font-weight: 800; line-height: 1.2;
  margin-bottom: 1rem; }
.hero-title em { color: var(--secondary); font-style: normal; }
.hero-sub { font-size: 15px; color: rgba(255,255,255,0.8); margin-bottom: 1.5rem; max-width: 440px; }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-primary {
  background: var(--secondary); color: #0a0a0a; border: none;
  padding: 11px 24px; border-radius: var(--radius); font-size: 14px;
  font-weight: 600; transition: var(--transition);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-outline-white {
  background: transparent; color: #fff;
  border: 1.5px solid rgba(255,255,255,0.4);
  padding: 10px 22px; border-radius: var(--radius); font-size: 14px;
  transition: var(--transition);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); }
.hero-image { flex: 0 0 300px; display: flex; align-items: center; justify-content: center; }
.hero-image i { font-size: 100px; color: rgba(255,255,255,0.15); }

/* Stats bar */
.stats-bar {
  background: var(--secondary); padding: 0.875rem 1.5rem;
  display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num { font-size: 20px; font-weight: 800; color: #0a0a0a; }
.stat-lbl { font-size: 11px; color: rgba(0,0,0,0.6); }

/* Category cards */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}
.cat-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem 0.75rem;
  text-align: center; transition: var(--transition);
  cursor: pointer;
}
.cat-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cat-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--primary-light); display: flex;
  align-items: center; justify-content: center; margin: 0 auto 0.75rem;
}
.cat-icon i { font-size: 24px; color: var(--primary); }
.cat-name { font-size: 12px; font-weight: 600; color: var(--text); }

/* Product cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.product-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: var(--transition); position: relative;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-img {
  aspect-ratio: 1; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-img .no-img i { font-size: 48px; color: var(--border); }
.product-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 4px;
}
.product-fav {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; background: var(--white);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; border: 1px solid var(--border);
  color: var(--text-muted); font-size: 16px; transition: var(--transition);
}
.product-fav:hover { color: var(--danger); border-color: var(--danger); }
.product-info { padding: 10px 12px 12px; }
.product-name { font-size: 13px; font-weight: 500; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { display: flex; align-items: baseline; gap: 6px; }
.price-new { font-size: 16px; font-weight: 700; color: var(--primary); }
.price-old { font-size: 12px; color: var(--text-muted); text-decoration: line-through; }
.product-card .upload-hint {
  font-size: 10px; color: var(--success); margin-top: 4px;
  display: flex; align-items: center; gap: 3px;
}

/* Filter sidebar */
.page-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
@media (max-width: 768px) { .page-layout { grid-template-columns: 1fr; } }
.filter-sidebar { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.filter-title { font-size: 15px; font-weight: 700; margin-bottom: 1rem; }
.filter-group { margin-bottom: 1.25rem; }
.filter-group h4 { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.filter-group label { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 5px; cursor: pointer; }
.price-range { display: flex; gap: 8px; }
.price-range input { width: 80px; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 768px) { .product-detail { grid-template-columns: 1fr; } }
.product-main-img {
  aspect-ratio: 1; background: var(--bg); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); overflow: hidden;
}
.product-main-img img { width: 100%; height: 100%; object-fit: contain; }
.product-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.product-thumb {
  width: 60px; height: 60px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.product-thumb.active { border-color: var(--primary); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-right { }
.product-title { font-size: 22px; font-weight: 700; margin-bottom: 0.5rem; }
.product-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.product-price-new { font-size: 28px; font-weight: 800; color: var(--primary); }
.product-price-old { font-size: 16px; color: var(--text-muted); text-decoration: line-through; }
.product-disc { background: #fee2e2; color: var(--danger); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.product-stock { font-size: 13px; color: var(--success); display: flex; align-items: center; gap: 4px; margin-bottom: 1rem; }
.product-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; margin-top: 1rem; }
.size-options { display: flex; gap: 6px; flex-wrap: wrap; }
.size-btn {
  padding: 6px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; background: var(--white);
  color: var(--text); cursor: pointer; transition: var(--transition);
}
.size-btn:hover, .size-btn.active {
  border-color: var(--primary); background: var(--primary-light); color: var(--primary);
}
.color-options { display: flex; gap: 8px; }
.color-btn {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border); cursor: pointer; transition: var(--transition);
}
.color-btn.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--primary); border-radius: var(--radius-lg);
  padding: 1.5rem; text-align: center; background: var(--primary-light);
  cursor: pointer; transition: var(--transition); margin-top: 1rem;
}
.upload-zone:hover { background: color-mix(in srgb, var(--primary) 10%, white); }
.upload-zone.dragover { border-color: var(--primary-dark); background: color-mix(in srgb, var(--primary) 15%, white); }
.upload-zone i { font-size: 36px; color: var(--primary); margin-bottom: 8px; }
.upload-zone-title { font-size: 14px; font-weight: 600; color: var(--primary); }
.upload-zone-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.upload-counter { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; }
.upload-counter span { color: var(--text-muted); }
.upload-counter strong { color: var(--primary); }
.upload-btn-inner {
  margin-top: 10px; background: var(--primary); color: #fff;
  border: none; padding: 8px 20px; border-radius: 999px; font-size: 13px;
}
.photo-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photo-preview-item {
  width: 60px; height: 60px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); position: relative;
  overflow: hidden; background: var(--bg);
}
.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview-item .del-photo {
  position: absolute; top: 2px; right: 2px;
  width: 16px; height: 16px; background: var(--danger);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; cursor: pointer; border: none;
  color: #fff; font-size: 9px; line-height: 1;
}

/* Order buttons */
.order-btns { display: flex; gap: 10px; margin-top: 1.25rem; }
.btn-add-cart {
  flex: 1; background: var(--primary); color: #fff; border: none;
  padding: 13px 20px; border-radius: var(--radius); font-size: 14px;
  font-weight: 600; display: flex; align-items: center; justify-content: center;
  gap: 8px; transition: var(--transition);
}
.btn-add-cart:hover { background: var(--primary-dark); }
.btn-whatsapp {
  background: #25d366; color: #fff; border: none;
  padding: 13px 16px; border-radius: var(--radius); font-size: 18px;
  transition: var(--transition);
}
.btn-whatsapp:hover { background: #1da855; }

/* Cart */
.cart-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-lg); overflow: hidden; }
.cart-table th { background: var(--bg); padding: 10px 14px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-align: left; }
.cart-table td { padding: 12px 14px; border-top: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.cart-qty { display: flex; align-items: center; gap: 6px; }
.qty-btn { width: 28px; height: 28px; border: 1px solid var(--border); background: var(--white); border-radius: 6px; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.cart-summary { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.summary-row.total { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 16px; color: var(--primary); }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--text-muted); }
.form-control {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px; background: var(--white);
  color: var(--text); transition: var(--transition); outline: none;
}
.form-control:focus { border-color: var(--primary); }
.form-control.error { border-color: var(--danger); }
.form-error { font-size: 12px; color: var(--danger); margin-top: 3px; }
textarea.form-control { min-height: 90px; resize: vertical; }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); padding: 1rem 0; flex-wrap: wrap; }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: var(--text-muted); }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-new { background: #dbeafe; color: #1d4ed8; }
.badge-proc { background: #fef3c7; color: #92400e; }
.badge-ready { background: #d1fae5; color: #065f46; }
.badge-done { background: #e0e7ff; color: #3730a3; }
.badge-cancel { background: #fee2e2; color: #991b1b; }

/* WhatsApp float */
.wa-float {
  position: fixed; bottom: 80px; right: 20px; z-index: 990;
  width: 52px; height: 52px; background: #25d366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff; box-shadow: 0 4px 12px rgba(37,211,102,0.4);
  transition: var(--transition);
}
@media (max-width: 768px) { .wa-float { bottom: 68px; right: 12px; } }
.wa-float:hover { transform: scale(1.08); }

/* Mobile bottom nav */
.mobile-bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 990;
  background: var(--white); border-top: 1px solid var(--border);
  padding: 6px 0 4px;
}
@media (max-width: 768px) { .mobile-bottom-nav { display: flex; justify-content: space-around; } }
.mob-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px; padding: 2px 8px; color: var(--text-muted);
  font-size: 10px; position: relative;
}
.mob-nav-item i { font-size: 22px; }
.mob-nav-item.active { color: var(--primary); }
.mob-badge {
  position: absolute; top: 0; right: 4px;
  background: var(--danger);
}

/* Footer */
.site-footer { background: #1e3a5f; color: rgba(255,255,255,0.8); padding: 2.5rem 1.5rem 1rem; margin-bottom: 56px; }
@media (min-width: 769px) { .site-footer { margin-bottom: 0; } }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2rem; margin-bottom: 1.5rem; }
.footer-col h4 { font-size: 13px; color: #93c5fd; font-weight: 600; margin-bottom: 10px; }
.footer-col a, .footer-col span { display: block; font-size: 12px; color: rgba(255,255,255,0.6); margin-bottom: 5px; transition: var(--transition); }
.footer-col a:hover { color: #fff; }
.footer-logo .logo-text { font-size: 18px; font-weight: 700; color: #fff; }
.footer-slogan { font-size: 12px; color: rgba(255,255,255,0.5); margin: 4px 0 10px; }
.footer-contact { display: flex; flex-direction: column; gap: 4px; }
.footer-contact a, .footer-contact span { font-size: 12px; display: flex; align-items: center; gap: 5px; color: rgba(255,255,255,0.65); }
.track-form { display: flex; gap: 4px; margin-bottom: 10px; }
.track-form input { flex: 1; padding: 6px 10px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); border-radius: var(--radius-sm); color: #fff; font-size: 12px; outline: none; }
.track-form button { background: var(--primary); color: #fff; border: none; padding: 6px 12px; border-radius: var(--radius-sm); font-size: 12px; }
.social-links { display: flex; gap: 8px; margin-top: 8px; }
.social-links a { font-size: 20px; color: rgba(255,255,255,0.6); }
.social-links a:hover { color: #fff; }
.footer-bottom { max-width: 1200px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1rem; font-size: 12px; color: rgba(255,255,255,0.4); text-align: center; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 14px; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-info { background: #dbeafe; color: #1d4ed8; }

/* Tabs */
.tab-bar { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn { padding: 10px 16px; font-size: 14px; font-weight: 500; color: var(--text-muted); border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; transition: var(--transition); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Responsive */
@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .hero-title { font-size: 22px; }
  .hero-image { display: none; }
  .stats-bar { gap: 1.5rem; }
}
@media (max-width: 360px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}