/* Last Chance Tyres - Size landing pages (/tyres/:slug) */
.tyres-body {
  background: #050811;
  color: #fff;
  font-family: 'Inter', sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tyres-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 9, 16, 0.9);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}

.tyres-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tyres-logo img {
  height: 36px;
  max-height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}

.tyres-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.tyres-nav a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.tyres-nav a:hover {
  color: #22c55e;
}

/* Cart link in header */
.tyres-cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  flex-shrink: 0;
}
.tyres-cart-link:hover {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}
.tyres-cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #10b981, #22c55e);
  color: #04120a;
  font-size: 0.68rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Target 2: full-width Add to Cart button (green-500 / hover green-600, white text, cart icon) */
.tyres-main .tyre-actions {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
}
.add-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 8px;
  min-height: 42px;
  border: none;
  border-radius: 8px;
  background: #22c55e; /* green-500 */
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.25);
}
.add-cart-btn:hover {
  background: #16a34a; /* green-600 */
  box-shadow: 0 8px 26px rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
}
.add-cart-btn:active {
  transform: translateY(0);
}
.add-cart-btn .cart-svg {
  flex-shrink: 0;
}
.add-cart-btn.btn-loading {
  background: #16a34a;
}
.add-cart-btn.btn-added {
  background: #10b981;
}
.tyres-main .tyre-actions .order-btn {
  margin-top: 0;
}

/* Toast */
.tyres-toast {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(15px);
  background: #0d1424;
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #e2e8f0;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  z-index: 500;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6);
  max-width: 90vw;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.tyres-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.tyres-toast.err {
  border-color: #ef4444;
  color: #fca5a5;
}

.tyres-main {
  flex: 1;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.tyres-hero {
  margin-bottom: 32px;
}

.tyres-crumb {
  font-size: 0.8rem;
  color: #64748b;
  margin: 0 0 10px;
}

.tyres-crumb a {
  color: #22c55e;
  text-decoration: none;
}

.tyres-crumb a:hover {
  text-decoration: underline;
}

.tyres-hero h1 {
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.3px;
}

.tyres-sub {
  color: #94a3b8;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 820px;
  margin: 0 0 20px;
}

.size-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.size-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.size-chip:hover {
  border-color: rgba(34, 197, 94, 0.5);
  color: #fff;
}

.size-chip.active {
  background: linear-gradient(135deg, #10b981, #22c55e);
  border-color: transparent;
  color: #04120a;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.35);
}

.variant-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.variant-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.variant-chip:hover {
  border-color: rgba(34, 197, 94, 0.5);
  color: #fff;
}

.variant-chip.active {
  background: linear-gradient(135deg, #10b981, #22c55e);
  border-color: transparent;
  color: #04120a;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.35);
}

.tyre-card[data-variant].is-hidden {
  display: none;
}

.tyres-main .tyre-grid {
  grid-template-columns: repeat(2, 1fr);
}

.tyres-main .tyre-card {
  background: rgba(255, 255, 255, 0.04);
}

.tyres-cta {
  margin-top: 40px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.tyres-cta p {
  color: #cbd5e1;
  font-size: 1rem;
  margin: 0;
  font-weight: 600;
}

.tyres-cta .btn {
  min-width: 200px;
}

.tyres-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 22px 20px;
  text-align: center;
}

.tyres-footer p {
  color: #64748b;
  font-size: 0.8rem;
  margin: 0;
}

@media (min-width: 992px) {
  .tyres-main .tyre-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .tyres-main .tyre-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .tyres-nav {
    gap: 10px;
  }
  .tyres-nav a:not(.tyres-cart-link) {
    font-size: 0.78rem;
  }
  .tyres-nav a[href="/track/"] {
    display: none;
  }
  .tyres-cart-link {
    width: 36px;
    height: 36px;
  }
  .add-cart-btn {
    font-size: 0.78rem;
    min-height: 38px;
  }
}
/* ---- clickable tyre photo + lightbox ---- */
.tyre-zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  line-height: 0;
}
.tyre-zoom .tyre-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tyres-lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.tyres-lightbox.hidden { display: none; }
.tyres-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.8);
  backdrop-filter: blur(8px);
  cursor: pointer;
}
.tyres-lightbox-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  background: #0d1424;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  animation: modalPop 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tyres-lightbox-x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(3, 6, 12, 0.75);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tyres-lightbox-img-wrap {
  background: #080c14;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 92vh;
}
.tyres-lightbox-img-wrap img {
  width: 100%;
  height: auto;
  max-height: 92vh;
  object-fit: contain;
  display: block;
}
@media (max-width: 767px) {
  .tyres-lightbox { padding: 10px; }
  .tyres-lightbox-card { max-width: 90vw; }
}
