/*
  AMBLE visual polish layer
  This file intentionally overrides existing component styles without changing
  API calls, authentication, cart logic, checkout logic, or page structure.
*/

body {
  background:
    radial-gradient(circle at 8% 4%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 26rem),
    radial-gradient(circle at 92% 18%, color-mix(in srgb, var(--warning) 6%, transparent), transparent 30rem),
    var(--bg);
}

.site-header {
  filter: drop-shadow(0 8px 20px rgba(29, 22, 17, 0.035));
}

.nav {
  border-bottom-color: color-mix(in srgb, var(--border) 62%, transparent);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.nav__inner {
  min-height: 76px;
}

.nav__wordmark {
  letter-spacing: 0.19em;
  text-shadow: 0 1px 0 color-mix(in srgb, var(--surface) 65%, transparent);
}

.icon-button,
.nav__account,
.menu-button {
  border: 1px solid transparent;
}

.icon-button:hover,
.nav__account:hover,
.menu-button:hover {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.btn {
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.btn:hover {
  box-shadow: var(--shadow-sm);
}

.btn--primary {
  background: linear-gradient(135deg, var(--text), color-mix(in srgb, var(--text) 86%, var(--accent)));
}

.btn--accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
}

.hero__panel {
  isolation: isolate;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow:
    0 26px 70px rgba(54, 34, 22, .19),
    inset 0 1px 0 rgba(255,255,255,.22);
}

.hero__panel::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(28, 17, 11, .22), transparent 58%),
    linear-gradient(180deg, transparent 58%, rgba(27, 17, 11, .15));
  content: "";
  pointer-events: none;
}

.hero__content,
.hero__visual {
  z-index: 2;
}

.hero__title {
  text-wrap: balance;
  text-shadow: 0 3px 28px rgba(30, 17, 10, .22);
}

.hero__copy {
  max-width: 32rem;
  text-wrap: pretty;
}

.hero__kicker,
.hero__badge {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

.value-strip {
  gap: var(--space-3);
  overflow: visible;
  border: 0;
  background: transparent;
}

.value-strip__item {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.value-strip__item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.value-strip__icon {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

.catalog-section {
  padding-top: clamp(4rem, 8vw, 7rem);
}

.section-head {
  padding-bottom: var(--space-2);
}

.section-title {
  max-width: 17ch;
  text-wrap: balance;
}

.catalog-toolbar {
  position: sticky;
  top: 84px;
  z-index: 20;
  padding: var(--space-3);
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.chip {
  background: var(--surface);
}

.chip[aria-pressed="true"] {
  box-shadow: var(--shadow-sm);
}

.search input,
.select-control {
  border-color: color-mix(in srgb, var(--border-strong) 78%, transparent);
  background: var(--bg);
}

.product-grid {
  gap: clamp(1rem, 2vw, 1.6rem);
}

.product-card {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: 0 1px 1px rgba(38, 29, 22, .03);
  transition:
    transform var(--transition-base),
    border-color var(--transition-base),
    box-shadow var(--transition-base);
}

.product-card:hover,
.product-card:focus-within {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.product-card__media {
  border-radius: 0;
  box-shadow: none;
}

.product-card__media::after {
  position: absolute;
  inset: auto 0 0;
  z-index: 0;
  height: 25%;
  background: linear-gradient(180deg, transparent, rgba(20,15,12,.08));
  content: "";
  pointer-events: none;
}

.product-card__media img {
  object-position: center;
}

.product-card__badge {
  border: 1px solid rgba(255,255,255,.34);
  box-shadow: 0 8px 24px rgba(30,20,14,.09);
}

.product-card__quick {
  right: var(--space-4);
  bottom: var(--space-4);
  left: var(--space-4);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 8px 24px rgba(24,18,14,.18);
  backdrop-filter: blur(10px);
}

.product-card__body {
  display: block;
  min-height: 118px;
  padding: var(--space-4);
}

.product-card__name {
  font-size: .98rem;
}

.product-card__price {
  padding: .2rem .45rem;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  font-size: .76rem;
}

.product-card__stock {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .6rem;
}

.product-card__stock::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.state-message {
  min-height: 330px;
  margin-block: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-sm);
}

.breadcrumbs {
  margin-top: var(--space-2);
}

.product-detail {
  align-items: start;
}

.product-gallery__main {
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 50% 40%, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-sm);
}

.product-gallery__main img {
  padding: clamp(.5rem, 2vw, 1.25rem);
}

.product-gallery__thumb {
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(38,29,22,.05);
}

.product-gallery__thumb[aria-current="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent);
}

.product-info {
  position: sticky;
  top: 104px;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.product-info__title {
  text-wrap: balance;
}

.product-info__price {
  display: inline-block;
  padding: .45rem .75rem;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
}

.product-buybox {
  border-color: var(--border-strong);
  box-shadow: none;
}

.product-perks li {
  padding: .55rem .7rem;
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.form-field input,
.form-field select,
.form-field textarea {
  box-shadow: inset 0 1px 1px rgba(35, 25, 18, .025);
}

.auth-panel {
  background:
    radial-gradient(circle at 75% 15%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 22rem),
    var(--bg);
}

.auth-card {
  width: min(100%, 560px);
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  box-shadow: var(--shadow-md);
}

.cart-lines {
  display: grid;
  gap: var(--space-3);
}

.cart-line {
  overflow: hidden;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.cart-line__image {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.cart-line__image img {
  transition: transform var(--transition-base);
}

.cart-line:hover .cart-line__image img {
  transform: scale(1.035);
}

.order-summary,
.checkout-card {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.order-summary {
  border-color: var(--border-strong);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 98%, transparent), var(--surface));
}

.summary-row--total {
  padding-top: var(--space-4);
}

.progress {
  height: 8px;
  background: var(--surface-3);
}

.checkout-card__head {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.checkout-item {
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.checkout-item__image {
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.order-card {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.order-card:hover {
  transform: translateY(-2px);
}

.confirmation-card {
  background:
    radial-gradient(circle at 50% 0, color-mix(in srgb, var(--positive) 10%, transparent), transparent 22rem),
    var(--surface);
}

.footer {
  border-top-color: color-mix(in srgb, var(--border) 72%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, transparent), var(--surface));
}

.footer__brand {
  letter-spacing: .16em;
}

.toast {
  border-color: color-mix(in srgb, var(--surface) 14%, transparent);
  border-radius: var(--radius-lg);
}

@media (max-width: 820px) {
  .nav__inner {
    min-height: 66px;
  }

  .catalog-toolbar {
    top: 72px;
  }

  .product-info {
    position: static;
  }

  .product-card:hover,
  .product-card:focus-within {
    transform: none;
  }
}

@media (max-width: 560px) {
  body {
    background:
      radial-gradient(circle at 15% 2%, color-mix(in srgb, var(--accent) 5%, transparent), transparent 18rem),
      var(--bg);
  }

  .hero__panel {
    border-radius: var(--radius-xl);
  }

  .value-strip {
    gap: var(--space-2);
  }

  .value-strip__item {
    padding: var(--space-3) var(--space-4);
  }

  .catalog-toolbar {
    top: 68px;
    padding: var(--space-3);
    border-radius: var(--radius-lg);
  }

  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: .25rem;
    scrollbar-width: none;
  }

  .chips::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: 0 0 auto;
  }

  .product-grid {
    gap: .85rem;
  }

  .product-card {
    border-radius: var(--radius-lg);
  }

  .product-card__body {
    min-height: 120px;
    padding: .8rem;
  }

  .product-card__topline {
    display: block;
  }

  .product-card__price {
    display: inline-block;
    margin-top: .45rem;
  }

  .product-card__quick {
    right: .55rem;
    bottom: .55rem;
    left: .55rem;
  }

  .product-gallery__main img {
    padding: .35rem;
  }

  .product-info {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
  }

  .cart-line {
    padding: var(--space-3);
    border-radius: var(--radius-lg);
  }

  .auth-card {
    padding: var(--space-5);
  }
}

@media (prefers-reduced-motion: reduce) {
  .value-strip__item:hover,
  .product-card:hover,
  .order-card:hover {
    transform: none;
  }
}
