/* ==========================================================================
   School store — section landing, guided browse and product detail.
   Uses the global tokens from styles.css.
   ========================================================================== */

/* ---------- Section landing ---------------------------------------------- */

.store-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.store-section-card {
  display: grid;
  overflow: hidden;
  border-radius: var(--r);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.store-section-card:hover {
  transform: translateY(-6px);
  border-color: rgba(47, 166, 170, .45);
  box-shadow: var(--shadow-lg);
}

.store-section-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, var(--navy) 0%, var(--teal) 100%);
  overflow: hidden;
}

.store-section-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-section-initial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: 'Font_B', sans-serif;
  font-size: 56px;
  color: rgba(255, 255, 255, .92);
  text-transform: uppercase;
}

.store-section-body {
  display: grid;
  gap: 6px;
  padding: 20px 22px 22px;
}

.store-section-body strong {
  font-family: 'Font_B', sans-serif;
  font-size: 20px;
  color: var(--navy);
}

.store-section-body span {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--muted);
}

.store-section-body em {
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
}

/* ---------- Section header and tabs --------------------------------------- */

.store-head {
  padding: 34px 0 26px;
  background: linear-gradient(135deg, var(--navy2) 0%, var(--navy) 100%);
  color: #fff;
}

.store-head h1 {
  margin: 10px 0 8px;
  font-family: 'Font_B', sans-serif;
  font-size: clamp(26px, 3.4vw, 40px);
  color: #fff;
}

.store-head p {
  margin: 0;
  color: rgba(233, 244, 248, .84);
  max-width: 64ch;
}

.store-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(233, 244, 248, .8);
}

.store-crumbs a {
  color: rgba(233, 244, 248, .8);
}

.store-crumbs a:hover {
  color: #fff;
}

.store-crumbs strong {
  color: #fff;
}

.store-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.store-tab {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  transition: background .22s ease, border-color .22s ease;
}

.store-tab:hover {
  background: rgba(255, 255, 255, .18);
}

.store-tab.is-active {
  background: #fff;
  border-color: #fff;
  color: var(--navy);
}

/* ---------- Guided steps --------------------------------------------------- */

.store-step {
  margin-bottom: 28px;
}

.store-step-label {
  display: inline-block;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(47, 166, 170, .13);
  color: #1d7f83;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.store-step h2 {
  margin: 12px 0 14px;
  font-family: 'Font_B', sans-serif;
  font-size: 24px;
  color: var(--navy);
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--navy);
  font-family: 'Font_SB', sans-serif;
  font-weight: 700;
  font-size: 16px;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

.choice-chip:hover {
  transform: translateY(-2px);
  border-color: var(--teal);
  background: var(--paper);
}

.choice-chip.is-active {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 26px rgba(20, 56, 95, .22);
}

.grade-row .choice-chip {
  min-width: 66px;
  padding: 11px 16px;
}

.store-hint {
  padding: 22px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  background: var(--paper);
}

.store-hint strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}

.store-hint p {
  margin: 0;
  color: var(--muted);
}

.store-empty {
  margin: 0;
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: var(--r);
  color: var(--muted);
  text-align: center;
}

.store-results-head {
  margin-top: 30px;
}

.store-count {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(47, 166, 170, .12);
  color: #1d7f83;
  font-family: 'Font_B', sans-serif;
  font-size: 17px;
}

/* ---------- Package panel -------------------------------------------------- */

.package-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 26px;
  margin: 26px 0 6px;
  padding: 26px 28px;
  border-radius: var(--rl);
  background: linear-gradient(135deg, var(--navy2) 0%, var(--navy) 60%, #17557e 100%);
  color: #fff;
}

.package-copy .eyebrow {
  color: var(--yellow);
}

.package-copy .eyebrow:before {
  background: var(--mint);
}

.package-copy h2 {
  margin: 10px 0 8px;
  font-family: 'Font_B', sans-serif;
  color: #fff;
  font-size: 26px;
}

.package-copy p {
  margin: 0;
  color: rgba(233, 244, 248, .82);
  line-height: 1.7;
}

.package-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.package-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, .2);
  font-size: 14.5px;
}

.package-list a {
  color: #fff;
}

.package-list a:hover {
  color: var(--yellow);
}

.package-list span {
  color: rgba(233, 244, 248, .78);
  white-space: nowrap;
}

.package-price {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  text-align: center;
}

.package-was {
  color: rgba(233, 244, 248, .7);
  text-decoration: line-through;
  font-size: 15px;
}

.package-save {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy2);
  font-size: 13px;
  font-weight: 800;
  justify-self: center;
}

.package-price strong {
  font-family: 'Font_B', sans-serif;
  font-size: 32px;
  color: #fff;
}

.package-price small {
  font-size: 15px;
  color: rgba(233, 244, 248, .8);
}

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

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
  margin-top: 18px;
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(47, 166, 170, .45);
  box-shadow: var(--shadow-lg);
}

.product-card.is-package {
  border-color: rgba(224, 168, 13, .55);
}

.product-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: linear-gradient(140deg, #eef5f4 0%, #dbe9ea 100%);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.05);
}

.product-initial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: 'Font_B', sans-serif;
  font-size: 52px;
  color: var(--navy);
  opacity: .32;
  text-transform: uppercase;
}

.product-initial.large {
  position: static;
  min-height: 320px;
  font-size: 96px;
}

.product-badge {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy2);
  font-size: 12px;
  font-weight: 800;
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 18px 20px 20px;
}

.product-grade {
  align-self: flex-start;
  padding: 4px 11px;
  border-radius: 8px;
  background: rgba(47, 166, 170, .12);
  color: #1d7f83;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.product-body h3 {
  margin: 0;
  font-family: 'Font_SB', sans-serif;
  font-size: 17px;
  line-height: 1.4;
}

.product-body h3 a {
  color: var(--navy);
}

.product-body h3 a:hover {
  color: var(--teal);
}

.product-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
}

.product-price {
  font-family: 'Font_B', sans-serif;
  font-size: 21px;
  color: var(--navy);
}

.product-price small {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Product detail -------------------------------------------------- */

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.product-detail-media {
  position: relative;
  border-radius: var(--rl);
  overflow: hidden;
  background: linear-gradient(140deg, #eef5f4 0%, #dbe9ea 100%);
  border: 1px solid var(--line);
}

.product-detail-media img {
  width: 100%;
  height: auto;
  display: block;
}

.product-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-detail-body h1 {
  margin: 14px 0 10px;
  font-family: 'Font_B', sans-serif;
  font-size: clamp(24px, 3vw, 34px);
  color: var(--navy);
}

.product-detail-price {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Font_B', sans-serif;
  font-size: 30px;
  color: var(--navy);
}

.product-detail-price small {
  font-size: 15px;
  color: var(--muted);
}

.product-detail-price .package-save {
  background: rgba(224, 168, 13, .18);
  color: #8a6404;
}

.product-detail-text {
  margin: 16px 0;
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--muted);
}

.product-includes {
  margin: 18px 0;
  padding: 18px 20px;
  border-radius: var(--r);
  background: var(--paper);
  border: 1px solid var(--line);
}

.product-includes strong {
  display: block;
  margin-bottom: 10px;
  color: var(--navy);
}

.product-includes ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.product-includes li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 14.5px;
  color: var(--muted);
}

.product-includes a {
  color: var(--navy);
  font-weight: 600;
}

.product-includes a:hover {
  color: var(--teal);
}

/* ---------- Options --------------------------------------------------------- */

.product-options {
  display: grid;
  gap: 18px;
  margin-top: 8px;
  padding: 22px 24px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.option-label {
  display: block;
  margin-bottom: 9px;
  font-family: 'Font_SB', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: .03em;
  text-transform: uppercase;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.option-chip {
  position: relative;
  cursor: pointer;
}

.option-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-weight: 700;
  color: var(--navy);
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.option-chip:hover span {
  border-color: var(--teal);
}

.option-chip input:checked + span {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  border-color: transparent;
  color: #fff;
}

.option-chip input:focus-visible + span {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.quantity-block input {
  max-width: 130px;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.product-stock {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.stock-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
}

.stock-dot.in { background: #2b8d63 }
.stock-dot.pre { background: #e0a80d }
.stock-dot.out { background: #c00000 }

.store-messages p {
  margin: 0 0 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--paper);
  border-inline-start: 4px solid var(--teal);
  font-weight: 600;
  color: var(--navy);
}

/* ---------- Responsive ------------------------------------------------------ */

@media (max-width: 900px) {
  .package-panel,
  .product-detail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .product-grid,
  .store-sections {
    grid-template-columns: 1fr;
  }

  .store-head {
    padding: 26px 0 22px;
  }
}
