.age-pending,
.age-denied,
body:has(.basket-dialog[open]) {
  overflow: hidden;
}

.age-denied #store-content {
  visibility: hidden;
}

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-items: safe center;
  justify-items: center;
  overflow: auto;
  padding: 18px;
  background: rgb(25 22 18 / 72%);
}

.age-card {
  display: grid;
  width: min(100%, 420px);
  gap: 14px;
  padding: clamp(24px, 6vw, 40px);
  background: var(--white);
  border-radius: 22px;
  box-shadow: 0 20px 60px rgb(21 18 14 / 26%);
  text-align: center;
}

.age-brand {
  margin-bottom: 6px;
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1.1;
}

.age-brand span {
  display: block;
  margin-top: 5px;
  color: var(--gold-dark);
  font: 700 11px/1.3 Arial, sans-serif;
  letter-spacing: .22em;
}

.age-card h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.age-card h1:focus {
  outline: none;
}

.age-card p {
  color: var(--muted);
  font-size: 15px;
}

.age-actions {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.age-actions .btn {
  margin: 0;
}

.basket-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(100%, 440px);
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--white);
  color: var(--ink);
  box-shadow: -12px 0 42px rgb(25 22 18 / 18%);
}

.basket-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.basket-dialog::backdrop {
  background: rgb(25 22 18 / 55%);
}

.basket-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px 12px 22px;
  border-bottom: 1px solid var(--line);
}

.basket-dialog-header h2 {
  font-size: 21px;
  font-weight: 700;
}

.basket-close {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  font-size: 27px;
  line-height: 1;
}

.basket-close:hover {
  background: var(--paper);
}

.basket-dialog-content {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 20px clamp(14px, 5vw, 24px) calc(24px + env(safe-area-inset-bottom));
}

.basket-panel-fallback {
  padding: 12px 22px;
  border-top: 1px solid var(--line);
}

.basket-page {
  max-width: 760px;
  margin-inline: auto;
}

.basket-empty {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 24px 0 42px;
  text-align: center;
}

.basket-empty p {
  font-size: 17px;
  font-weight: 700;
}

.basket-items {
  margin: 0 0 15px;
  padding: 0;
  list-style: none;
}

.basket-item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.basket-item img {
  width: 100%;
  height: 70px;
  padding: 4px;
  object-fit: contain;
  border-radius: 9px;
  background: var(--paper);
}

.basket-item-name {
  font-weight: 700;
  overflow-wrap: anywhere;
}

.basket-item-controls,
.basket-quantity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
}

.basket-item-controls {
  margin-top: 6px;
}

.basket-add-quantity input,
.basket-quantity input {
  width: 55px;
  min-height: 34px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
}

.basket-price {
  white-space: nowrap;
}

.basket-stock {
  color: #8e3427;
}

.basket-coupon {
  margin-bottom: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.basket-coupon[open] summary {
  margin-bottom: 9px;
}

.basket-checkout {
  margin: 14px 0 10px;
}

.basket-continue {
  display: block;
  text-align: center;
}

.add-to-basket {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.basket-add-quantity {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.add-to-basket .btn {
  margin: 0;
}

.add-to-basket-compact .btn {
  flex: 1;
  width: auto;
  padding-inline: 8px;
}

.product-buttons {
  align-items: end;
  flex-wrap: wrap;
}

.basket-feedback:empty {
  display: none;
}

.basket-feedback:not(:empty) {
  position: fixed;
  right: 16px;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 50;
  max-width: min(calc(100% - 32px), 320px);
  padding: 12px 16px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 5px 22px rgb(25 22 18 / 18%);
}

.basket-feedback.is-error:not(:empty) {
  background: #8e3427;
}

.whatsapp-float {
  position: fixed;
  right: max(24px, calc(14px + env(safe-area-inset-right)));
  bottom: max(24px, calc(14px + env(safe-area-inset-bottom)));
  z-index: 20;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  color: #102b1b;
  box-shadow: 0 0 0 7px rgb(37 211 102 / 21%), 0 4px 18px rgb(10 54 26 / 22%);
}

.whatsapp-float svg {
  width: 34px;
  height: 34px;
}

.whatsapp-float:hover {
  background: #32df73;
}

body:has(.basket-dialog[open]) .whatsapp-float {
  visibility: hidden;
}

.whatsapp-float ~ .basket-feedback:not(:empty) {
  right: auto;
  left: 16px;
  max-width: min(calc(100% - 110px), 320px);
}

.checkout-whatsapp-note {
  margin-top: 12px;
}

.checkout-whatsapp-submit.btn {
  border-color: #166534;
  background: #166534;
  color: #fff;
}

@media (max-width: 760px) {
  .basket-feedback:not(:empty) {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 600px) {
  .whatsapp-float {
    right: max(16px, calc(8px + env(safe-area-inset-right)));
    bottom: calc(69px + env(safe-area-inset-bottom));
    width: 50px;
    height: 50px;
  }

  .whatsapp-float svg {
    width: 30px;
    height: 30px;
  }
}
