/**
 * Store page — production-ready layout.
 * Data: includes/store_products.php. View: pages/store.php.
 */

.store-page {
  --store-container-max: 1280px;
  --store-gutter: clamp(1rem, 4vw, 2rem);
  --store-primary: #1B4F93;
  --store-primary-light: #2a6bb8;
  --store-text: #282828;
  --store-text-muted: #555;
  --store-tint: #f5f8fc;
  --store-card-bg: #fff;
  --store-card-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --store-card-shadow-hover: 0 8px 24px rgba(27, 79, 147, 0.12);
  --store-radius: 10px;
  --store-link-color: #1B4F93;
  --store-link-hover: #0d3a6b;
  --store-remove-bg: #c00;
  --store-remove-bg-hover: #a00000;
}

/* Visually hidden but available to screen readers */
.store-page .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Hero (title + subtitle, HD-Accessories style) ---- */
.store-hero {
  background: linear-gradient(135deg, var(--store-primary) 0%, #0d3a6b 100%);
  color: #fff;
  padding: clamp(2rem, 5vw, 3.5rem) var(--store-gutter);
  text-align: center;
}

.store-hero__container {
  max-width: var(--store-container-max);
  margin: 0 auto;
}

.store-hero__title {
  margin: 0 0 0.35em;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.store-hero__subtitle {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  opacity: 0.92;
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Intro ---- */
.store-intro {
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--store-gutter);
}

.store-intro__container {
  max-width: var(--store-container-max);
  margin: 0 auto;
}

.store-intro__text {
  margin: 0;
  font-size: clamp(0.9375rem, 1.5vw, 1.125rem);
  line-height: 1.6;
  color: var(--store-text);
  max-width: 52em;
}

/* ---- Category section ---- */
.store-category {
  padding: clamp(2rem, 5vw, 3rem) var(--store-gutter);
}

.store-category--tint {
  background: var(--store-tint);
}

.store-category__container {
  max-width: var(--store-container-max);
  margin: 0 auto;
}

.store-category__title {
  margin: 0 0 1.25rem;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 700;
  color: var(--store-primary);
  border-bottom: 3px solid var(--store-primary);
  padding-bottom: 0.35rem;
  display: inline-block;
}

/* ---- Product grid ---- */
.store-products {
  display: block;
}

.store-products--grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .store-products--grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .store-products--grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* ---- Product card (with image, full-card link) ---- */
article.store-product {
  text-align: center;
}
.store-product {
  background: var(--store-card-bg);
  border-radius: var(--store-radius);
  overflow: hidden;
  box-shadow: var(--store-card-shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.store-product:hover {
  box-shadow: var(--store-card-shadow-hover);
  transform: translateY(-2px);
}

.store-product__link-wrap {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 0;
}

.store-product a:hover {
  text-decoration: none;
}


.store-product__image-section {
  position: relative;
  width: 100%;
  padding-top: 60%;
  background: var(--store-tint);
  overflow: hidden;
}

.store-product__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 1rem;
}

.store-product__title {
  margin: 0;
  padding: 1.1rem 1.25rem 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--store-text);
  line-height: 1.3;
  transition: color 0.2s ease;
}

.store-product__desc {
  margin: 0;
  padding: 0 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--store-text-muted);
}

.store-product__desc:last-of-type {
  margin-bottom: 0;
}

.store-product__action {
  display: inline-block;
  margin: 0.75rem 1.25rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--store-link-color);
  transition: color 0.2s ease;
}

/* .store-product__action::after {
  content: " →";
  opacity: 0.8;
} */

.store-product__link-wrap:focus {
  outline: 2px solid var(--store-primary);
  outline-offset: 2px;
}

.store-product__link-wrap:hover .store-product__title,
.store-product__link-wrap:hover .store-product__action {
  color: var(--store-link-color);
}

/* ---- Bottom info block (two-column, HD-Accessories style) ---- */
.store-info {
  padding: clamp(2rem, 5vw, 3.5rem) var(--store-gutter);
  background: var(--store-tint);
}

.store-info__container {
  max-width: var(--store-container-max);
  margin: 0 auto;
}

.store-info__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .store-info__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
  }
}

.store-info__block {
  padding: 0;
}

.store-info__heading {
  margin: 0 0 0.75rem;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 700;
  color: var(--store-primary);
  line-height: 1.3;
}

.store-info__text {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--store-text);
}

.store-info__cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.65rem 1.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #00a651;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.store-info__cta:hover {
  background: #008f46;
  color: #fff;
}

/* ========== Product detail page ========== */
.store-page--detail .store-hero--detail {
  padding-bottom: clamp(1.5rem, 4vw, 2rem);
}

.store-breadcrumb {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.store-breadcrumb a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  transition: color 0.2s ease;
}

.store-breadcrumb a:hover {
  color: #fff;
}

.store-breadcrumb a:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.store-breadcrumb__sep {
  margin: 0 0.35rem;
  color: rgba(255, 255, 255, 0.7);
}

.store-breadcrumb [aria-current="page"] {
  color: rgba(255, 255, 255, 0.95);
}

.store-hero__meta {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.88;
}

.store-hero__container {
  position: relative;
}

.store-hero__cart-link {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.store-hero__cart-link:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.store-hero__cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  font-size: 0.8125rem;
  background: #fff;
  color: var(--store-primary);
  border-radius: 999px;
}

.store-hero__cart-count.is-empty {
  opacity: 0.7;
}

.store-detail {
  padding: clamp(2rem, 5vw, 3.5rem) var(--store-gutter);
}

.store-detail__container {
  max-width: var(--store-container-max);
  margin: 0 auto;
}

.store-detail__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 768px) {
  .store-detail__grid {
    grid-template-columns:  minmax(280px, 42%) 1fr;
    gap: 2.5rem;
  }
}

.store-detail__media {
  position: sticky;
  top: calc(var(--mh-bar-height, 80px) + 1rem);
}

/* Mobile: prevent image from sticking so text does not go behind it */
@media (max-width: 767.98px) {
  .store-detail__media {
    position: static;
  }
}

.store-detail__gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.store-detail__image-wrap {
  position: relative;
  width: 100%;
  background: var(--store-tint);
  border-radius: var(--store-radius);
  overflow: hidden;
  padding-top: 75%;
}

.store-detail__image-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: transform 0.2s ease;
}

.store-detail__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 1.5rem;
}

/* Zoom controls on main image */
.store-detail__zoom-btn {
  position: absolute;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  color: var(--store-primary);
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.store-detail__zoom-btn:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.store-detail__zoom-btn:focus {
  outline: 2px solid var(--store-primary);
  outline-offset: 2px;
}

.store-detail__zoom-btn--in {
  top: 0.75rem;
  right: 0.75rem;
}

.store-detail__zoom-btn--out {
  top: 0.75rem;
  right: 3.25rem;
}

.store-detail__expand-btn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.store-detail__expand-btn:hover {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.store-detail__expand-btn:focus {
  outline: 2px solid var(--store-primary);
  outline-offset: 2px;
}

.store-detail__expand-icon {
  font-size: 1.1rem;
  color: var(--store-primary);
  line-height: 1;
}

/* Alternate images thumbnails */
.store-detail__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.store-detail__thumb {
  display: block;
  width: 4rem;
  height: 4rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--store-tint);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.store-detail__thumb:hover {
  border-color: var(--store-primary-light);
  box-shadow: 0 2px 8px rgba(27, 79, 147, 0.2);
}

.store-detail__thumb:focus {
  outline: none;
  border-color: var(--store-primary);
  box-shadow: 0 0 0 2px rgba(27, 79, 147, 0.3);
}

.store-detail__thumb.is-active {
  border-color: var(--store-primary);
  box-shadow: 0 0 0 2px rgba(27, 79, 147, 0.25);
}

.store-detail__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox */
.store-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.store-lightbox[hidden] {
  display: none;
}

.store-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.store-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.store-lightbox__close:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.store-lightbox__zoom-controls {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 999px;
}

.store-lightbox__zoom-btn {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.store-lightbox__zoom-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.store-lightbox__zoom-value {
  min-width: 3rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.store-lightbox__inner {
  max-width: 90vw;
  max-height: 80vh;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: transform 0.2s ease;
}

.store-lightbox__image {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.store-detail__content {
  min-width: 0;
}

.store-detail__body {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--store-text);
}

.store-detail__body p {
  margin: 0 0 1rem;
}

.store-detail__body p:last-child {
  margin-bottom: 0;
}

.store-detail__section-heading {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--store-primary);
  line-height: 1.3;
}

.store-detail__price {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--store-primary);
}

.store-detail__body .store-detail__section-heading:first-child {
  margin-top: 0;
}

/* Sizing option (e.g. TMS Coil Positioning Caps) */
.store-detail__sizing {
  margin-top: 1.5rem;
}

.store-detail__sizing-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--store-text);
}

.store-detail__size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.store-detail__size-btn {
  padding: 0.5rem 0.85rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--store-primary);
  background: #fff;
  border: 2px solid var(--store-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.store-detail__size-btn:hover {
  background: var(--store-tint);
  color: var(--store-link-hover);
  border-color: var(--store-link-hover);
}

.store-detail__size-btn.is-active {
  background: var(--store-primary);
  color: #fff;
  border-color: var(--store-primary);
}

.store-detail__size-btn:focus {
  outline: 2px solid var(--store-primary);
  outline-offset: 2px;
}

.store-detail__size-range {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--store-text-muted);
  margin-top: 0.15rem;
}

.store-detail__size-btn.is-active .store-detail__size-range {
  color: rgba(255, 255, 255, 0.9);
}

.store-detail__size-required {
  display: none;
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  color: #c00;
}

.store-detail__quantity {
  margin-top: 1.25rem;
}

.store-detail__quantity-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--store-text);
}

.store-detail__quantity-controls {
  display: inline-flex;
  align-items: center;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  overflow: hidden;
}

.store-detail__qty-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  color: var(--store-primary);
  background: var(--store-tint);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.store-detail__qty-btn:hover {
  background: rgba(27, 79, 147, 0.1);
  color: var(--store-link-hover);
}

.store-detail__qty-btn:focus {
  outline: 2px solid var(--store-primary);
  outline-offset: -2px;
}

.store-detail__qty-input {
  width: 3rem;
  height: 2.5rem;
  padding: 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  color: var(--store-text);
  background: #fff;
  border: none;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  -moz-appearance: textfield;
}

.store-detail__qty-input::-webkit-outer-spin-button,
.store-detail__qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.store-detail__qty-input:focus {
  outline: 2px solid var(--store-primary);
  outline-offset: -2px;
}

.store-detail__cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
}

.store-detail__add-to-cart {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #00a651;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.store-detail__add-to-cart:hover:not(:disabled) {
  background: #008f46;
  color: #fff;
}

.store-detail__add-to-cart:disabled {
  opacity: 0.85;
  cursor: default;
}

.store-detail__add-to-cart:focus {
  outline: 2px solid #0d3a6b;
  outline-offset: 2px;
}

.store-detail__cta,
.store-detail__cta--secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--store-primary);
  background: transparent;
  border: 2px solid var(--store-primary);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.store-detail__cta:hover,
.store-detail__cta--secondary:hover {
  background: var(--store-primary);
  color: #fff;
}

.store-detail__cta:focus,
.store-detail__cta--secondary:focus {
  outline: 2px solid #0d3a6b;
  outline-offset: 2px;
}

.store-info__cta:focus {
  outline: 2px solid #0d3a6b;
  outline-offset: 2px;
}

/* ---- Product detail: Description / Specifications / Technical details ---- */
.store-detail__sections {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .store-detail__sections {
    grid-template-columns: 1fr;
    margin-top: 3rem;
    padding-top: 2.5rem;
  }
}

.store-detail__section {
  padding: 0;
}

.store-detail__section .store-detail__section-heading {
  margin-bottom: 1rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--store-primary);
  display: inline-block;
}

.store-detail__spec-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.store-detail__spec-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem 0;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

@media (min-width: 480px) {
  .store-detail__spec-row {
    grid-template-columns: minmax(10rem, 14rem) 1fr;
    gap: 0.75rem 1.5rem;
  }
}

.store-detail__spec-row:last-child {
  border-bottom: none;
}

.store-detail__spec-term {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--store-text);
}

.store-detail__spec-value {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--store-text-muted);
  line-height: 1.5;
}

.store-detail__tech-content {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--store-text);
}

.store-detail__tech-content p {
  margin: 0 0 0.75rem;
}

.store-detail__tech-content p:last-child {
  margin-bottom: 0;
}

/* ---- Tabbed layout (Specifications & Technical details) ---- */
.store-detail__tabs-wrap {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.store-detail__tabs-title {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--store-primary);
}

.store-detail__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
  background: var(--store-tint);
  border-radius: var(--store-radius) var(--store-radius) 0 0;
  overflow: hidden;
}

.store-detail__tab {
  margin: 0;
  padding: 0.85rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--store-text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.store-detail__tab:hover {
  color: var(--store-primary);
  background: rgba(255, 255, 255, 0.7);
}

.store-detail__tab--active {
  color: var(--store-primary);
  background: #fff;
  border-bottom-color: var(--store-primary);
  box-shadow: 0 -1px 0 0 #fff;
}

.store-detail__tab:focus {
  outline: 2px solid var(--store-primary);
  outline-offset: 2px;
}

.store-detail__tabpanels {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-top: none;
  border-radius: 0 0 var(--store-radius) var(--store-radius);
  padding: 1.25rem 1.5rem;
  min-height: 6rem;
}

.store-detail__tabpanel {
  display: none;
  animation: store-tab-fade 0.2s ease;
}

.store-detail__tabpanel--active {
  display: block;
}

.store-detail__tabpanel[hidden] {
  display: none !important;
}

@keyframes store-tab-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.store-detail__spec-list--tabs {
  margin: 0;
  padding: 0;
}

.store-detail__spec-list--tabs .store-detail__spec-row {
  padding: 0.65rem 0;
}

.store-detail__spec-list--tabs .store-detail__spec-row:first-child {
  padding-top: 0;
}

.store-detail__features-list {
  margin: 0 0 0 1.25rem;
  padding: 0;
  list-style: disc;
}

.store-detail__features-list li {
  margin: 0.5rem 0;
  line-height: 1.5;
  color: var(--store-text, #333);
}

.store-detail__features-list li:first-child {
  margin-top: 0;
}

/* ---- Cart page ---- */
.store-detail--cart {
  padding-top: 1.5rem;
}

.store-cart__empty-msg {
  margin: 0 0 1rem;
  font-size: 1.0625rem;
  color: var(--store-text-muted);
}

.store-cart__list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0 0 var(--store-radius) var(--store-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

/* Cart page container: shared grid column widths so header and items align */
.store-cart {
  --store-cart-col-product: 1fr;
  --store-cart-col-unit: 6.5rem;
  --store-cart-col-qty: 7.5rem;
  --store-cart-col-total: 6.5rem;
  --store-cart-col-actions: 5.5rem;
}

.store-cart__header {
  display: grid;
  grid-template-columns: var(--store-cart-col-product) var(--store-cart-col-unit) var(--store-cart-col-qty) var(--store-cart-col-total) var(--store-cart-col-actions);
  align-items: center;
  gap: 0 1rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--store-text-muted);
  background: var(--store-tint);
  border-radius: var(--store-radius) var(--store-radius) 0 0;
}

@media (max-width: 639px) {
  .store-cart__header {
    display: none;
  }
}

.store-cart__header-label--product {
  justify-self: start;
}

.store-cart__header-label--unit,
.store-cart__header-label--total {
  justify-self: end;
  text-align: right;
}

.store-cart__header-label--qty {
  justify-self: center;
  text-align: center;
}

.store-cart__header-label--actions {
  justify-self: center;
  min-width: 0;
}

.store-cart__item {
  display: grid;
  grid-template-columns: var(--store-cart-col-product) var(--store-cart-col-unit) var(--store-cart-col-qty) var(--store-cart-col-total) var(--store-cart-col-actions);
  align-items: center;
  gap: 0 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}

.store-cart__item-unit-price,
.store-cart__item-line-total {
  justify-self: end;
  text-align: right;
}

.store-cart__qty-controls {
  justify-self: center;
}

.store-cart__remove {
  justify-self: center;
}

@media (max-width: 639px) {
  .store-cart__item {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  .store-cart__item-title { grid-column: 1 / -1; }
  .store-cart__item-unit-price { grid-column: 1; }
  .store-cart__qty-controls { grid-column: 2; justify-self: end; }
  .store-cart__item-line-total { grid-column: 1; }
  .store-cart__remove { grid-column: 2; justify-self: end; }
}

.store-cart__item:last-child {
  border-bottom: none;
}

.store-cart__item-title {
  font-weight: 600;
  color: var(--store-text);
}

.store-cart__item-desc {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--store-text-muted);
  max-width: 32rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.store-cart__item-unit-price {
  font-size: 0.9375rem;
  color: var(--store-text-muted);
  white-space: nowrap;
}

.store-cart__item-line-total {
  font-weight: 600;
  color: var(--store-text);
  white-space: nowrap;
}

.store-cart__summary {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--store-tint);
  border-radius: var(--store-radius);
}

.store-cart__total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.store-cart__total-label {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--store-text);
}

.store-cart__total-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--store-primary);
}

.store-cart__item-size {
  font-weight: 400;
  color: var(--store-text-muted);
}

.store-cart__qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  overflow: hidden;
}

.store-cart__qty-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  color: var(--store-primary);
  background: var(--store-tint);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.store-cart__qty-btn:hover {
  background: rgba(27, 79, 147, 0.12);
  color: var(--store-link-hover);
}

.store-cart__qty-btn:focus {
  outline: 2px solid var(--store-primary);
  outline-offset: -2px;
}

.store-cart__qty-value {
  min-width: 2rem;
  padding: 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  color: var(--store-text);
  background: #fff;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.store-cart__remove {
  padding: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--store-remove-bg);
  border: 1px solid var(--store-remove-bg);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.store-cart__remove-icon {
  font-size: 2em;
  line-height: 1;
}

.store-cart__remove:hover {
  background: var(--store-remove-bg-hover);
  color: #fff;
}

.store-cart__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.store-cart__checkout {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #00a651;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.store-cart__checkout:hover {
  background: #008f46;
  color: #fff;
}

.store-cart__back {
  display: inline-block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--store-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
.store-cart__back.btn-cta {
  color: #fff;
}
.store-cart__back.btn-cta:hover {
  color: var(--store-tint);
}

.store-cart__back:hover {
  color: var(--store-link-hover);
}

.store-cart__back--secondary {
  padding: 0.5rem 0;
}

@media (prefers-reduced-motion: reduce) {
  .store-product,
  .store-product__link-wrap:hover .store-product__title,
  .store-product__link-wrap:hover .store-product__action,
  .store-breadcrumb a,
  .store-detail__cta,
  .store-detail__add-to-cart,
  .store-detail__size-btn,
  .store-detail__qty-btn,
  .store-detail__tab,
  .store-hero__cart-link,
  .store-cart__qty-btn,
  .store-info__cta,
  .store-detail__image-inner,
  .store-lightbox__inner,
  .store-cart__remove,
  .store-cart__checkout {
    transition: none;
  }
  .store-detail__tabpanel {
    animation: none;
  }
}
