/* mainsite/mainsite/static/css/store.css */

/* Store-only tokens (do NOT override global tokens) */
:root {
  --store-surface-page: #464a53;
  --store-surface-card: #8f95a5;
  --store-surface-control: #696b70;
  --store-surface-input: #23252a;

  --store-border-soft: #2a2d33;
  --store-border-hover: #343842;

  --store-text-primary: #f1f1f1;
  --store-text-muted: #b0b3b8;
}


.store-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.store-title {
  text-align: center;
  margin-bottom: 1.25rem; /* slightly tighter */
}

.store-grid {
  display: grid;
  grid-template-columns: 1fr; /* base: 1 column */
  gap: 1.25rem;
}

/* 2-column layout on desktop */
@media (min-width: 900px) {
  .store-grid {
    grid-template-columns: 1fr 1fr;
  }
}


.product-card {
  display: flex;
  flex-direction: column;
  background: var(--store-surface-card);
  border: 1px solid var(--store-border-soft);
  color: var(--store-text-primary);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.product-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: #2a2c31;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #777;
  font-size: 0.9rem;
}

.product-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-name {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.product-summary {
  font-size: 0.9rem;
  color: var(--store-text-muted);
  margin-bottom: 1rem;
  flex-grow: 1;
}



.product-hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #222;
}

.product-desc {
  margin-top: 1.25rem;
  color: var(--store-text-muted);
  line-height: 1.6;
}

/* --- Controls (search/filter/sort) --- */
.store-controls {
  margin: 0 auto 1.25rem;
  max-width: 1200px;
}

.store-controls-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.store-search {
  flex: 1 1 280px;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #222;
  background: #0b0b0b;
  color: var(--store-text-primary);
}

.store-select {
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #222;
  background: #0b0b0b;
  color: #eee;
}

.store-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #bbb;
}

.store-apply {
  width: auto;
  padding: 0.6rem 1rem;
}

.store-clear {
  color: #bbb;
  text-decoration: none;
  padding: 0.5rem 0.6rem;
}

.store-clear:hover {
  color: #fff;
  text-decoration: underline;
}

/* --- Pagination --- */
.store-pagination {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.page-link {
  color: #000;
  background: #ff6f00;
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-weight: 600;
}

.page-link:hover {
  background: #ff9933;
}

.page-disabled {
  background: var(--surface-input);
  border: 1px solid var(--border-soft);
  color: #7a7f88;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}

.page-status {
  color: var(--store-text-muted);
}

/* =========================
   Store Controls (match cards)
========================= */

.store-controls {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
}

.store-controls-card {
  background: var(--store-surface-control);
  border: 1px solid var(--store-border-soft);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.store-controls-main {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.store-search-wrap {
  flex: 1 1 420px;
  display: flex;
  align-items: center;
  gap: 0.6rem;

  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: var(--store-surface-input);
  border: 1px solid var(--store-border-soft);
}

.store-search-icon {
  color: #777;
  font-size: 0.95rem;
  line-height: 1;
}

.store-search {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.store-search::placeholder {
  color: #8a8f98;
}

.store-apply {
  width: auto;
  padding: 0.65rem 1rem;
  border-radius: 10px; /* slightly more “cardy” */
}

.store-clear {
  color: #bbb;
  text-decoration: none;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: var(--store-surface-input);
  border: 1px solid var(--store-border-soft);
}

.store-clear:hover {
  color: #fff;
  border-color: #333;
}

/* Advanced row */
.store-controls-advanced {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid #222;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.control-label {
  color: var(--store-text-muted);
  font-size: 0.9rem;
}

.store-select {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid #222;
  background: #0b0b0b;
  color: #eee;
}

.store-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--store-text-muted);
  font-size: 0.92rem;
}

.store-check input {
  accent-color: #ff6f00;
}

/* secondary apply button (less loud than primary) */
.store-apply-secondary {
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid #222;
  background: #0b0b0b;
  color: #eee;
  cursor: pointer;
  font-weight: 600;
}

.store-apply-secondary:hover {
  border-color: #333;
}

/* =========================
   Pagination (match cards)
========================= */

.store-pagination {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  margin-top: 1.75rem;
  flex-wrap: wrap;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  font-weight: 700;

  padding: 0.55rem 0.85rem;
  border-radius: 10px;

  background: #ff6f00;
  color: #000;
}

.page-link:hover {
  background: #ff9933;
}

.page-disabled {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.55rem 0.85rem;
  border-radius: 10px;

  border: 1px solid #222;
  background: var(--store-surface-input);
  border: 1px solid var(--store-border-soft);
}

.page-status {
  color: #aaa;
  padding: 0.35rem 0.5rem;
}


/* =========================
   Product cards: row layout
========================= */

.product-card--row {
  background: var(--store-surface-card);
  border: 1px solid var(--store-border-soft);
  color: var(--store-text-primary);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  align-items: stretch;

  text-decoration: none; /* because it's now an <a> */
  color: inherit;
  border-radius: 10px;
}

/* make hover feel like your old cards */
.product-card--row:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Media area becomes fixed-width left column */
.product-media--row {
  aspect-ratio: auto;          /* override your 4/3 tile behavior */
  height: 100%;
  min-height: 150px;
  border-right: 1px solid #222;
}

/* Ensure the image fills the left column cleanly */
.product-media--row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Body becomes right column */
.product-body--row {
  padding: 1rem;
}

/* Title row: title left, sku right */
.product-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.product-sku {
  font-size: 0.85rem;
  color: #777;
  white-space: nowrap;
}

/* CTA at bottom */
.product-meta {
  margin-top: auto;
  padding-top: 0.5rem;
  color: var(--store-text-muted);
  font-weight: 600;
}

.product-cta {
  display: inline-block;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #222;
  background: #0b0b0b;
}

/* =========================
   Product cards: row layout
========================= */

.product-card--row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
  align-items: stretch;

  text-decoration: none; /* because it's now an <a> */
  color: inherit;
  border-radius: 10px;
}

/* make hover feel like your old cards */
.product-card--row:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Media area becomes fixed-width left column */
.product-media--row {
  aspect-ratio: auto;          /* override your 4/3 tile behavior */
  height: 100%;
  min-height: 150px;
  border-right: 1px solid #222;
}

/* Ensure the image fills the left column cleanly */
.product-media--row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Body becomes right column */
.product-body--row {
  padding: 1rem;
}

/* Title row: title left, sku right */
.product-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.product-sku {
  font-size: 0.85rem;
  color: #777;
  white-space: nowrap;
}

/* CTA at bottom */
.product-meta {
  margin-top: auto;
  padding-top: 0.5rem;
  color: #bbb;
  font-weight: 600;
}

.product-cta {
  display: inline-block;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #222;
  background: #0b0b0b;
}

/* Mobile: stack image on top, info below */
@media (max-width: 520px) {
  .product-card--row {
    grid-template-columns: 1fr;
  }

  .product-media--row {
    border-right: 0;
    border-bottom: 1px solid #222;
    min-height: 200px;
  }
}

.btn-primary {
  background-color: #ff6f00;
  color: #000;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  justify-self: center;
}