/* ============================================================
   Gifts for Cyclists — Styles
   ============================================================ */

:root {
  --col-bg:           #f7f6f2;
  --col-surface:      #ffffff;
  --col-border:       #e2e0d8;
  --col-text:         #1a1a18;
  --col-muted:        #6b6b62;
  --col-accent:       #2d6a35;
  --col-accent-lt:    #eaf4eb;
  --col-cta:          #e05b1a;
  --col-cta-hover:    #c74e13;
  --col-cta-success:  #2d6a35;
  --col-badge:        #fff3e0;
  --col-badge-text:   #8a4500;
  --col-featured-border: #f0d070;
  --col-featured-bg:  #fffbf0;

  --radius: 10px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --font:   'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--col-bg);
  color: var(--col-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ============================================================
   Header (shared)
   ============================================================ */

header {
  background: var(--col-accent);
  color: #fff;
  padding: 1.5rem;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Index page: big centred title */
.header-text {
  flex: 1;
}

header h1 {
  font-size: clamp(1.3rem, 3.5vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

header p.tagline {
  font-size: 0.95rem;
  opacity: 0.88;
  margin-top: 0.25rem;
}

/* Basket page: site name as link */
a.site-title {
  color: #fff;
  text-decoration: none;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  flex: 1;
}

a.site-title:hover { opacity: 0.85; }

/* Basket icon link */
.basket-link {
  position: relative;
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.basket-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.basket-count {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--col-cta);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ============================================================
   Index page layout
   ============================================================ */

.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 760px) {
  .page-wrap { grid-template-columns: 1fr; }
  aside      { position: static !important; }
}

/* ---- Filter sidebar ---- */

aside {
  position: sticky;
  top: 1.5rem;
}

.filter-panel {
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.filter-panel h2 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--col-muted);
  margin-bottom: 1rem;
}

.filter-group { margin-bottom: 1.4rem; }

.filter-group h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--col-muted);
  margin-bottom: 0.5rem;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.2rem 0;
}

.filter-group label:hover { color: var(--col-accent); }

.filter-group input[type="checkbox"] {
  accent-color: var(--col-accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.btn-clear {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.55rem;
  background: none;
  border: 1px solid var(--col-border);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--col-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-clear:hover { border-color: var(--col-accent); color: var(--col-accent); }

/* ---- Results bar ---- */

main { min-width: 0; }

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: var(--col-muted);
}

#count-label strong { color: var(--col-text); }

/* ---- Product grid ---- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.product-card.is-featured {
  border-color: var(--col-featured-border);
  background: var(--col-featured-bg);
}

.card-image {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--col-bg);
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--col-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}

.card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--col-muted);
  line-height: 1.45;
}

.card-why {
  font-size: 0.82rem;
  color: var(--col-accent);
  font-style: italic;
  line-height: 1.45;
  margin-top: auto;
  padding-top: 0.4rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--col-border);
  gap: 0.5rem;
}

.card-price-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.card-price {
  font-size: 1.05rem;
  font-weight: 800;
}

.card-budget {
  font-size: 0.7rem;
  background: var(--col-badge);
  color: var(--col-badge-text);
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
  align-self: flex-start;
}

/* ---- Add to Basket button ---- */

.btn-add-basket {
  background: var(--col-cta);
  color: #fff;
  border: none;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}

.btn-add-basket:hover  { background: var(--col-cta-hover); }

.btn-add-basket.btn-added {
  background: var(--col-cta-success);
  cursor: default;
}

/* ---- Empty state ---- */

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--col-muted);
  grid-column: 1 / -1;
}

.empty-state p { margin-top: 0.5rem; }

/* ============================================================
   Basket page
   ============================================================ */

.basket-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 720px) {
  .basket-page { grid-template-columns: 1fr; }
}

.basket-heading {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

/* Empty basket */
.basket-empty-msg {
  color: var(--col-muted);
  margin-bottom: 1rem;
}

.btn-back {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--col-accent);
  text-decoration: none;
  font-weight: 600;
}

.btn-back:hover { text-decoration: underline; }

/* Basket rows */
.basket-row {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--col-border);
}

@media (max-width: 500px) {
  .basket-row { grid-template-columns: 64px 1fr auto; }
  .basket-qty-ctrl, .basket-line-price { display: none; }
}

.basket-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--col-bg);
}

.basket-info { min-width: 0; }

.basket-title {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.35;
}

.basket-unit-price {
  font-size: 0.8rem;
  color: var(--col-muted);
  margin-top: 2px;
}

.basket-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  background: var(--col-bg);
  border: 1px solid var(--col-border);
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}

.qty-btn:hover { border-color: var(--col-accent); }

.qty-val {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.basket-line-price {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.basket-remove {
  background: none;
  border: none;
  color: var(--col-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
}

.basket-remove:hover { color: #c00; }

/* Order summary panel */
.summary-panel {
  background: var(--col-surface);
  border: 1px solid var(--col-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 1.5rem;
}

.summary-panel h2 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  padding: 0.4rem 0;
  color: var(--col-muted);
}

.summary-total {
  font-size: 1rem;
  color: var(--col-text);
  border-top: 1px solid var(--col-border);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

.summary-total strong {
  font-size: 1.15rem;
  font-weight: 800;
}

.summary-note {
  font-size: 0.78rem;
  color: var(--col-muted);
  margin: 0.75rem 0 1rem;
}

/* Checkout button — intentionally disabled */
.btn-checkout {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background: #b0b0a8;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: not-allowed;
  opacity: 0.8;
}


/* ============================================================
   FAQ section
   ============================================================ */

.faq-section {
  background: var(--col-surface);
  border-top: 1px solid var(--col-border);
  padding: 3rem 1.25rem;
}

.faq-inner {
  max-width: 760px;
  margin: 0 auto;
}

.faq-inner h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--col-text);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-top: 1px solid var(--col-border);
  padding: 1.1rem 0;
}

.faq-item:last-child {
  border-bottom: 1px solid var(--col-border);
}

.faq-item dt {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--col-text);
  margin-bottom: 0.4rem;
}

.faq-item dd {
  font-size: 0.88rem;
  color: var(--col-muted);
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   Footer (shared)
   ============================================================ */

footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.8rem;
  color: var(--col-muted);
  border-top: 1px solid var(--col-border);
}
