/* BekCraft redesign — catalog (bo'lim, tur, tovar) and info pages. Loaded after redesign-home.css. */

/* Page head (soft band like Park Misa) */
.bc-page-head { background: var(--bc-soft); padding: 28px 0 44px; }
.bc-page-head .bc-wrap { display: flex; flex-direction: column; gap: 14px; }
body.bc .bc-page-head h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 800; line-height: 1.1; }
.bc-sub { color: var(--bc-muted); font-size: 15px; font-weight: 600; }
.bc-page-head .bc-lead { max-width: 760px; }
.bc-page-head .bc-actions { padding-top: 4px; }
body.bc .bc-page-head .bc-btn { padding: 12px 20px; }

/* Breadcrumb + back */
body.bc .bc-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; font-size: 14px; color: var(--bc-muted); background: none; border: 0; }
body.bc .bc-crumb a { color: var(--bc-muted); text-decoration: none; }
body.bc .bc-crumb a:hover { color: var(--bc-green); text-decoration: underline; }
body.bc .bc-crumb [aria-current] { color: var(--bc-ink); font-weight: 700; }
body.bc .bc-back { align-self: flex-start; display: inline-flex; align-items: center; min-height: 40px; margin: 0; padding: 0; color: var(--bc-green); font-weight: 700; text-decoration: none; background: none; border: 0; }

/* Category chips */
.bc-chips-nav { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
body.bc .bc-chips-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 999px; background: #FFFFFF; border: 1px solid #D5DDE2; color: var(--bc-ink); font-weight: 600; text-decoration: none; }
body.bc .bc-chips-nav a:hover { border-color: var(--bc-green); }
body.bc .bc-chips-nav a[aria-current] { background: var(--bc-ink); border-color: var(--bc-ink); color: #FFFFFF; font-weight: 700; }

.bc-count { color: var(--bc-muted); font-size: 15px; margin-bottom: 20px !important; }

/* Type / category cards */
body.bc .bc-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; margin: 0; padding: 0; }
body.bc .bc-type { display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid var(--bc-line); border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--bc-ink); transition: box-shadow .2s, transform .2s; width: auto; height: auto; }
body.bc .bc-type:hover { box-shadow: 0 12px 32px rgba(21,33,43,.10); }
body.bc .bc-type .round-media { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 0; margin: 0; background: #E6ECE8; overflow: hidden; box-shadow: none; border: 0; }
body.bc .bc-type .round-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
body.bc .bc-type .bc-noimg { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: var(--bc-muted); font-size: 14px; background: none; border: 0; border-radius: 0; }
.bc-type-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
body.bc .bc-type h2 { font-size: 20px; font-weight: 800; line-height: 1.25; margin: 0; }
.bc-type-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; font-size: 14px; color: var(--bc-muted); }

/* Model cards (product-card keeps its class for scripts/tests) */
body.bc .bc-prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin: 0; padding: 0; }
body.bc .bc-prod-grid .product-card { display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid var(--bc-line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--bc-ink); box-shadow: none; transition: box-shadow .2s; max-width: none; width: auto; }
body.bc .bc-prod-grid .product-card:hover { box-shadow: 0 10px 28px rgba(21,33,43,.09); }
body.bc .bc-prod-grid .product-card-media, body.bc .bc-prod-grid .product-main-frame { display: block; margin: 0; padding: 0; border: 0; border-radius: 0; background: #E6ECE8; aspect-ratio: 4 / 3; overflow: hidden; }
body.bc .bc-prod-grid .product-main-image { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
body.bc .bc-prod-grid .product-card .body { display: flex; flex-direction: column; gap: 6px; padding: 16px; flex: 1; text-align: left; }
body.bc .bc-prod-grid .product-card h3 { font-size: 17px; font-weight: 800; margin: 0; }
body.bc .bc-prod-grid .product-card p { margin: 0; color: var(--bc-muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
body.bc .bc-prod-grid .product-card .bc-link { margin-top: auto; padding-top: 6px; font-size: 15px; }
body.bc .bc-prod-grid .promo { align-self: flex-start; background: var(--bc-green); color: #FFFFFF; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
body.bc .bc-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px; background: var(--bc-soft); border-radius: 18px; color: var(--bc-muted); }

/* Model (tovar) page */
.bc-model-wrap { padding: 24px 0 64px; }
.bc-model-wrap .bc-wrap > .bc-crumb { margin-bottom: 20px; }
body.bc .bc-model { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; margin: 0; padding: 0; }
body.bc .bc-model .model-gallery { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; position: sticky; top: 96px; }
body.bc .bc-model .model-photo { display: block; width: 100%; padding: 0; margin: 0; border: 0; border-radius: 20px; overflow: hidden; background: var(--bc-soft); cursor: zoom-in; aspect-ratio: 4 / 3; }
body.bc .bc-model .model-photo img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
body.bc .bc-model .model-gallery .placeholder { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: 20px; background: var(--bc-soft); color: var(--bc-muted); }
/* With JS: one big photo + thumbnails (redesign-catalog.js). */
body.bc .bc-model .model-gallery.bc-js-gallery .model-photo { display: none; }
body.bc .bc-model .model-gallery.bc-js-gallery .model-photo.is-active { display: block; }
.bc-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
body.bc .bc-thumb { display: block; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; background: var(--bc-soft); aspect-ratio: 1; cursor: pointer; min-height: 44px; }
body.bc .bc-thumb img { width: 100%; height: 100%; object-fit: cover; }
body.bc .bc-thumb[aria-current="true"] { border-color: var(--bc-green); }
.bc-model-info { display: flex; flex-direction: column; gap: 18px; }
body.bc .bc-model-info h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; line-height: 1.12; margin: 0; }
body.bc .bc-model-info .bc-badge { font-size: 13px; letter-spacing: .3px; }
.bc-model-desc { font-size: 17px; line-height: 1.65; color: var(--bc-muted); white-space: pre-line; }
.bc-specs { margin: 0; border: 1px solid var(--bc-line); border-radius: 16px; overflow: hidden; }
.bc-specs > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--bc-line); }
.bc-specs > div:last-child { border-bottom: 0; }
.bc-specs dt { color: var(--bc-muted); }
.bc-specs dd { font-weight: 700; text-align: right; }
body.bc .bc-model .model-order { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; position: static; }
body.bc .bc-model .model-price { margin: 0; font-size: 26px; font-weight: 800; color: var(--bc-ink); }
body.bc .bc-model .model-order .bc-btn { width: auto; margin: 0; }
.bc-checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; color: var(--bc-muted); font-size: 15px; }
.bc-checks li { display: flex; align-items: center; gap: 8px; }
.bc-checks svg { color: var(--bc-green); flex: none; }

/* CTA heading reuses home CTA styles */
body.bc .bc-cta .bc-cta-title { font-size: clamp(26px, 3vw, 36px); font-weight: 800; }

/* Info pages (Aloqa, Biz haqimizda, Ijtimoiy tarmoqlar) */
body.bc .bc-info .info-page { max-width: 820px; display: flex; flex-direction: column; gap: 18px; }
body.bc .bc-info .info-page h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; }

/* Lightbox above sticky header */
body.bc .model-lightbox::backdrop { background: rgba(14, 24, 32, .85); }

@media (max-width: 860px) {
  body.bc .bc-model { grid-template-columns: 1fr; gap: 28px; }
  body.bc .bc-model .model-gallery { position: static; }
  .bc-page-head { padding: 20px 0 32px; }
}
@media (max-width: 520px) {
  body.bc .bc-types { grid-template-columns: 1fr; gap: 14px; }
  body.bc .bc-prod-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  body.bc .bc-prod-grid .product-card .body { padding: 12px; }
  body.bc .bc-prod-grid .product-card h3 { font-size: 15px; }
  body.bc .bc-prod-grid .product-card p { display: none; }
  .bc-thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
  .bc-specs > div { flex-direction: column; gap: 2px; }
  .bc-specs dd { text-align: left; }
  body.bc .bc-model .model-order .bc-actions .bc-btn { flex: 1 1 100%; }
}
body.bc .bc-model .model-gallery { background: none; box-shadow: none; border: 0; border-radius: 0; }
body.bc .bc-model .model-price { text-align: left; }
/* Neutralise the old round catalog look inside new cards */
body.bc .bc-type .round-media { position: relative; border-radius: 0; border: 0; box-shadow: none; transform: none; aspect-ratio: 4 / 3; max-width: none; }
body.bc .bc-type .round-media > img, body.bc .bc-type .round-media > .round-placeholder { border-radius: 0; clip-path: none; }
body.bc .bc-model .model-order, body.bc .bc-model .model-order .model-price { text-align: left; align-items: stretch; }
@media (min-width: 521px) { body.bc .bc-model .model-order { align-items: flex-start; } }

/* Type without models: its cover large + order buttons */
body.bc .bc-solo { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
body.bc .bc-solo-media { display: block; width: 100%; padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: var(--bc-soft); aspect-ratio: 4 / 3; cursor: zoom-in; }
body.bc .bc-solo-media img { width: 100%; height: 100%; object-fit: contain; }
.bc-solo-info { display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 860px) { body.bc .bc-solo { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 520px) { body.bc .bc-solo .bc-actions .bc-btn { flex: 1 1 100%; } }

/* Compact action buttons in catalog page heads (the dark CTA block below has the big ones) */
body.bc .bc-page-head .bc-actions { gap: 8px; }
body.bc .bc-page-head .bc-btn { min-height: 40px; padding: 8px 16px; font-size: 14px; }
body.bc .bc-page-head .bc-btn svg { width: 16px; height: 16px; }
@media (max-width: 520px) { body.bc .bc-page-head .bc-actions .bc-btn { flex: 1 1 auto; } }
