/* ==========================================================================
   Product shop cart — payment-form (legacy) · teal/navy/cream
   ========================================================================== */

.shop-page {
  background: var(--color-sand, #faf8f5);
  min-height: 100vh;
}

.shop-nav {
  display: none;
  gap: 1.15rem;
  align-items: center;
}

.shop-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.shop-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 2px solid var(--color-border);
  background: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-navy-900);
  cursor: pointer;
  font-family: inherit;
}

.shop-cart-btn:hover {
  border-color: var(--color-teal-600);
  color: var(--color-teal-800);
}

.shop-cart-badge {
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  background: var(--color-teal-700);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 800px) {
  .shop-nav {
    display: flex;
  }
}

.shop-hero {
  background: linear-gradient(160deg, var(--color-teal-800) 0%, var(--color-navy-900) 100%);
  color: #fff;
  padding: clamp(2.25rem, 5vw, 3.5rem) 0;
}

.shop-hero .section__eyebrow {
  color: var(--color-teal-500);
}

.shop-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  font-weight: 550;
  margin: 0 0 0.75rem;
  color: #fff;
}

.shop-hero p {
  max-width: 36rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
}

.shop-layout {
  display: grid;
  gap: 1.75rem;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 3rem;
}

@media (min-width: 960px) {
  .shop-layout {
    grid-template-columns: 1fr 340px;
    align-items: start;
  }
}

.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.shop-filter {
  border: 1.5px solid var(--color-border);
  background: #fff;
  border-radius: 9999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  font-family: inherit;
}

.shop-filter.is-active {
  background: var(--color-teal-700);
  border-color: var(--color-teal-700);
  color: #fff;
}

.shop-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 600px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.shop-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.shop-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.shop-card__cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-teal-700);
}

.shop-card__name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 550;
  color: var(--color-navy-900);
  margin: 0;
  line-height: 1.25;
}

.shop-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.shop-card__price {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-navy-900);
}

.shop-card__price span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-light);
}

.shop-card__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.shop-qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: 9999px;
  overflow: hidden;
  background: #fff;
}

.shop-qty button {
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-navy-800);
  font-family: inherit;
}

.shop-qty button:hover {
  background: var(--color-teal-50);
  color: var(--color-teal-800);
}

.shop-qty input {
  width: 2.5rem;
  border: none;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-navy-900);
  background: transparent;
  -moz-appearance: textfield;
}

.shop-qty input::-webkit-outer-spin-button,
.shop-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.shop-card .btn {
  flex: 1;
  min-width: 8rem;
}

.shop-empty,
.shop-loading,
.shop-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
}

.shop-error {
  color: #b42318;
  background: #fef3f2;
  border-radius: var(--radius);
}

/* Cart panel */
.shop-cart-panel {
  position: sticky;
  top: 5rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 1.35rem 1.4rem;
}

.shop-cart-panel h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--color-navy-900);
  margin: 0 0 1rem;
}

.shop-cart-lines {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
  max-height: 50vh;
  overflow: auto;
}

.shop-cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--color-border-soft);
  font-size: 0.9rem;
}

.shop-cart-line__name {
  font-weight: 600;
  color: var(--color-navy-900);
}

.shop-cart-line__meta {
  grid-column: 1 / -1;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.shop-cart-line__actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.shop-cart-line__actions button {
  border: none;
  background: var(--color-cream);
  border-radius: 6px;
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--color-navy-800);
}

.shop-cart-line__remove {
  background: transparent !important;
  color: var(--color-text-light) !important;
  font-size: 0.75rem;
  width: auto !important;
  padding: 0 0.35rem;
  text-decoration: underline;
}

.shop-cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-navy-900);
  margin-bottom: 1rem;
  padding-top: 0.35rem;
}

.shop-cart-total span:last-child {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--color-teal-800);
}

.shop-cart-order-title {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-teal-700);
}

.shop-cart-email {
  margin-bottom: 0.85rem;
}

.shop-cart-email .req {
  color: #b42318;
}

.shop-cart-email label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-navy-800);
  margin-bottom: 0.3rem;
}

.shop-cart-email input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  font: inherit;
  box-sizing: border-box;
  background: #fff;
}

.shop-cart-email input:focus {
  outline: none;
  border-color: var(--color-teal-600);
  box-shadow: 0 0 0 3px rgba(13, 115, 119, 0.12);
}

.shop-card__media {
  margin: -0.25rem -0.25rem 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-cream, #f7f4ef);
  aspect-ratio: 4 / 3;
}

.shop-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-cart-note {
  font-size: 0.78rem;
  color: var(--color-text-light);
  line-height: 1.45;
  margin: 0.75rem 0 0;
}

.shop-status {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  min-height: 1.2em;
}

.shop-status.is-error {
  color: #b42318;
  font-weight: 600;
}

.shop-status.is-ok {
  color: #067647;
  font-weight: 600;
}

.shop-banner {
  margin-bottom: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.925rem;
}

.shop-banner--success {
  background: #ecfdf3;
  color: #067647;
  border: 1px solid #abefc6;
}

.shop-banner--cancel {
  background: #fff8eb;
  color: #7a5b00;
  border: 1px solid #f5e0a3;
}

/* Admin */
.admin-page {
  background: var(--color-sand);
  min-height: 100vh;
}

/* Embedded inside Super Admin iframe */
body.admin-embed {
  background: var(--color-sand);
}
body.admin-embed .admin-wrap {
  padding: 1rem 0 1.5rem;
  width: min(100% - 1.25rem, 1100px);
}
body.admin-embed .admin-login-card,
body.admin-embed .admin-panel {
  box-shadow: none;
  border-radius: var(--radius-lg);
}

.admin-wrap {
  width: min(100% - 2rem, 1100px);
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.admin-login-card,
.admin-panel {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.admin-login-card h1,
.admin-panel h1 {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  color: var(--color-navy-900);
  margin: 0 0 0.5rem;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.admin-table-wrap {
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--color-border-soft);
  vertical-align: top;
}

.admin-table th {
  background: var(--color-cream);
  font-weight: 700;
  color: var(--color-navy-800);
  white-space: nowrap;
}

.admin-table tr:hover td {
  background: var(--color-teal-50);
}

.admin-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.admin-form h2 {
  font-size: 1.15rem;
  margin: 0;
  color: var(--color-navy-900);
}

.admin-form-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 700px) {
  .admin-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.admin-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--color-navy-800);
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font: inherit;
  box-sizing: border-box;
}

.admin-field textarea {
  min-height: 4rem;
  resize: vertical;
}

.admin-field--full {
  grid-column: 1 / -1;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.admin-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-muted {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.admin-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--color-border, #e2e8ed);
  display: block;
  background: #f7f4ef;
}

.admin-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #9aa8b5;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px dashed #e2e8ed;
  background: #faf8f5;
}

.admin-image-preview {
  margin-top: 0.5rem;
}

.badge-off {
  color: #b42318;
  font-weight: 600;
  font-size: 0.75rem;
}

.badge-on {
  color: #067647;
  font-weight: 600;
  font-size: 0.75rem;
}

@media (max-width: 959px) {
  .shop-cart-panel.is-drawer {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 200;
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    overflow: auto;
    box-shadow: 0 -12px 40px rgba(11, 28, 44, 0.2);
  }

  .shop-cart-panel[hidden] {
    display: none !important;
  }
}
