.shop-main {
  background: #fafbf9;
  padding-bottom: 60px;
}
.demo-note {
  text-align: center;
  background: #eef2e8;
  padding: 12px 20px;
  font-size: 13px;
  color: #3d5140;
}
.shop-intro {
  padding-block: 55px 40px;
}
.shop-intro h1 {
  font-size: clamp(34px, 4vw, 50px);
  letter-spacing: -1.5px;
}
.shop-intro > p:not(.eyebrow) {
  color: var(--muted);
  max-width: 660px;
}
.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}
.shop-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  flex-wrap: wrap;
}
.shop-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.shop-filters button {
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 11px 17px;
  background: white;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.shop-filters button[aria-pressed="true"] {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
.shop-search {
  font-size: 12px;
  color: var(--muted);
}
.shop-search input,
.shop-checkout input {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  font: inherit;
  background: white;
  color: var(--text);
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.shop-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.shop-card img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  background: #f1f3ef;
}
.shop-card-body {
  padding: 23px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.shop-card h2 {
  font-size: 21px;
  letter-spacing: -0.4px;
  margin: 9px 0;
}
.shop-badge {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
}
.shop-muted,
#result-count {
  color: var(--muted);
  font-size: 13px;
}
.shop-price {
  font-size: 25px;
  color: var(--brand);
  margin: 15px 0 0;
  font-weight: 700;
}
.shop-price small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.shop-card .button {
  margin-top: 18px;
  cursor: pointer;
}
.shop-card-body > p.shop-muted {
  margin-top: 0;
}
.shop-cart {
  background: white;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 12px;
  position: sticky;
  top: 120px;
}
.cart-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.cart-heading h2 {
  font-size: 23px;
  margin: 0;
}
.cart-heading span {
  font-size: 12px;
  color: var(--brand);
}
.cart-row {
  padding: 17px 0;
  border-bottom: 1px solid var(--border);
}
.cart-row strong {
  display: block;
  font-size: 14px;
}
.cart-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.cart-controls button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: white;
  cursor: pointer;
}
.cart-controls .remove {
  width: auto;
  padding-inline: 8px;
  margin-left: auto;
  font-size: 12px;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}
.shop-cart .button {
  width: 100%;
  padding-inline: 10px;
  cursor: pointer;
}
.shop-cart .button:disabled {
  opacity: 0.45;
  cursor: default;
}
.shop-text-button {
  display: block;
  background: none;
  border: 0;
  color: var(--muted);
  text-decoration: underline;
  margin: 15px auto 0;
  cursor: pointer;
}
.shop-checkout {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 35px;
  padding: 30px;
}
.shop-checkout .form-grid {
  margin-block: 25px;
}
.shop-checkout label {
  font-size: 14px;
}
.shop-checkout .button {
  cursor: pointer;
}
.shop-main [hidden] {
  display: none !important;
}
#product-dialog {
  width: min(700px, 92vw);
  max-height: 90vh;
  border: 0;
  border-radius: 14px;
  padding: 35px;
  color: var(--text);
}
#product-dialog::backdrop {
  background: #14251eb3;
}
.dialog-close {
  position: absolute;
  right: 12px;
  top: 8px;
  background: none;
  border: 0;
  font-size: 30px;
  cursor: pointer;
}
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  align-items: center;
}
.detail-layout img {
  width: 100%;
  height: auto;
  object-fit: contain;
}
.detail-layout h2 {
  font-size: 26px;
}
.detail-layout label {
  display: block;
  font-size: 13px;
  margin-top: 12px;
}
.detail-layout input,
.detail-layout select {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font: inherit;
}
.detail-layout .button {
  width: 100%;
  margin-top: 18px;
  cursor: pointer;
}
.shop-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: white;
  padding: 12px 22px;
  border-radius: 8px;
  z-index: 100;
  max-width: 90vw;
  pointer-events: none;
}
.shop-toast:empty {
  display: none;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b68b25;
  outline-offset: 3px;
}
@media (max-width: 1100px) {
  .shop-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 20px;
  }
}
@media (max-width: 800px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
  .shop-cart {
    position: static;
  }
  .shop-intro {
    padding-block: 35px;
  }
  .shop-grid {
    gap: 15px;
  }
}
@media (max-width: 550px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .shop-card img {
    height: 230px;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-layout img {
    max-height: 190px;
  }
  .shop-search {
    width: 100%;
  }
  .shop-checkout {
    padding: 23px;
  }
  .shop-checkout input,
  .detail-layout input,
  .detail-layout select {
    font-size: 16px;
  }
}

.invoice-option {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 20px;
  cursor: pointer;
}
.invoice-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}
#invoice-fields {
  min-inline-size: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  margin: 0 0 24px;
}
#invoice-fields legend {
  font-weight: 700;
  padding: 0 8px;
}

.cart-quantity {
  width: 60px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font: inherit;
  text-align: center;
}
.shop-main #delivery-form[hidden] {
  display: none !important;
}
#order-review {
  scroll-margin-top: 120px;
}
#order-review pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
  line-height: 1.8;
  background: var(--light);
  border-radius: 8px;
  padding: 22px;
}
#order-review:focus {
  outline: 0;
}
@media (max-width: 550px) {
  .cart-quantity {
    font-size: 16px;
  }
}

body:not(.checkout-page) #checkout {
  display: none !important;
}
.checkout-page .shop-layout {
  grid-template-columns: minmax(0, 1fr) 350px;
}
.checkout-page .shop-layout > [hidden] {
  display: none !important;
}
.checkout-page .shop-checkout {
  width: 100%;
  min-width: 0;
  margin-top: 0;
}
.checkout-page #checkout-button {
  display: none;
}
.checkout-page #empty-checkout {
  grid-column: 1 / -1;
  padding: 30px;
  background: white;
  border-radius: 12px;
}
#checkout-summary summary {
  cursor: pointer;
  font-size: 13px;
  margin-block: 15px;
  color: var(--brand);
}
@media (max-width: 800px) {
  .checkout-page .shop-layout {
    display: flex;
    flex-direction: column;
  }
  .checkout-page .shop-cart {
    width: 100%;
    order: -1;
  }
  .checkout-page .shop-checkout {
    width: 100%;
  }
}
