/* Simple storefront (event presales) */

.store-page .store-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
}

/* In grid layout, the global `.panel { margin: ... auto; }` can cause panels to
   shrink instead of stretching full column width (especially on mobile). */
.store-page .store-grid > .panel {
  margin: 0;
  max-width: none;
  justify-self: stretch;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  .store-page .store-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }
}

@media (max-width: 640px) {
  .store-page .store-grid {
    gap: 0.75rem;
  }
}

.store-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .store-form-row {
    grid-template-columns: 1fr;
  }
}

.store-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.store-items {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.store-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.7);
}

@media (max-width: 640px) {
  .store-item {
    grid-template-columns: 1fr;
  }

  .store-item-qty {
    width: 100%;
    align-items: stretch;
  }

  .store-qty-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .store-add-btn {
    width: 100%;
    justify-content: center;
  }
}

.store-item-info {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.store-item-photo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  flex: 0 0 auto;
}

.store-item-text {
  min-width: 0;
}

.store-item-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: #031633;
}

.store-item-desc {
  margin: 0.35rem 0 0;
  color: #333;
}

.store-item-meta {
  margin-top: 0.4rem;
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.store-item-price {
  font-weight: 800;
}

.store-item-qty {
  width: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
  justify-content: center;
}

.store-qty-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.store-qty-label {
  font-size: 1rem;
  font-weight: 800;
  color: #031633;
  margin: 0;
}

.store-item-qty input.store-qty-input {
  width: 120px;
  padding: 0.7rem 0.75rem;
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  font: inherit;
  background: #fff;
  box-sizing: border-box;
}

.store-add-btn {
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  background: #031633;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  min-height: 42px;
}

.store-add-btn:hover {
  filter: brightness(1.06);
}

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

.store-cart-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.7);
  font-weight: 800;
  color: #031633;
  position: relative;
  user-select: none;
}

.store-cart-area {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.store-clear-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
  cursor: pointer;
  background: rgba(255,255,255,.65);
  color: #031633;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
  min-height: 42px;
}

.store-clear-cart-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.store-clear-cart-btn:hover:not([disabled]) {
  filter: brightness(1.03);
}

.store-proceed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
  cursor: pointer;
  background: #ffc107;
  color: #031633;
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
  min-height: 42px;
}

.store-proceed-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.store-cart-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: rgba(3, 22, 51, 0.08);
}

.store-cart-summary.is-updated .store-cart-icon {
  animation: storeCartPulse 0.55s ease-out 1;
}

@keyframes storeCartPulse {
  0% { transform: scale(1); background: rgba(3, 22, 51, 0.08); }
  45% { transform: scale(1.12); background: rgba(255, 193, 7, 0.55); }
  100% { transform: scale(1); background: rgba(3, 22, 51, 0.08); }
}

.store-cart-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(360px, 92vw);
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.16);
  padding: 0.75rem;
  display: none;
  z-index: 50;
}

.store-cart-summary:hover .store-cart-popover,
.store-cart-summary:focus-within .store-cart-popover,
.store-cart-summary.is-open .store-cart-popover {
  display: block;
}

.store-cart-popover-title {
  font-weight: 900;
  color: #031633;
  margin-bottom: 0.5rem;
}

.store-cart-popover-items {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 700;
  color: #031633;
}

.store-cart-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.store-cart-line-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-item-qty label {
  font-size: 0.9rem;
  font-weight: 700;
}

.store-form-field input,
.store-form-field select,
.store-form-field textarea {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  font: inherit;
  background: #fff;
  box-sizing: border-box;
}

.store-form-field input,
.store-form-field select {
  min-height: 42px;
}

.store-catalog-search input {
  width: 100%;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  font: inherit;
  background: #fff;
  box-sizing: border-box;
  min-height: 42px;
}

.store-item-qty input {
  box-sizing: border-box;
}

.store-help {
  font-size: 0.95rem;
  opacity: 0.85;
}

.store-summary {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  background: rgba(255,255,255,.65);
}

.store-summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.35rem 0;
  gap: 1rem;
}

.store-paypal-buttons {
  min-height: 44px;
}

.store-offline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  background: #031633;
  color: #fff;
  font-weight: 700;
  width: 100%;
}

.store-error,
.store-success {
  display: none;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 10px;
}

.store-error {
  border: 1px solid #b00020;
  background: #fff3f3;
  color: #6a0010;
}

.store-success {
  border: 1px solid #1d7a2f;
  background: #f1fff5;
  color: #135621;
}

.store-note {
  margin-top: 1.25rem;
  border-top: 1px solid rgba(0,0,0,.12);
  padding-top: 1rem;
}

.store-note-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.store-catalog-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.store-catalog-search {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 240px;
}

.store-catalog-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
}

.store-catalog-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 150px;
}

.store-catalog-filter select {
  width: 100%;
  padding: 0.7rem 2.25rem 0.7rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  font: inherit;
  background: #fff;
  box-sizing: border-box;
  min-height: 42px;
  line-height: 1.2;
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(3, 22, 51, 0.85) 50%),
    linear-gradient(135deg, rgba(3, 22, 51, 0.85) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.store-catalog-price-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.45rem;
  align-items: center;
}

.store-catalog-price-sep {
  opacity: 0.7;
  font-weight: 800;
}

.store-filters-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
  cursor: pointer;
  background: rgba(255,255,255,.65);
  color: #031633;
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
  min-height: 42px;
}

.store-filters-clear:hover {
  filter: brightness(1.03);
}

@media (max-width: 640px) {
  .store-catalog-filters {
    align-items: stretch;
  }

  .store-catalog-filter {
    min-width: 0;
    flex: 1 1 220px;
  }

  .store-filters-clear {
    width: 100%;
  }
}

.store-category-title {
  margin: 1.25rem 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 900;
  color: #031633;
}

.store-catalog-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.store-catalog-actions .store-offline-btn {
  width: auto;
  min-width: 220px;
  padding: 0.65rem 1.1rem;
  font-size: 1.05rem;
}

.store-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #031633;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
