/* MARKET — a large catalogue store in the Magento shape: a dark utility bar, a white header with a
 * wide search and an orange search button, a light category bar with uppercase links, and a
 * promo-block hero (the text sits in a white panel on the banner). On the category page the
 * filters become LAYERED NAVIGATION, a "Filtriraj po" column on the left with the products to its
 * right, four or five per row. Products are flat white cards with a hairline border, a big bold
 * price and an orange "Dodaj u korpu" button. The footer is light, the way catalogue stores do it.
 * Navy, orange and white; Source Sans 3 with Barlow Semi Condensed headings. Same markup as every theme. */

body.theme-market {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-alt: #f0f2f5;
  --border: #dfe2e7;
  --text: #1f2633;
  --text-muted: #667085;
  --accent: #e2570f;
  --accent-dark: #c2470a;
  --accent-soft: #fdebdd;
  --dark: #14213d;
  --dark-2: #1d2e52;
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --shadow-sm: none;
  --shadow-md: 0 0.35rem 1.25rem rgba(20, 33, 61, 0.12);
  --shadow-lg: 0 0.75rem 2rem rgba(20, 33, 61, 0.16);
  --gradient-accent: var(--accent);
  --gradient-dark: var(--dark);

  --font-body: "Source Sans 3", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-heading: "Barlow Semi Condensed", "Source Sans 3", sans-serif;
  --heading-weight: 600;
  --heading-tracking: 0;
  --header-bg: var(--surface);
  --topbar-bg: var(--dark);
  --topbar-ink: #d6dbe6;
  --catnav-bg: var(--surface-alt);
  --catnav-ink: var(--dark);
  --catnav-ink-muted: var(--text);
  --catnav-hover-bg: #ffffff;
  --catnav-all-bg: var(--dark);
  --catnav-all-ink: #ffffff;
  --search-border: 1px solid #c4c9d2;
  --search-radius: var(--radius-sm);
  --btn-radius: var(--radius-sm);
  --card-radius: 0;
  --card-border: 1px solid var(--border);
  --card-shadow: none;
  --card-media-bg: #ffffff;
  --card-body-bg: #ffffff;
  --trust-bg: var(--surface);
  --trust-ink: var(--text);
  --trust-ink-muted: var(--text-muted);
  --trust-icon-bg: var(--accent-soft);
  --footer-bg: var(--surface-alt);
  --footer-ink: var(--text);
  --footer-ink-muted: var(--text-muted);
  --hero-min-h: 22rem;
  --hero-min-h-lg: clamp(26rem, 52vh, 32rem);
  font-size: 1rem;
}

.theme-market h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

/* ── Header ─────────────────────────────────────────────────────────────────────────────────── */
.theme-market .topbar {
  font-size: 0.8rem;
}

.theme-market .header-main {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.theme-market .header-brand {
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--dark);
}

.theme-market .brand-mark {
  border-radius: var(--radius-sm);
  background: var(--accent);
}

.theme-market .header-search-combo {
  max-width: 52rem;
  min-height: 2.9rem;
}

.theme-market .header-search-combo:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.theme-market .search-category-select {
  max-width: 11rem;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.85rem;
}

.theme-market .header-search-input {
  font-size: 0.95rem;
}

.theme-market .header-search-btn {
  width: 3.75rem;
}

.theme-market .header-action-btn:hover {
  background: transparent;
  color: var(--accent);
}

.theme-market .header-action-label {
  font-size: 0.75rem;
}

.theme-market .cart-count {
  background: var(--accent);
}

.theme-market .catnav-all-toggle {
  padding: 0 1.4rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.theme-market .catnav-link {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0 1.2rem;
}

.theme-market .catnav-link:hover,
.theme-market .catnav-link.active {
  box-shadow: inset 0 -3px 0 var(--accent);
}

.theme-market .header-catnav {
  border-bottom: 1px solid var(--border);
}

.theme-market .header-catnav .navbar-toggler {
  color: var(--dark);
}

/* ── Buttons, breadcrumb ────────────────────────────────────────────────────────────────────── */
.theme-market .btn {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.85rem;
}

.theme-market .btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.theme-market .breadcrumb {
  font-size: 0.85rem;
}

.theme-market .breadcrumb-item a {
  color: #1f5fa8;
}

/* ── Hero: a white promo panel on the banner ────────────────────────────────────────────────── */
.theme-market .hero-slide {
  padding: 2.5rem var(--gutter);
}

.theme-market .hero-slide-1 { background: linear-gradient(110deg, #14213d 0%, #2c4370 100%); }
.theme-market .hero-slide-2 { background: linear-gradient(110deg, #2b3a55 0%, #56688c 100%); }
.theme-market .hero-slide-3 { background: linear-gradient(110deg, #3b2a1e 0%, #8a5631 100%); }

.theme-market .hero-slide-image::before {
  display: none;
}

.theme-market .hero-slide-content {
  max-width: 30rem;
  padding: 2.25rem 2.5rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
}

.theme-market .hero-slide h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--dark);
}

.theme-market .hero-slide p {
  margin-bottom: 1.4rem;
}

.theme-market .hero-slider .carousel-control-prev,
.theme-market .hero-slider .carousel-control-next {
  filter: none;
  opacity: 0.7;
}

.theme-market .hero-slider .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #fff;
}

.theme-market .hero-slider .carousel-indicators .active {
  background-color: var(--accent);
}

@media (min-width: 992px) {
  .theme-market .hero-slide {
    padding: 3rem calc(var(--gutter) + 4rem);
  }
}

@media (max-width: 575.98px) {
  .theme-market .hero-slide-content {
    padding: 1.5rem 1.4rem;
  }
}

/* ── Home bands ─────────────────────────────────────────────────────────────────────────────── */
.theme-market .fb-section {
  background: var(--bg);
}

.theme-market .fb-band-alt {
  background: var(--surface);
}

.theme-market .fb-section-title {
  text-align: left;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.theme-market .fb-band-trust {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.theme-market .fb-feature svg {
  color: var(--accent);
  border-radius: 50%;
}

.theme-market .fb-feature h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

/* Categories: a wrapping grid of bordered promo blocks instead of a scroller. */
.theme-market .category-scroll-btn {
  display: none;
}

.theme-market .category-scroller {
  display: block;
}

.theme-market .category-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.75rem;
  overflow: visible;
}

.theme-market .category-item {
  width: auto;
}

.theme-market .category-card {
  padding: 1rem 0.75rem 0.9rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 0;
}

.theme-market .category-tile,
.theme-market .category-tile.category-tile-photo {
  width: 4.75rem;
  height: 4.75rem;
  box-shadow: none;
}

.theme-market .category-card:hover {
  transform: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.theme-market .category-card-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: center;
}

/* ── Product cards ──────────────────────────────────────────────────────────────────────────── */
.theme-market .row:has(> .col > .product-card) {
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
  margin: 0;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.theme-market .product-card {
  background: var(--surface);
}

.theme-market .row:has(> .col > .product-card) > .col {
  padding: 0;
}

@media (min-width: 1200px) {
  .theme-market .row:has(> .col > .product-card) > .col { width: 20%; }
}

@media (min-width: 1700px) {
  .theme-market .row:has(> .col > .product-card) > .col { width: 16.6667%; }
}

.theme-market .product-card {
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.theme-market .product-card:hover {
  transform: none;
  z-index: 1;
  box-shadow: 0 0 0 1px var(--border), var(--shadow-lg);
}

.theme-market .product-card-media {
  padding: 0.75rem 0.75rem 0;
}

.theme-market .product-card .card-body {
  padding: 0.75rem 1rem 1rem;
}

.theme-market .card-title {
  font-weight: 400 !important;
  font-size: 0.95rem;
  color: #1f5fa8;
}

.theme-market .product-card:hover .card-title {
  text-decoration: underline;
}

.theme-market .price-row {
  text-align: left !important;
}

.theme-market .price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.theme-market .sku-pill {
  border: 0;
  padding: 0;
  background: transparent;
  font-weight: 400;
}

.theme-market .stock-ribbon {
  top: 1.1rem;
  left: 1.1rem;
  right: auto;
  border-radius: var(--radius-sm);
}

.theme-market .quick-add-form {
  left: 0.75rem;
  right: 0.75rem;
}

.theme-market .quick-add-btn {
  padding: 0.65rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: none;
}

/* ── Category page: layered navigation on the left ──────────────────────────────────────────── */
@media (min-width: 992px) {
  .theme-market .site-main > .container:has(#filters-form) {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    column-gap: 2rem;
    align-items: start;
  }

  .theme-market .site-main > .container:has(#filters-form) > * {
    grid-column: 2;
  }

  .theme-market .site-main > .container:has(#filters-form) > nav {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .theme-market .site-main > .container:has(#filters-form) > div:has(> #filters-form) {
    display: contents !important; /* beats Bootstrap .d-flex */
  }

  .theme-market .site-main > .container:has(#filters-form) h1 {
    grid-column: 2;
    grid-row: 2;
    margin-bottom: 1.25rem !important;
  }

  .theme-market #filters-form {
    grid-column: 1;
    grid-row: 2 / 5;
    position: sticky;
    top: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--border);
  }

  .theme-market #filters-form::before {
    content: "Filtriraj po";
    padding: 0.85rem 1rem;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--dark);
    border-bottom: 1px solid var(--border);
  }

  .theme-market #filters-form > select,
  .theme-market #filters-form > .filter-range {
    margin: 0.75rem 1rem 0;
  }

  .theme-market #filters-form > select.filter-select {
    width: auto;
  }

  .theme-market #filters-form > .filter-range {
    min-width: 0;
  }

  .theme-market #filters-form .filter-select {
    width: 100%;
    padding: 0.5rem 0.65rem;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
  }

  .theme-market #filters-form .filter-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.35rem;
  }

  .theme-market #filters-form .filter-range input {
    min-width: 0;
  }

  .theme-market #filters-form .filter-range legend {
    float: none;
    grid-column: 1 / -1;
    margin: 0 0 0.3rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text);
  }

  .theme-market #filters-form .btn {
    margin: 1rem 1rem 0;
  }

  .theme-market #filters-form .filter-reset {
    margin: 0.6rem 1rem 0;
  }

  .theme-market #filters-form::after {
    content: "";
    height: 1rem;
  }

  .theme-market .site-main > .container:has(#filters-form) .row:has(> .col > .product-card) > .col {
    width: 33.3333%;
  }
}

@media (min-width: 1400px) {
  .theme-market .site-main > .container:has(#filters-form) .row:has(> .col > .product-card) > .col { width: 25%; }
}

@media (min-width: 1800px) {
  .theme-market .site-main > .container:has(#filters-form) .row:has(> .col > .product-card) > .col { width: 20%; }
}

/* ── Product page ───────────────────────────────────────────────────────────────────────────── */
.theme-market .product-title {
  font-weight: 600;
}

.theme-market .price-lg {
  font-size: 2rem;
  font-weight: 700;
}

/* ── Footer: light, with a dark bottom line ─────────────────────────────────────────────────── */
.theme-market .site-footer {
  border-top: 1px solid var(--border);
}

.theme-market .footer-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--dark);
}

.theme-market .site-footer a {
  color: #1f5fa8;
}

.theme-market .footer-social-link {
  background: var(--dark);
  color: #fff !important;
}

.theme-market .footer-social-link:hover {
  background: var(--accent);
}

.theme-market .site-footer hr {
  border-color: var(--border);
  opacity: 1;
}
