/* ── TOP BAR ── */
.topbar { background: var(--dark); color: #ccc; font-size: 12px; padding: 7px 0; }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; }
.topbar-left { display: flex; align-items: center; gap: 6px; }
.topbar-right { display: flex; gap: 24px; align-items: center; }
.topbar-right a { color: #ccc; } 
.topbar-right a:hover { color: white; }
.lang-btn { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 4px; padding: 2px 8px; cursor: pointer; color: #ccc; font-size: 12px; }

/* ── HEADER ── */
.header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 200; box-shadow: 0 1px 6px rgba(0,0,0,0.06); }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; gap: 40px; }
.logo-text { font-size: 30px; font-style: italic; font-weight: 700; color: var(--gold); font-family: Georgia, serif; letter-spacing: -1px; }
nav { display: flex; gap: 8px; flex: 1; }
nav a { font-size: 13px; font-weight: 500; color: var(--text-main); padding: 8px 12px; border-radius: 4px; transition: background .15s; white-space: nowrap; }
nav a:hover, nav a.active { background: var(--gold-light); color: var(--gold-dark); }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.icon-btn { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: none; background: transparent; color: var(--text-main); position: relative; transition: background .15s; }
.icon-btn:hover { background: var(--gold-light); }
.cart-badge { position: absolute; top: 4px; right: 4px; background: var(--gold); color: white; font-size: 9px; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* ── BREADCRUMB ── */
.breadcrumb { max-width: 1280px; margin: 0 auto 20px; padding: 16px 24px 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: #666666; }
.breadcrumb a { color: #666666; text-decoration: none; transition: color 0.2s ease; }
.breadcrumb a:hover { color: #1a1a1a; text-decoration: underline; }
.breadcrumb span { color: #1a1a1a; font-weight: 600; }
/* BREADCRUMB STYLES */
.breadcrumb {
 display: flex;
 align-items: center;
 gap: 8px;
 font-size: 13px;
 color: #666666;
 margin-bottom: 20px;
}

.breadcrumb a {
 color: #666666;
 text-decoration: none;
 transition: color 0.2s ease;
}

.breadcrumb a:hover {
 color: #1a1a1a;
 text-decoration: underline;
}

.breadcrumb span {
 color: #1a1a1a;
 font-weight: 600;
}
/* ── CATEGORY HERO ── */
.cat-hero { background: linear-gradient(135deg, #1a0f07 0%, #3d1f08 50%, #5a2e0a 100%); padding: 36px 0 32px; position: relative; overflow: hidden; }
.cat-hero::after { content: ''; position: absolute; inset: 0; background: url('$CAT_IMG$?w=1400&q=60') center/cover no-repeat; opacity: 0.12; }
.cat-hero-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.cat-hero h1 { font-size: 32px; font-weight: 800; color: white; margin-bottom: 6px; }
.cat-hero p { color: rgba(255,255,255,0.65); font-size: 13px; }

/* ── SUB-CATEGORY TABS ── */
.cat-tabs { background: white; border-bottom: 1px solid var(--border); }
.cat-tabs-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: flex; gap: 0; }
.cat-tab { padding: 14px 20px; font-size: 13px; font-weight: 600; color: var(--text-muted); border: none; background: transparent; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .15s; white-space: nowrap; }
.cat-tab:hover { color: var(--dark); }
.cat-tab.active { color: var(--dark); border-bottom-color: var(--dark); }

/* ── MAIN LAYOUT ── */
.shop-wrap { max-width: 1280px; margin: 0 auto; padding: 28px 24px 60px; display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: 88px; }
.filter-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.filter-title { font-size: 15px; font-weight: 800; }
.clear-all { font-size: 12px; color: var(--gold-dark); font-weight: 600; border: none; background: none; padding: 0; cursor: pointer; }
.clear-all:hover { text-decoration: underline; }

.filter-group { border-top: 1px solid var(--border); padding: 16px 0; }
.filter-group-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; cursor: pointer; user-select: none; }
.filter-group-title { font-size: 13px; font-weight: 700; letter-spacing: 0.3px; }
.fg-arrow { transition: transform .2s; color: var(--text-muted); }
.fg-arrow.open { transform: rotate(180deg); }
.filter-group-body { display: flex; flex-direction: column; gap: 8px; overflow: hidden; transition: max-height .3s ease; }
.filter-group-body.collapsed { max-height: 0 !important; padding: 0; gap: 0; }

/* Checkbox */
.fc-row { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 1px 0; }
.fc-row input[type=checkbox] { display: none; }
.fc-box { width: 16px; height: 16px; border: 1.5px solid var(--border); border-radius: 3px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s; }
.fc-row input:checked + .fc-box { background: var(--dark); border-color: var(--dark); }
.fc-check { display: none; color: white; }
.fc-row input:checked + .fc-box .fc-check { display: block; }
.fc-label { font-size: 13px; color: var(--text-muted); flex: 1; }
.fc-count { font-size: 11px; color: var(--text-light); }
.fc-row:hover .fc-label { color: var(--dark); }

/* Price range */
.price-range { padding: 4px 0 8px; }
.range-vals { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; margin-bottom: 16px; }
.range-slider { position: relative; height: 4px; background: var(--border); border-radius: 4px; margin: 8px 6px; }
.range-fill { position: absolute; height: 100%; background: var(--gold); border-radius: 4px; }
input[type=range] { position: absolute; width: calc(100% + 12px); left: -6px; -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none; top: -7px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--dark); border: 2px solid white; box-shadow: 0 1px 4px rgba(0,0,0,0.25); pointer-events: all; cursor: pointer; }

/* Intensity */
.intensity-row { display: flex; flex-direction: column; gap: 6px; }
.int-opt { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 5px 6px; border-radius: 3px; transition: background .12s; }
.int-opt:hover { background: var(--cream); }
.int-opt.active { background: var(--gold-light); }
.int-dots { display: flex; gap: 3px; }
.int-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); transition: background .15s; }
.int-dot.filled { background: var(--gold); }
.int-label { font-size: 12px; color: var(--text-muted); }
.int-opt.active .int-label { color: var(--dark); font-weight: 700; }

/* Active filter tags */
.active-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; min-height: 0; }
.filter-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; background: var(--gold-light); border: 1px solid var(--gold); border-radius: 20px; font-size: 11px; font-weight: 600; color: var(--gold-dark); }
.filter-tag button { border: none; background: none; color: var(--gold-dark); padding: 0; line-height: 1; font-size: 14px; display: flex; align-items: center; cursor: pointer; }

/* ── TOOLBAR ── */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.result-count { font-size: 13px; color: var(--text-muted); flex: 1; }
.result-count strong { color: var(--dark); }
.sort-wrap { display: flex; align-items: center; gap: 8px; }
.sort-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* uCoz болон стандарт select засалт */
.sort-wrap select,
.sort-select { 
  border: 1.5px solid var(--border); 
  background: white; 
  padding: 7px 30px 7px 10px; 
  font-size: 13px; 
  font-weight: 500; 
  font-family: inherit; 
  border-radius: 2px; 
  appearance: none; 
  -webkit-appearance: none; 
  cursor: pointer; 
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); 
  background-repeat: no-repeat; 
  background-position: right 8px center; 
  min-width: 180px; 
}
.sort-wrap select:focus,
.sort-select:focus { outline: none; border-color: var(--gold); }

.view-btns { display: flex; border: 1.5px solid var(--border); border-radius: 2px; overflow: hidden; }
.view-btn { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: none; background: white; color: var(--text-muted); transition: all .15s; cursor: pointer; }
.view-btn.active { background: var(--dark); color: white; }
.view-btn:hover:not(.active) { background: var(--gold-light); }

/* ── PRODUCTS CONTAINER (ХҮЧЭЭР ГРИД БОЛГОХЫГ БОЛИУЛЖ, ЧӨЛӨӨТЭЙ ХАРАГДУУЛАХ) ── */
#productsGrid, .products-grid {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* ── GRID MODE (ХҮСНЭГТ ХАРАГДАЦ) ── */
#productsGrid:not(.list-mode) .goods-list {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px !important;
  width: 100% !important;
}

#productsGrid:not(.list-mode) .goods-list .list-item {
  width: 100% !important;
  display: block !important;
}

#productsGrid:not(.list-mode) .pcard {
  height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
}

/* ── PRODUCT CARD (ҮНДСЭН ЗАГВАР) ── */
.pcard { border: 1px solid var(--border); border-radius: 4px; background: white; overflow: hidden; position: relative; transition: box-shadow .2s, transform .15s; }
.pcard:hover { box-shadow: 0 6px 28px rgba(0,0,0,0.1); transform: translateY(-2px); }
.pcard-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.pbadge { font-size: 10px; font-weight: 700; padding: 3px 8px; letter-spacing: 0.5px; }
.pbadge-sale { background: var(--red); color: white; }
.pbadge-, .pbadge-new { background: var(--gold); color: white; }
.pbadge-hot { background: var(--dark); color: white; }
.pcard-wish { position: absolute; top: 10px; right: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; background: white; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: all .15s; box-shadow: 0 1px 4px rgba(0,0,0,0.08); cursor: pointer; }
.pcard-wish:hover { color: #e44; border-color: #e44; }
.pcard-wish.liked { color: #e44; border-color: #e44; background: #fff5f5; }
.pcard-img { display: flex; align-items: center; justify-content: center; height: 200px; overflow: hidden; }
.pcard-img img { height: 165px; width: auto; object-fit: contain; transition: transform .4s; }
.pcard:hover .pcard-img img { transform: scale(1.06); }
.pcard-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.pcard-brand { font-size: 10px; font-weight: 700; color: var(--gold-dark); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 3px; }
.pcard-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; line-height: 1.3; text-decoration: none; color: var(--dark); }
.pcard-sub { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.pcard-desc-long { display: none; font-size: 12px; color: var(--text-muted); line-height: 1.7; margin-bottom: 10px; max-width: 520px; }
.pcard-stars { display: flex; align-items: center; gap: 2px; margin-bottom: 10px; }
.pcard-stars svg { width: 12px; height: 12px; color: var(--gold); }
.pcard-stars span { font-size: 11px; color: var(--text-muted); margin-left: 4px; }
.pcard-price-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; margin-top: auto; }
.pcard-price { font-size: 18px; font-weight: 800; }
.pcard-old { font-size: 12px; color: var(--text-muted); text-decoration: line-through; }
.pcard-save { font-size: 10px; font-weight: 700; color: var(--red); background: #fef2f2; padding: 2px 6px; border-radius: 2px; }
.btn-add { width: 100%; padding: 10px; border: 1.5px solid var(--dark); background: transparent; font-size: 12px; font-weight: 700; letter-spacing: 0.5px; transition: all .15s; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.btn-add:hover { background: var(--dark); color: white; }

/* ── LIST MODE (ЖАГСААЛТ ХАРАГДАЦ) ── */
#productsGrid.list-mode .goods-list { 
  display: flex !important; 
  flex-direction: column !important; 
  gap: 16px !important; 
}

#productsGrid.list-mode .goods-list .list-item { 
  width: 100% !important; 
}

#productsGrid.list-mode .pcard { 
  display: grid !important; 
  grid-template-columns: 240px 1fr !important; 
  gap: 20px !important; 
  width: 100% !important; 
  align-items: center !important; 
}

#productsGrid.list-mode .pcard-img { 
  height: 100% !important; 
  min-height: 200px !important; 
}

#productsGrid.list-mode .pcard-body { 
  padding: 22px 28px !important; 
  display: flex !important; 
  flex-direction: column !important; 
  justify-content: center !important; 
}

#productsGrid.list-mode .pcard-name { font-size: 16px; margin-bottom: 3px; }

#productsGrid.list-mode .pcard-desc-long { 
  display: -webkit-box !important; 
  -webkit-line-clamp: 3; 
  -webkit-box-orient: vertical; 
  overflow: hidden; 
  margin-top: 8px; 
}

#productsGrid.list-mode .btn-add { 
  width: auto !important; 
  padding: 10px 28px !important; 
  align-self: flex-start !important; 
  margin-top: 12px !important; 
}

/* ── PAGINATION (uCoz) ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 30px; }
.pagination a, 
.pagination b,
.pagination .swPageLink,
.pagination .swPageActive,
.page-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 8px; border: 1px solid #e5e5e5; background: #ffffff; color: #1a1a1a; font-size: 13px; font-weight: 500; text-decoration: none; cursor: pointer; transition: all 0.2s ease; }
.pagination span, .pagination .swPageDots { font-size: 13px; color: #999999; padding: 0 2px; }
.pagination b, .pagination .swPageActive, .page-btn.active { background: #1a1a1a !important; color: #ffffff !important; border-color: #1a1a1a !important; font-weight: 700; }
.pagination a:hover, .pagination .swPageLink:hover, .page-btn:hover:not(.active) { background: #f4f1ea; border-color: #c5a059; color: #1a1a1a; }

/* ── TOAST ── */
.toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--dark); color: white; padding: 14px 24px; border-radius: 4px; font-size: 13px; font-weight: 600; z-index: 9999; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); transition: transform .35s cubic-bezier(0.4,0,0.2,1); pointer-events: none; }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast-icon { width: 22px; height: 22px; background: var(--gold); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }