/* Catalog cards and piece/pack bands, matched to Candy Port. */
:root {
  --cp-bg: #f6f7fb;
  --cp-text: #1e293b;
  --cp-muted: #64748b;
  --cp-ink: #0f172a;
}

body {
  background: #fff;
  color: var(--cp-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#product-list.row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 !important;
  padding: 8px 16px 28px;
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
}

#product-list > .col {
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: none !important;
}

@media (min-width: 960px) {
  #product-list.row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }
}

body.cp-list #product-list.row {
  grid-template-columns: minmax(0, 1fr) !important;
}

.cp-card {
  min-width: 0;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cp-card--out {
  opacity: 0.92;
}

.cp-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fff;
  overflow: hidden;
}

.cp-media img,
.cp-media-empty {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
}

.cp-card--out .cp-media img {
  filter: grayscale(0.35) brightness(0.92);
}

.cp-country,
.cp-country-line {
  display: none;
}

.cp-country {
  position: absolute;
  top: 8px;
  right: 8px;
  max-width: min(132px, 46%);
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  color: #1e293b;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-oos-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(15, 23, 42, 0.42);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

.cp-body {
  padding: 10px 10px 6px;
  flex: 1 1 auto;
}

.cp-body h3 {
  margin: 0;
  font-size: 13px;
  line-height: 1.3;
  min-height: 0;
  max-height: none;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #0f172a;
  overflow: hidden;
  word-break: break-word;
}

.cp-brand,
.cp-name {
  display: block;
}

.cp-brand {
  font-weight: 600;
}

.cp-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-weight: 500;
}

.cp-volume {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.3;
}

.cp-body h3 a {
  color: inherit;
  text-decoration: none;
}

.cp-country-line {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.25;
  color: var(--cp-muted);
}

.cp-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 8px 10px;
  margin-top: auto;
}

.cp-detail-offers {
  padding: 0 0 12px;
  max-width: 420px;
}

.cp-band {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border-radius: 10px;
  overflow: hidden;
  min-height: 48px;
  width: 100%;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e8ecf1;
}

.cp-band--piece {
  box-shadow: inset 3px 0 0 #bae6fd;
}

.cp-band--pack {
  box-shadow: inset 3px 0 0 #86efac;
}

.cp-band--out {
  opacity: 0.72;
}

.cp-band-main {
  flex: 1;
  min-width: 0;
  padding: 8px 8px 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.cp-band-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-band-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--cp-ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.cp-band-meta {
  font-size: 11px;
  line-height: 1.25;
  color: var(--cp-muted);
}

.cp-band-controls {
  flex: 0 0 auto;
  width: clamp(76px, 34%, 112px);
  max-width: 42%;
  display: flex;
  align-items: stretch;
  border-left: 1px solid #e8ecf1;
  background: rgba(255, 255, 255, 0.85);
}

.cp-plus,
.cp-step {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #0ea5e9;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cp-plus {
  width: 100%;
  min-height: 48px;
  font-size: 26px;
  line-height: 1;
}

.cp-plus:active,
.cp-step:active {
  background: #f0f9ff;
}

.cp-stepper {
  display: grid;
  grid-template-columns: 1fr minmax(26px, auto) 1fr;
  width: 100%;
  min-height: 48px;
}

.cp-step {
  font-size: 20px;
  line-height: 1;
}

.cp-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--cp-ink);
  border-left: 1px solid rgba(148, 163, 184, 0.35);
  border-right: 1px solid rgba(148, 163, 184, 0.35);
}

.cp-band.is-empty .cp-stepper {
  display: none;
}

.cp-band:not(.is-empty) .cp-plus {
  display: none;
}

.cp-band.is-busy {
  pointer-events: none;
  opacity: 0.7;
}

#product:has(.cp-detail-offers) > .mb-3,
#product:has(.cp-detail-offers) > .row,
#product:has(.cp-detail-offers) #button-cart {
  display: none !important;
}

body:has(.cp-detail-offers) .col-sm > ul.list-unstyled:first-of-type {
  display: none;
}

.cp-toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 2000;
  background: #0f172a;
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  max-width: min(420px, calc(100% - 24px));
}

/* Catalog shell. Piece/pack bands above stay as they are. */
#top,
footer,
.breadcrumb,
#column-left,
#column-right,
#display-control {
  display: none !important;
}

header.cp-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 57px;
  margin: 0;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.cp-mark,
.cp-heading {
  color: #0f172a;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.cp-mark {
  font-size: 15px;
  font-weight: 700;
}

.cp-heading {
  font-size: 18px;
  font-weight: 600;
}

.cp-search {
  flex: 1 1 auto;
  min-width: 160px;
}

.cp-search #search {
  margin: 0;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  flex-wrap: nowrap;
}

.cp-search #search .form-control {
  height: 36px;
  border: none;
  box-shadow: none;
  font-size: 13px;
  background: transparent;
}

.cp-search #search .form-control:focus {
  box-shadow: none;
}

.cp-search #search .btn {
  border: none;
  background: transparent;
  color: #64748b;
  padding: 0 12px;
}

.cp-layout {
  display: flex;
  flex: 0 0 auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.cp-layout button {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: #64748b;
}

.cp-layout button.is-active {
  background: #f3f4f6;
  color: #0f172a;
}

.cp-cart {
  flex: 0 0 auto;
}

.cp-cart .dropdown {
  display: block;
}

.cp-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 4px;
  border: none;
  background: transparent;
  color: #0f172a;
  font-size: 13px;
  font-weight: 500;
  box-shadow: none;
}

.cp-cart-btn.dropdown-toggle::after {
  display: none;
}

.cp-cart-ico {
  display: none;
}

.cp-cart-count {
  color: #64748b;
  font-weight: 500;
}

.cp-cart .dropdown-menu {
  min-width: min(420px, calc(100vw - 24px));
}

main {
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  align-items: start;
  min-height: calc(100vh - 57px);
  background: #fff;
}

main > :not(.cp-nav) {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.cp-nav {
  grid-column: 1;
  grid-row: 1;
  position: sticky;
  top: 57px;
  display: flex;
  flex-direction: column;
  width: 228px;
  height: calc(100vh - 57px);
  max-height: calc(100vh - 57px);
  background: #fff;
  border-right: 1px solid #e5e7eb;
  overflow: hidden;
}

.cp-nav-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 8px 0;
}

.cp-nav-link,
.cp-nav-side-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 14px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
}

.cp-nav-link:hover,
.cp-nav-side-link:hover {
  background: #f8fafc;
  color: #0f172a;
}

.cp-nav-link.has-children::after {
  content: ">";
  color: #94a3b8;
  font-weight: 400;
}

.cp-nav-link.is-active {
  background: #f8fafc;
  font-weight: 600;
  box-shadow: inset 2px 0 0 #0ea5e9;
}

.cp-nav-link--child {
  padding-left: 26px;
  color: #64748b;
  font-weight: 400;
}

.cp-nav-side {
  margin-top: auto;
  padding: 8px 0 12px;
  border-top: 1px solid #e5e7eb;
}

.cp-nav-side-link {
  color: #64748b;
}

#product-category.container,
#product-search.container,
#cp-catalog.container {
  max-width: none;
  width: auto;
  padding: 0;
}

.cp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px 2px;
}

.cp-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cp-tool,
.cp-filter-reset {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.cp-tool:hover,
.cp-filter-reset:hover {
  color: #2563eb;
}

.cp-tool-sep {
  color: #94a3b8;
  font-size: 13px;
}

.cp-sort {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cp-sort select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.cp-found {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 400;
}

.cp-filter-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin: 8px 16px 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.cp-filter-panel[hidden] {
  display: none !important;
}

.cp-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.cp-filter-field select,
.cp-filter-apply {
  height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
}

.cp-filter-field select {
  min-width: 180px;
  padding: 0 8px;
}

.cp-filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 13px;
}

.cp-filter-apply {
  padding: 0 12px;
  font-weight: 600;
  cursor: pointer;
}

.cp-empty {
  margin: 24px 16px;
  color: #64748b;
}

.cp-pager {
  padding: 0 16px 28px;
}

.cp-pager .pagination {
  margin: 0;
}

#menu.cp-nav {
  background-color: #fff;
  background-image: none;
  border: none;
  border-radius: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  box-shadow: none;
}

@media (max-width: 899px) {
  header.cp-top {
    flex-wrap: wrap;
    height: auto;
  }

  .cp-search {
    order: 5;
    flex-basis: 100%;
  }

  main {
    display: block;
  }

  .cp-nav {
    position: relative;
    top: auto;
    width: 100%;
    height: auto;
    max-height: 280px;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }
}

body:has(.cp-page) main {
  display: block;
}

body:has(.cp-page) .cp-nav,
body:has(.cp-page) .cp-heading,
body:has(.cp-page) .cp-layout,
#product-info:has(.cp-page) .breadcrumb,
#product-info:has(.cp-page) #content > .row.mb-3,
#product-info:has(.cp-page) #content > ul.nav,
#product-info:has(.cp-page) #content > .tab-content,
#product-info:has(.cp-page) #content > h3,
#product-info:has(.cp-page) #content > .row-cols-1 {
  display: none !important;
}

body:has(.cp-page) .cp-cart-ico {
  display: inline-flex;
  margin-right: 6px;
  color: #0f172a;
  font-size: 16px;
}

body:has(.cp-page) .cp-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: #6d4aff;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

#product-info:has(.cp-page).container {
  max-width: 1120px;
  width: auto;
  margin: 0 auto;
  padding: 8px 28px 48px;
}

.cp-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 18px;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.cp-back:hover {
  color: #0f172a;
}

.cp-page-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 1fr);
  gap: 48px;
  align-items: start;
}

.cp-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
}

.cp-hero-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.cp-hero-volume {
  margin: 8px 0 16px;
  color: #64748b;
  font-size: 14px;
  text-align: center;
}

.cp-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.cp-thumb {
  width: 74px;
  height: 74px;
  padding: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.cp-thumb.is-active {
  border-color: #6d4aff;
  box-shadow: 0 0 0 1px #6d4aff;
}

.cp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cp-detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  margin-bottom: 14px;
  color: #64748b;
  font-size: 14px;
}

.cp-detail-dot {
  width: 1px;
  height: 14px;
  background: #e5e7eb;
}

.cp-wish {
  margin: 0 0 0 auto;
}

.cp-wish button {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.cp-detail-brand,
.cp-detail-name {
  margin: 0;
  color: #0f172a;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.cp-detail-brand {
  font-size: 28px;
}

.cp-detail-name {
  margin-top: 2px;
  font-size: 32px;
}

.cp-detail-lead {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.45;
}

.cp-detail-volume {
  margin: 8px 0 0;
  color: #0f172a;
  font-size: 15px;
}

.cp-detail-out {
  margin: 20px 0 0;
  color: #64748b;
  font-weight: 700;
}

.cp-buy {
  margin-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.cp-buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}

.cp-buy-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cp-buy-label {
  color: #64748b;
  font-size: 14px;
}

.cp-buy-price {
  color: #0f172a;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.cp-buy-meta {
  color: #94a3b8;
  font-size: 13px;
}

.cp-buy-ctl {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.cp-buy-group {
  display: flex;
  align-items: center;
  height: 40px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.cp-buy-minus {
  width: 36px;
  height: 40px;
  border: none;
  border-right: 1px solid #e5e7eb;
  background: transparent;
  color: #0f172a;
  font-size: 20px;
  cursor: pointer;
}

.cp-buy .cp-qty {
  min-width: 32px;
  padding: 0 8px;
  border: none;
  color: #0f172a;
  font-size: 16px;
  font-weight: 600;
}

.cp-buy-plus {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: #6d4aff;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cp-buy-total {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f4f0ff;
  color: #6d4aff;
  text-decoration: none;
}

.cp-buy-total[hidden] {
  display: none !important;
}

.cp-buy-total-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
}

.cp-buy-total-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.cp-buy-total-text strong {
  font-size: 14px;
}

.cp-buy-total-note {
  color: #8b7cf6;
  font-size: 13px;
}

.cp-buy-total-sum {
  margin-left: auto;
  color: #0f172a;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.cp-buy-total-go {
  color: #6d4aff;
  font-size: 22px;
  line-height: 1;
}

.cp-tabs {
  display: flex;
  gap: 22px;
  margin-top: 28px;
  border-bottom: 1px solid #e5e7eb;
}

.cp-tab {
  margin: 0;
  padding: 10px 0;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.cp-tab.is-active {
  color: #0f172a;
  border-bottom-color: #0f172a;
}

.cp-tab-panel {
  padding-top: 16px;
  color: #334155;
  font-size: 15px;
  line-height: 1.55;
}

.cp-tab-panel[hidden] {
  display: none !important;
}

.cp-muted {
  margin: 0;
  color: #94a3b8;
}

.cp-specs {
  display: grid;
  gap: 10px;
  margin: 0;
}

.cp-specs div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
}

.cp-specs dt {
  color: #64748b;
  font-weight: 500;
}

.cp-specs dd {
  margin: 0;
  color: #0f172a;
}

@media (max-width: 800px) {
  .cp-page-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cp-hero {
    min-height: 280px;
  }

  .cp-detail-brand {
    font-size: 24px;
  }

  .cp-detail-name {
    font-size: 28px;
  }

  .cp-tabs {
    gap: 14px;
    overflow-x: auto;
  }
}
