/* ============================================================
   components.css — Logitech Pakistan reusable components.
   Uses tokens.css. Mobile-first. Zero JS dependency.
   ============================================================ */

/* === @font-face declarations live in fonts.css (lowercase filenames
       match the actual files on the case-sensitive server). The duplicate
       PascalCase declarations that used to live here were 404'ing on
       Linux origins. === */

/* === Reset / base ====================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-primary);
  background: var(--color-bg-page);
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul, ol { padding: 0; }

/* === Typography classes ================================ */
.text-display, h1.display {
  font-family: var(--font-heading);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  font-weight: var(--fw-xbold);
  margin: 0;
}

.text-h1, h1 {
  font-family: var(--font-heading);
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: var(--ls-h1);
  font-weight: var(--fw-bold);
  margin: 0 0 var(--space-4);
}

.text-h2, h2 {
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  font-weight: var(--fw-bold);
  margin: 0 0 var(--space-4);
}

.text-h3, h3 {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  letter-spacing: var(--ls-h3);
  font-weight: var(--fw-bold);
  margin: 0 0 var(--space-3);
}

.text-h4, h4 {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
  letter-spacing: var(--ls-h4);
  font-weight: var(--fw-semibold);
  margin: 0 0 var(--space-3);
}

.text-h5, h5 {
  font-family: var(--font-heading);
  font-size: var(--fs-h5);
  line-height: var(--lh-h5);
  font-weight: var(--fw-semibold);
  margin: 0 0 var(--space-2);
}

.text-h6, h6 {
  font-family: var(--font-heading);
  font-size: var(--fs-h6);
  line-height: var(--lh-h6);
  font-weight: var(--fw-semibold);
  margin: 0 0 var(--space-2);
}

.text-body-lg, p.lead {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
}

.text-body, p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  margin: 0 0 var(--space-4);
}

.text-body-sm, small {
  font-size: var(--fs-body-sm);
  line-height: 1.5;
}

.text-caption {
  font-size: var(--fs-caption);
  line-height: 1.4;
}

.text-overline {
  font-size: var(--fs-overline);
  line-height: 1.2;
  letter-spacing: var(--ls-overline);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-inverse { color: var(--color-text-inverse); }
.text-error { color: var(--color-error); }
.text-success { color: var(--color-success); }

/* === Layout ============================================ */
.container {
  max-width: var(--container-default);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container-narrow { max-width: var(--container-narrow); }
.container-wide   { max-width: var(--container-wide); }

.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

@media (min-width: 1024px) {
  .section {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
  }
}

.stack > * + * { margin-top: var(--space-4); }
.stack-sm > * + * { margin-top: var(--space-2); }
.stack-lg > * + * { margin-top: var(--space-8); }

/* === Focus ring ======================================== */
*:focus { outline: none; }

*:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
  border-radius: inherit;
}

/* === Buttons =========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  min-height: 44px;
  font-family: var(--font-body);
  font-size: var(--fs-button);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-button);
  line-height: var(--lh-tight);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--motion-fast),
              border-color var(--motion-fast),
              color var(--motion-fast),
              transform var(--motion-fast);
  user-select: none;
}

.btn:active { transform: translateY(1px); }

/* Variants */
.btn--primary {
  background: var(--color-cta-primary-bg);
  color: var(--color-cta-primary-text);
}
.btn--primary:hover { background: var(--color-cta-primary-bg-hover); }

.btn--secondary {
  background: transparent;
  border-color: var(--color-cta-secondary-border);
  color: var(--color-text-primary);
}
.btn--secondary:hover { background: var(--color-cta-secondary-bg-hover); }

.btn--ghost {
  background: transparent;
  color: var(--color-text-primary);
}
.btn--ghost:hover { background: var(--color-bg-surface); }

.btn--link {
  background: transparent;
  color: var(--color-text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: var(--space-1) var(--space-2);
  min-height: auto;
}
.btn--link:hover { color: var(--color-accent-mint-dark); }

.btn--inverse-primary {
  background: var(--color-bg-page);
  color: var(--color-text-primary);
}
.btn--inverse-primary:hover { background: var(--color-bg-surface); }

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: white;
}
.btn--whatsapp:hover { background: #1FAF52; }

/* Sizes */
.btn--sm  { min-height: 36px; padding: var(--space-2) var(--space-4); font-size: var(--fs-body-sm); }
.btn--md  { /* default */ }
.btn--lg  { min-height: 52px; padding: var(--space-4) var(--space-8); font-size: var(--fs-body-lg); }
.btn--xl  { min-height: 60px; padding: var(--space-5) var(--space-10); font-size: 18px; }

/* States */
.btn:disabled,
.btn--disabled {
  background: var(--color-border-strong) !important;
  border-color: var(--color-border-strong) !important;
  color: var(--color-text-tertiary) !important;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--color-cta-primary-text);
  animation: spin 1s linear infinite;
}
.btn--secondary.btn--loading::after,
.btn--ghost.btn--loading::after { color: var(--color-text-primary); }

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

/* Touch target enforcement on mobile (Pakistan-mobile-heavy rule) */
@media (max-width: 767px) {
  .btn { min-height: var(--touch-target-min); }
  .btn--sm { min-height: 44px; }
}

/* === Form fields ======================================= */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.field__label {
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
}

.field__label--required::after {
  content: ' *';
  color: var(--color-error);
}

.field__helper {
  font-size: var(--fs-caption);
  color: var(--color-text-secondary);
}

.field__error {
  font-size: var(--fs-caption);
  color: var(--color-error);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  min-height: 44px;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--motion-fast);
}

.input:hover,
.textarea:hover,
.select:hover { border-color: var(--color-border-strong); }

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border: 2px solid var(--color-accent-mint);
  padding: calc(var(--space-3) - 1px) calc(var(--space-4) - 1px);
}

.input--error,
.textarea--error,
.select--error {
  border: 2px solid var(--color-error);
  padding: calc(var(--space-3) - 1px) calc(var(--space-4) - 1px);
}

.input--success,
.textarea--success,
.select--success {
  border: 2px solid var(--color-success);
  padding: calc(var(--space-3) - 1px) calc(var(--space-4) - 1px);
}

.input:disabled,
.textarea:disabled,
.select:disabled {
  background: var(--color-bg-surface);
  color: var(--color-text-tertiary);
  cursor: not-allowed;
}

.textarea { min-height: 120px; resize: vertical; }

/* Select with chevron */
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  padding-right: var(--space-10);
}

/* Checkbox / radio */
.check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-size: var(--fs-body);
  user-select: none;
}

.check__input {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--color-text-primary);
}

/* === Badges, tags, pills ============================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 4px 8px;
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  line-height: 1.2;
}

.badge--default     { background: var(--color-bg-surface); color: var(--color-text-primary); }
.badge--brand       { background: var(--color-accent-mint); color: var(--color-text-primary); }
.badge--sale        { background: var(--color-error); color: white; }
.badge--bestseller  { background: var(--color-bg-inverse); color: white; }
.badge--cod         { background: var(--color-accent-lime); color: var(--color-text-primary); }
.badge--stock-in    { background: rgba(22, 163, 74, 0.1); color: var(--color-success); }
.badge--stock-out   { background: rgba(214, 54, 56, 0.1); color: var(--color-error); }
.badge--authorized  { background: var(--color-bg-inverse); color: white; padding-left: 4px; }
.badge--authorized::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--color-accent-mint);
  border-radius: 50%;
  display: inline-block;
}

.pill {
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: var(--fs-body-sm);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-subtle);
}

.tag:hover {
  background: white;
  border-color: var(--color-text-primary);
}

/* === Stock indicator dot =============================== */
.stock-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
}

.stock-indicator::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.stock-indicator--in    { color: var(--color-success); }
.stock-indicator--out   { color: var(--color-error); }

/* === Breadcrumbs ======================================= */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-body-sm);
  color: var(--color-text-secondary);
  padding: var(--space-4) 0;
  list-style: none;
  margin: 0;
}

.breadcrumbs__sep {
  color: var(--color-text-tertiary);
  user-select: none;
}

.breadcrumbs a {
  color: var(--color-text-secondary);
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: var(--color-text-primary);
  text-decoration: underline;
}
.breadcrumbs__current {
  color: var(--color-text-primary);
}

/* === Pagination ======================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
  background: var(--color-bg-page);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background-color var(--motion-fast);
}

.pagination a:hover { background: var(--color-bg-surface); }

.pagination .current,
.pagination [aria-current="page"] {
  background: var(--color-bg-inverse);
  color: white;
  border-color: var(--color-bg-inverse);
}

.pagination .disabled {
  color: var(--color-text-tertiary);
  pointer-events: none;
}

/* === Accordions ======================================== */
.accordion { width: 100%; }

.accordion__item {
  border-bottom: 1px solid var(--color-border-subtle);
}

.accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-4) 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
}

.accordion__chevron {
  width: 16px; height: 16px;
  flex-shrink: 0;
  transition: transform var(--motion-base);
}

.accordion__item--open .accordion__chevron { transform: rotate(180deg); }

.accordion__body {
  display: none;
  padding: 0 0 var(--space-4);
  color: var(--color-text-secondary);
  line-height: var(--lh-body);
}

.accordion__item--open .accordion__body { display: block; }

/* === Tabs ============================================== */
.tabs {
  width: 100%;
}

.tabs__list {
  display: flex;
  gap: var(--space-6);
  border-bottom: 1px solid var(--color-border-subtle);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tabs__btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: var(--space-3) 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--motion-fast), border-color var(--motion-fast);
}

.tabs__btn:hover { color: var(--color-text-primary); }

.tabs__btn[aria-selected="true"] {
  color: var(--color-text-primary);
  font-weight: var(--fw-semibold);
  border-bottom-color: var(--color-text-primary);
}

.tabs__panel { padding: var(--space-6) 0; }

/* === Cards: generic ==================================== */
.card {
  background: var(--color-bg-page);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--motion-base), box-shadow var(--motion-base), border-color var(--motion-base);
  border: 1px solid transparent;
}

.card--bordered { border-color: var(--color-border-subtle); }

.card--hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-subtle);
}

/* === Product card ======================================
   Card is an <article> (NOT <a>) because the swatches inside are <button>s.
   HTML5 forbids interactive elements inside an anchor — that breaks layout.
   The whole card is still clickable via the stretched-link pattern below.
*/
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-page);
  /* Always-on hairline border so cards have definition on white surfaces too. */
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--motion-base), box-shadow var(--motion-base), border-color var(--motion-base);
  text-decoration: none;
  color: inherit;
  position: relative;
}

/* Stretched link covers the entire card — gives "click anywhere" UX */
.product-card__stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  font-size: 0;
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
  text-decoration: none;
}

.product-card__stretched-link:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: calc(-1 * var(--focus-ring-width));
  border-radius: var(--radius-md);
}

/* Make all interactive children sit above the stretched link
   so they receive their own clicks instead of routing to the link */
.product-card__swatches,
.product-card__actions {
  position: relative;
  z-index: 2;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-card__image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-bg-page);
  padding: var(--space-3);  /* 12px (was 16px — tightened 2026-05-05) */
  overflow: hidden;
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--motion-slow);
}

.product-card:hover .product-card__image { transform: scale(1.03); }

.product-card__badges {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  z-index: 2;
}

.product-card__stock {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 2;
}

.product-card__actions {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  right: var(--space-3);
  display: flex;
  gap: var(--space-2);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--motion-base), transform var(--motion-base);
  z-index: 2;
}

@media (hover: hover) {
  .product-card:hover .product-card__actions {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: none) {
  /* Mobile / touch — always visible */
  .product-card__actions {
    opacity: 1;
    transform: none;
    position: static;
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg-surface);
  }
}

.product-card__content {
  padding: var(--space-3);            /* 12px */
  display: flex;
  flex-direction: column;
  gap: var(--space-2);                /* 8px — enterprise breathing room. Combined with
                                         12px content padding (was 16) + smaller eyebrow
                                         11px + tagline 13px + title line-height 1.2,
                                         gives a clean, calm card without bloating. */
  flex: 1;
}

.product-card__eyebrow {
  font-size: 11px;                    /* tightened 2026-05-05 from 12px (--fs-overline) */
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-overline);
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.product-card__title {
  font-family: var(--font-heading);
  font-size: 15px;                    /* tightened 2026-05-06 from --fs-h4 (18-20px) — felt too large vs price/eyebrow */
  font-weight: var(--fw-semibold);
  line-height: 1.3;
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* Tagline — short (5-10 word) supporting line, sourced from
   WC short_description. Hidden if empty. Logitech.com style.
   Tightened 2026-05-05: 13px, line-height 1.3, 1 line clamp, no margin. */
.product-card__tagline {
  font-family: var(--font-body);
  font-size: 13px;                     /* tightened 2026-05-05 from 14px */
  font-weight: var(--fw-regular);
  line-height: 1.3;                    /* tightened from 1.4 */
  color: var(--color-text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hide row entirely when empty (so there's no awkward 14px gap on
   simple products with no short_description). */
.product-card__tagline:empty { display: none; }

.product-card__rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-body-sm);
  color: var(--color-text-secondary);
}

.product-card__rating-stars {
  color: #F59E0B;
  letter-spacing: 1px;
}

.product-card__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.product-card__price {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  color: var(--color-text-primary);
}

.product-card__price--sale { color: var(--color-error); }

.product-card__price-strike {
  font-size: var(--fs-body-sm);
  color: var(--color-text-tertiary);
  text-decoration: line-through;
  font-weight: var(--fw-regular);
}

/* === Variant image swatches (Option A — locked 2026-05-05) ===
   Used on product cards for variable products. Hidden if product has no
   variants. Cap of 4 thumbnails + "+N more" overflow pill. Hover any
   swatch swaps .product-card__image; click follows variant permalink.
================================================================== */
.product-card__swatches {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.swatch {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: white;
  border: 1.5px solid transparent;
  border-radius: 4px;
  padding: 2px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--motion-fast), transform var(--motion-fast);
}

.swatch:hover {
  border-color: var(--color-border-strong);
  transform: scale(1.05);
}

.swatch.is-active {
  border-color: var(--color-text-primary);
}

.swatch img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.swatch:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.swatch--more {
  background: var(--color-bg-surface);
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-caps);
}

.swatch--more:hover {
  background: var(--color-bg-inverse);
  color: white;
  border-color: var(--color-bg-inverse);
}

/* Out-of-stock state */
.product-card--out .product-card__image-wrap {
  filter: grayscale(0.6) opacity(0.7);
}

.product-card--out .product-card__image-wrap::after {
  content: 'Out of stock';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.85);
  color: white;
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
}

/* === Payment method selector (Option A — final, locked 2026-05-05) ===
   Compact horizontal tile. Icon left, content middle, classic radio
   indicator right. Hidden native <input type="radio"> preserves
   accessibility + keyboard nav + form-submit semantics.

   Stacked group at checkout via .payment-methods.
   Selected tile gets a black border + light fill + a disclosure panel
   below (sibling .payment-method__details).
================================================================== */

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.payment-method {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-page);
  border: 1.5px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--motion-fast), background-color var(--motion-fast);
  user-select: none;
}

.payment-method:hover {
  border-color: var(--color-text-secondary);
}

.payment-method__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0; height: 0;
}

/* Selected state */
.payment-method:has(.payment-method__input:checked),
.payment-method.is-selected {
  border-color: var(--color-text-primary);
  background: #FAFAFA;
}

/* Keyboard focus ring on the whole tile */
.payment-method:has(.payment-method__input:focus-visible) {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.payment-method__icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
}

.payment-method__icon svg { width: 28px; height: 28px; }

.payment-method__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.payment-method__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h5);
  font-weight: var(--fw-semibold);
  line-height: 1.3;
  color: var(--color-text-primary);
  margin: 0;
}

.payment-method__desc {
  font-size: var(--fs-body-sm);
  line-height: 1.4;
  color: var(--color-text-secondary);
  margin: 0;
}

/* Lime fee callout — COD only ("+ COD Tax & Charges 4.5%") */
.payment-method__fee {
  display: inline-block;
  align-self: flex-start;
  margin-top: var(--space-2);
  padding: 2px 8px;
  background: var(--color-accent-lime);
  color: var(--color-text-primary);
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  border-radius: 3px;
}

/* Indicator — classic radio circle (20px), filled black dot when selected */
.payment-method__indicator {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border-strong);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  transition: border-color var(--motion-fast);
}

.payment-method:has(.payment-method__input:checked) .payment-method__indicator,
.payment-method.is-selected .payment-method__indicator {
  border-color: var(--color-text-primary);
}

.payment-method:has(.payment-method__input:checked) .payment-method__indicator::after,
.payment-method.is-selected .payment-method__indicator::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--color-text-primary);
  border-radius: 50%;
}

/* Disclosure block — appears below selected tile */
.payment-method__details {
  display: none;
  padding: var(--space-3) var(--space-5);
  margin-top: -4px; /* overlap parent's bottom border */
  background: #FAFAFA;
  border: 1.5px solid var(--color-text-primary);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: var(--fs-body-sm);
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.payment-method:has(.payment-method__input:checked) + .payment-method__details,
.payment-method.is-selected + .payment-method__details {
  display: block;
}

/* === Skeleton loader =================================== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-bg-surface) 0%,
    var(--color-bg-subtle) 50%,
    var(--color-bg-surface) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-pulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* === WhatsApp floating button ========================== */
.whatsapp-fab {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 56px; height: 56px;
  background: var(--color-whatsapp);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-sticky);
  transition: transform var(--motion-base), box-shadow var(--motion-base);
}

.whatsapp-fab:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

@media (max-width: 767px) {
  .whatsapp-fab { width: 48px; height: 48px; bottom: var(--space-4); right: var(--space-4); }
}

/* === Authorized dealer seal — three sizes ============= */
.auth-seal {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-bg-inverse);
  color: white;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
}

.auth-seal::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--color-accent-mint);
  border-radius: 50%;
  display: inline-block;
}

.auth-seal--inline {
  font-size: var(--fs-body-sm);
  padding: 4px 8px;
  text-transform: none;
  letter-spacing: 0;
}

.auth-seal--block {
  display: flex;
  flex-direction: column;
  text-align: center;
  padding: var(--space-6);
  font-size: var(--fs-h4);
  text-transform: none;
  letter-spacing: 0;
  border-radius: var(--radius-lg);
  width: 300px;
  max-width: 100%;
}

.auth-seal--block::before {
  width: 40px; height: 40px;
  margin: 0 auto var(--space-3);
}

/* === Trust badges row ================================== */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  padding: var(--space-12) 0;
  background: var(--color-bg-surface);
}

@media (min-width: 768px) {
  .trust-badges { grid-template-columns: repeat(4, 1fr); }
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-4);
  gap: var(--space-2);
}

.trust-badge__icon {
  width: 32px; height: 32px;
  color: var(--color-text-primary);
}

.trust-badge__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h5);
  font-weight: var(--fw-semibold);
  margin: 0;
}

.trust-badge__sub {
  font-size: var(--fs-caption);
  color: var(--color-text-secondary);
  margin: 0;
}

/* === Toast ============================================= */
.toast {
  position: fixed;
  top: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-bg-inverse);
  color: white;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  font-size: var(--fs-body-sm);
}

/* === Utility helpers =================================== */
.flex   { display: flex; }
.grid   { display: grid; }
.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.gap-1 { gap: var(--space-1); } .gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); } .gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); } .gap-8 { gap: var(--space-8); }

/* === Skip-to-content link ============================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-bg-inverse);
  color: white;
  padding: var(--space-2) var(--space-4);
  z-index: var(--z-toast);
  text-decoration: none;
}

.skip-link:focus { top: 0; }
