/* Shop: cart drawer, product sheet, checkout */

.shop-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: #333;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  z-index: 2000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease;
  font-size: 0.95rem;
}
.shop-toast.visible {
  transform: translateX(-50%) translateY(0);
}

#cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 1500;
  pointer-events: none;
  visibility: hidden;
}
#cart-drawer.open {
  pointer-events: auto;
  visibility: visible;
}
.cart-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}
#cart-drawer.open .cart-drawer-backdrop {
  opacity: 1;
}
.cart-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: #fffdf5;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}
#cart-drawer.open .cart-drawer-panel {
  transform: translateX(0);
}
.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 2px solid #f5c527;
  background: #333;
  color: #fff;
}
.cart-drawer-header h2 {
  margin: 0;
  font-size: 1.2rem;
}
.cart-drawer-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.cart-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid #e8d9a0;
  background: #fff;
}
.cart-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  align-items: start;
}
.cart-line img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
}
.cart-line-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 8px;
}
.cart-qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-qty-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.cart-qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
}
.cart-line-price {
  font-weight: 700;
  white-space: nowrap;
}
.cart-remove {
  background: none;
  border: none;
  color: #888;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  margin-top: 6px;
}
.cart-empty {
  text-align: center;
  padding: 40px 16px;
  color: #666;
}
.cart-empty a {
  color: #333;
  font-weight: 600;
}
.cart-subtotal-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.btn-shop-primary {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
.btn-shop-primary:hover {
  background: #1a1a1a;
}
.btn-shop-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-shop-secondary {
  display: block;
  width: 100%;
  padding: 10px;
  background: transparent;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-top: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

#product-sheet {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
#product-sheet.open {
  display: flex;
}
@media (min-width: 768px) {
  #product-sheet {
    align-items: center;
  }
}
.product-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.product-sheet-panel {
  position: relative;
  background: #fffdf5;
  width: min(720px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px 16px 0 0;
  padding: 24px;
  z-index: 1;
}
@media (min-width: 768px) {
  .product-sheet-panel {
    border-radius: 16px;
  }
}
.product-sheet-grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 600px) {
  .product-sheet-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.product-sheet-panel img {
  width: 100%;
  border-radius: 8px;
}
.product-sheet-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  z-index: 2;
}
.product-price-live {
  font-size: 1.4rem;
  font-weight: 700;
  color: #333;
  margin: 12px 0;
}
.product-field {
  margin-bottom: 12px;
}
.product-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 0.9rem;
}
.product-field select,
.product-field input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}
.product-card-price {
  font-weight: 700;
  color: #333;
  margin: 8px 0 0;
}

.checkout-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.checkout-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.checkout-step {
  flex: 1;
  min-width: 100px;
  text-align: center;
  padding: 10px 8px;
  border-radius: 8px;
  background: #fff;
  border: 2px solid #e8d9a0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #888;
}
.checkout-step.active {
  border-color: #f5c527;
  background: #fffdf5;
  color: #333;
}
.checkout-step.done {
  border-color: #333;
  color: #333;
}
.checkout-grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 800px) {
  .checkout-grid {
    grid-template-columns: 1fr 320px;
  }
}
.checkout-panel {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.checkout-panel h2 {
  margin: 0 0 20px;
  font-size: 1.25rem;
}
.checkout-hint {
  margin: 0 0 14px;
  font-size: 0.85rem;
  color: #666;
}
.checkout-field {
  margin-bottom: 14px;
}
.checkout-field label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.checkout-field input,
.checkout-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}
.checkout-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.shipping-option {
  display: block;
  border: 2px solid #e8d9a0;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.shipping-option:has(input:checked) {
  border-color: #333;
  background: #fffdf5;
}
.shipping-option input {
  margin-right: 10px;
}
.shipping-option-title {
  font-weight: 600;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
}
.summary-line.total {
  font-size: 1.2rem;
  font-weight: 700;
  border-top: 2px solid #f5c527;
  padding-top: 12px;
  margin-top: 12px;
}
.checkout-trust {
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  margin-top: 12px;
}
.checkout-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.checkout-actions .btn-shop-secondary {
  width: auto;
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 20px;
}
.checkout-actions .btn-shop-primary {
  flex: 1;
}
.thank-you-box {
  max-width: 560px;
  margin: 40px auto;
  padding: 32px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
}
.thank-you-box h1 {
  margin-top: 0;
}
.order-ref {
  font-family: monospace;
  font-size: 1.1rem;
  background: #fffdf5;
  padding: 8px 16px;
  border-radius: 6px;
  display: inline-block;
  margin: 16px 0;
}