/* Shop + auth extras */

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.2rem;
  border-radius: 999px;
  background: var(--amber);
  color: #1a1205;
  font-size: 0.72rem;
  font-weight: 800;
}

.auth-wrap {
  max-width: 520px;
}

.form-grid.single {
  grid-template-columns: 1fr;
}

.demo-creds {
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: 0.92rem;
}

.demo-creds p {
  margin: 0.25rem 0;
}

.auth-form a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: underline;
}

.shop-hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cart-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(7, 46, 44, 0.08);
}

.cart-chip strong {
  display: inline-grid;
  place-items: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(7, 46, 44, 0.1);
}

.product-emoji {
  display: grid;
  place-items: center;
  height: 120px;
  font-size: 3rem;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--accent, #2dd4a8) 16%, white), #fff);
  border-bottom: 1px solid var(--line);
}

.product-media {
  border-bottom: 1px solid var(--line);
  background: #f3f8f5;
}

.product-gallery {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #eef5f1;
}

.product-gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.product-gallery-img.is-active {
  opacity: 1;
  pointer-events: auto;
}

.product-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  padding: 0.45rem;
  background: #fff;
}

.product-thumb {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  height: 44px;
  cursor: pointer;
  background: #fff;
  opacity: 0.7;
}

.product-thumb.is-active,
.product-thumb:hover {
  opacity: 1;
  border-color: var(--brand);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-emoji.sm {
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.product-thumb-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.product-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.product-body h2 {
  font-size: 1.05rem;
  margin: 0;
}

.product-body p {
  margin: 0;
  font-size: 0.9rem;
  flex: 1;
}

.product-meta {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.product-meta strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--brand);
}

.product-meta span,
.product-stock {
  color: var(--muted);
  font-size: 0.88rem;
}

.product-stock.low {
  color: #b45309;
  font-weight: 600;
}

.qty-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.qty-row input[type="number"] {
  width: 72px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 0.65rem;
  text-align: center;
}

.qty-row .btn {
  flex: 1;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 1.25rem;
  align-items: start;
}

.cart-table-wrap,
.cart-summary,
.order-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  text-align: left;
  padding: 0.85rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.cart-table th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.cart-product {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.cart-product small {
  display: block;
  color: var(--muted);
}

.cart-table input[type="number"] {
  width: 70px;
  padding: 0.45rem;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.btn-link {
  background: none;
  border: 0;
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.btn-link.danger {
  color: #b91c1c;
}

.inline-form {
  display: inline;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  color: var(--ink-soft);
}

.summary-row.total {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  font-size: 1.1rem;
  color: var(--ink);
}

.cart-summary .btn {
  width: 100%;
  margin-top: 1rem;
}

.orders-list {
  display: grid;
  gap: 1rem;
}

.order-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.order-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.order-head p {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
  text-transform: capitalize;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-confirmed { background: #dbeafe; color: #1e40af; }
.status-processing { background: #e0e7ff; color: #3730a3; }
.status-delivered { background: #dcfce7; color: #166534; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

@media (max-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .cart-table thead {
    display: none;
  }

  .cart-table tr {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem 0;
  }

  .cart-table td {
    border: 0;
    padding: 0.15rem 0;
  }
}
