:root {
  --tyre-red: #c8102e;
  --tyre-red-dark: #9e0c24;
  --tyre-black: #111111;
  --tyre-dark: #1a1a1a;
  --tyre-muted: #6b6b6b;
  --tyre-border: #e5e5e5;
  --tyre-bg: #f7f7f7;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--tyre-black);
  background: #fff;
  line-height: 1.5;
}

/* Preloader — matches brand splash (wheel + wordmark) */
.tyre-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.tyre-preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.tyre-preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.35rem;
  text-align: center;
  padding: 1rem;
}

.tyre-spinner {
  width: 96px;
  height: 96px;
}

.tyre-spinner-svg {
  width: 100%;
  height: 100%;
  display: block;
  animation: tyre-spin 1.1s linear infinite;
  filter: drop-shadow(0 0 12px rgba(200, 16, 46, 0.25));
}

.tyre-preloader-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.8vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.35;
}

.tyre-preloader-text .is-white { color: #fff; }
.tyre-preloader-text .is-red { color: var(--tyre-red); }

@keyframes tyre-spin {
  to { transform: rotate(360deg); }
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--tyre-red); }

img { max-width: 100%; height: auto; display: block; }

.container-tyre {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

/* Top bar */
.tyre-topbar {
  background: var(--tyre-red);
  color: #fff;
  font-size: 0.8125rem;
  padding: 0.45rem 0;
}

.tyre-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
  min-height: 36px;
}

.tyre-topbar a { color: #fff; }
.tyre-topbar a:hover { opacity: 0.85; color: #fff; }

.tyre-social {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-shrink: 0;
}

.tyre-social a {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.tyre-topbar-meta {
  display: none;
  gap: 1rem;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.tyre-topbar-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.tyre-topbar-meta i { margin-right: 0.35rem; }

.tyre-topbar-phone {
  flex-shrink: 0;
  margin-left: auto;
}

.tyre-topbar-phone a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  white-space: nowrap;
  max-width: 52vw;
}

.tyre-topbar-phone span {
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 991.98px) {
  .tyre-topbar {
    padding: 0.4rem 0;
  }

  .tyre-topbar-inner {
    gap: 0.5rem;
  }

  /* Compact mobile bar: socials left, phone right — hide long address/hours */
  .tyre-topbar-meta {
    display: none !important;
  }

  .tyre-social {
    gap: 0.35rem;
    max-width: 55%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tyre-social::-webkit-scrollbar { display: none; }

  .tyre-social a {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    font-size: 0.65rem;
  }

  .tyre-topbar-phone a {
    font-size: 0.78rem;
    max-width: 42vw;
  }

  .tyre-brand img {
    height: 44px;
  }

  .tyre-brand-name {
    font-size: 0.8rem;
  }

  .tyre-header-bar {
    min-height: 64px;
  }
}

@media (min-width: 992px) {
  .tyre-topbar {
    font-size: 0.875rem;
    padding: 0.55rem 0;
  }

  .tyre-topbar-meta {
    display: flex;
  }

  .tyre-topbar-phone {
    margin-left: 0;
  }

  .tyre-topbar-phone a {
    max-width: none;
  }

  .tyre-social {
    gap: 0.75rem;
  }

  .tyre-social a {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
}

/* Header */
.tyre-header {
  background: #fff;
  border-bottom: 1px solid var(--tyre-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.tyre-header-bar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 76px;
  gap: 0.75rem;
}

.tyre-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.2rem;
  justify-self: center;
}

.tyre-brand img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.tyre-brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
}

.tyre-brand-name span { color: var(--tyre-red); }

.tyre-nav-toggle,
.tyre-header-end {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--tyre-black);
}

.tyre-header-end {
  pointer-events: none;
}

.tyre-nav {
  display: none;
  background: #fff;
  border-top: 1px solid var(--tyre-border);
  padding: 0.75rem 0 1rem;
}

.tyre-nav.open { display: block; }

.tyre-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tyre-nav a {
  display: block;
  padding: 0.6rem 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
  white-space: nowrap;
}

.tyre-nav a.active,
.tyre-nav a:hover { color: var(--tyre-red); }

@media (min-width: 992px) {
  .tyre-header-bar {
    grid-template-columns: 1fr;
    min-height: 84px;
    padding-top: 0.35rem;
  }

  .tyre-nav-toggle,
  .tyre-header-end {
    display: none;
  }

  .tyre-nav {
    display: block;
    border-top: 0;
    padding: 0 0 0.85rem;
  }

  .tyre-nav ul {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 1.75rem;
  }

  .tyre-nav a {
    padding: 0.35rem 0;
    font-size: 0.88rem;
  }
}

@media (min-width: 1200px) {
  .tyre-nav ul { gap: 2.25rem; }
  .tyre-nav a { font-size: 0.92rem; }
}

/* Hero */
.tyre-hero {
  position: relative;
  min-height: min(72vh, 640px);
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.72)),
    radial-gradient(circle at 30% 40%, #333 0%, #0d0d0d 70%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.tyre-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 18px,
      rgba(255,255,255,0.02) 18px,
      rgba(255,255,255,0.02) 19px
    );
  pointer-events: none;
}

.tyre-hero-content { position: relative; z-index: 1; padding: 4rem 1rem; }

.tyre-hero-kicker {
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

.tyre-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.tyre-hero h1 span { color: var(--tyre-red); }

.tyre-hero-tagline {
  font-style: italic;
  font-size: 1.15rem;
  opacity: 0.9;
  margin: 0;
}

.tyre-hero-since {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

/* Search band */
.tyre-search {
  background: var(--tyre-red);
  color: #fff;
  padding: 2.5rem 0;
}

.tyre-search h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin: 0 0 0.35rem;
  text-align: center;
}

.tyre-search p {
  text-align: center;
  margin: 0 0 1.5rem;
  opacity: 0.92;
}

.tyre-search-panel {
  background: rgba(0,0,0,0.18);
  border-radius: 12px;
  padding: 1.25rem;
  max-width: 720px;
  margin: 0 auto;
}

.tyre-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tyre-tabs a,
.tyre-tabs button {
  border: 1px solid rgba(255,255,255,0.35);
  background: transparent;
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.tyre-tabs a.active,
.tyre-tabs button.active,
.tyre-tabs a:hover {
  background: #fff;
  color: var(--tyre-red);
}

.tyre-search-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tyre-search-row input,
.tyre-search-row select {
  flex: 1;
  min-width: 140px;
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font: inherit;
}

.tyre-search-row .btn-search {
  background: var(--tyre-black);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.tyre-search-row .btn-search:hover { background: #000; }

/* Sections */
.tyre-section { padding: 3.5rem 0; }
.tyre-section.alt { background: var(--tyre-bg); }

.tyre-section-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 1.5rem;
  text-align: center;
}

.tyre-section-title span { color: var(--tyre-red); }

/* Category cards */
.tyre-cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .tyre-cats { grid-template-columns: 1fr; }
}

.tyre-cat {
  position: relative;
  min-height: 180px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
  color: #fff;
  background: var(--tyre-dark);
}

.tyre-cat::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,0.75));
}

.tyre-cat-body { position: relative; z-index: 1; }
.tyre-cat h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.35rem;
}
.tyre-cat span {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--tyre-red);
  padding-bottom: 2px;
}

.tyre-cat-tyre { background: linear-gradient(135deg, #222, #111 50%, #3a0a12); }
.tyre-cat-rim { background: linear-gradient(135deg, #1d1d1d, #2a2a2a 40%, #111); }
.tyre-cat-acc { background: linear-gradient(135deg, #2b1010, #111 55%, #3a3a3a); }

/* Product grid */
.tyre-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 992px) {
  .tyre-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .tyre-grid { grid-template-columns: 1fr; }
}

.tyre-card {
  background: #fff;
  border: 1px solid var(--tyre-border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tyre-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.tyre-card-media {
  aspect-ratio: 1 / 1;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.tyre-card-media img {
  max-height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

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

.tyre-card-brand {
  color: var(--tyre-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.tyre-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.tyre-card-size { color: var(--tyre-muted); font-size: 0.85rem; }

.tyre-card-price {
  margin-top: auto;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--tyre-red);
}

.tyre-card-cta {
  display: inline-block;
  margin-top: 0.5rem;
  background: var(--tyre-black);
  color: #fff !important;
  text-align: center;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tyre-card-cta:hover { background: var(--tyre-red); }

/* Brands */
.tyre-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.tyre-brands a {
  border: 1px solid var(--tyre-border);
  background: #fff;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
}

.tyre-brands a:hover {
  border-color: var(--tyre-red);
  color: var(--tyre-red);
}

/* About / contact */
.tyre-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .tyre-split { grid-template-columns: 1fr; }
}

.tyre-about h2,
.tyre-contact h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  margin-top: 0;
}

.tyre-about ul {
  padding-left: 1.1rem;
  margin: 1rem 0 0;
}

.tyre-contact-card {
  background: var(--tyre-bg);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.tyre-contact-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tyre-contact-card p { margin: 0.25rem 0; color: var(--tyre-muted); }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #25d366;
  color: #fff !important;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-weight: 700;
}

.btn-whatsapp:hover { filter: brightness(0.95); color: #fff !important; }

/* Listing filters */
.tyre-filters {
  background: #fff;
  border: 1px solid var(--tyre-border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  align-items: end;
}

.tyre-filters label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.tyre-filters input,
.tyre-filters select {
  width: 100%;
  border: 1px solid var(--tyre-border);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  font: inherit;
}

.tyre-filters button {
  background: var(--tyre-red);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

/* Product detail */
.tyre-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .tyre-detail { grid-template-columns: 1fr; }
}

.tyre-detail-media {
  background: var(--tyre-bg);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.tyre-detail-media img { max-height: 360px; object-fit: contain; }

.tyre-gallery {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.tyre-gallery img {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--tyre-border);
  cursor: pointer;
}

.tyre-specs {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.tyre-specs th,
.tyre-specs td {
  border-bottom: 1px solid var(--tyre-border);
  padding: 0.55rem 0;
  text-align: left;
}

.tyre-specs th {
  width: 40%;
  color: var(--tyre-muted);
  font-weight: 600;
}

.tyre-price-lg {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--tyre-red);
  margin: 0.5rem 0 1rem;
}

.page-banner {
  background: var(--tyre-black);
  color: #fff;
  padding: 2rem 0;
}

.page-banner h1 {
  margin: 0;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Footer */
.tyre-footer {
  background: #0f0f0f;
  color: #ddd;
  padding: 3rem 0 1.5rem;
}

.tyre-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .tyre-footer-grid { grid-template-columns: 1fr; }
}

.tyre-footer h4 {
  color: #fff;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1rem;
}

.tyre-footer a { color: #ccc; }
.tyre-footer a:hover { color: #fff; }

.tyre-footer ul { list-style: none; margin: 0; padding: 0; }
.tyre-footer li { margin-bottom: 0.45rem; }

.tyre-footer-brand img {
  height: 48px;
  margin-bottom: 0.75rem;
}

.tyre-footer-bottom {
  border-top: 1px solid #2a2a2a;
  padding-top: 1rem;
  font-size: 0.85rem;
  color: #888;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.tyre-footer .tyre-social a {
  border-color: #444;
}

.alert-flash {
  background: #e8f8ef;
  color: #146c43;
  border: 1px solid #b6e2c8;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin: 1rem auto;
  width: min(1180px, calc(100% - 2rem));
}

.empty-state {
  text-align: center;
  color: var(--tyre-muted);
  padding: 2.5rem 1rem;
  border: 1px dashed var(--tyre-border);
  border-radius: 10px;
}

/* Pagination */
.tyre-pagination-wrap {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.tyre-pagination ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.tyre-pagination li {
  display: inline-flex;
}

.tyre-pagination a,
.tyre-pagination span {
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tyre-border);
  border-radius: 8px;
  background: #fff;
  color: var(--tyre-black);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tyre-pagination a:hover {
  border-color: var(--tyre-red);
  color: var(--tyre-red);
}

.tyre-pagination .is-active span {
  background: var(--tyre-red);
  border-color: var(--tyre-red);
  color: #fff;
}

.tyre-pagination .is-disabled span {
  opacity: 0.4;
  cursor: not-allowed;
}
