/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}
.btn-secondary:hover {
  background: rgba(242, 242, 242, 0.08);
}
[data-theme="light"] .btn-secondary {
  border-color: var(--text);
}
[data-theme="light"] .btn-secondary:hover {
  background: rgba(11, 22, 40, 0.06);
}
.btn-ghost {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--border-strong);
  color: var(--accent);
}
.btn-block {
  width: 100%;
}
.btn-sm {
  min-height: 36px;
  padding: 0.5rem 1rem;
  font-size: 0.65rem;
}
.btn-lg {
  min-height: 52px;
  padding: 1rem 2rem;
  font-size: 0.8rem;
}
.btn:disabled,
.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Glass card */
.glass-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.glass-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-hover-border);
  box-shadow: var(--shadow), 0 0 24px rgba(41, 121, 255, 0.12);
}

/* Badges / chips */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.badge-pill.is-active,
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.form-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}
.form-control {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(41, 121, 255, 0.15);
}
.form-control.is-invalid {
  border-color: var(--danger);
}
textarea.form-control {
  min-height: 120px;
  resize: vertical;
}
.form-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.form-error {
  font-size: 0.75rem;
  color: var(--danger);
}
.form-row {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Product / content cards */
.card-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  aspect-ratio: 4 / 3;
  background: var(--bg-elevated);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.product-card:hover .card-media img,
.content-card:hover .card-media img {
  transform: scale(1.05);
}
.product-card,
.content-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.product-card:hover,
.content-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.card-body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text);
}
.card-meta {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
}
.card-price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--accent);
}
.card-price s {
  color: var(--text-dim);
  font-size: 1rem;
  margin-right: 0.4rem;
}
.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--overlay);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  z-index: 2;
}
.wishlist-btn.is-active {
  color: var(--danger);
}

/* Grids */
.grid-2 {
  display: grid;
  gap: 1rem;
}
.grid-3 {
  display: grid;
  gap: 1rem;
}
.grid-4 {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 420px;
}
.search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}
.search-wrap .form-control {
  padding-left: 2.6rem;
}

/* Steps */
.steps {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
.step-item {
  flex: 1;
  min-width: 110px;
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-bottom: 2px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
}
.step-item.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.step-item.is-done {
  color: var(--success);
  border-bottom-color: var(--success);
}

/* Accordion */
.accordion details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-solid);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion .faq-icon {
  transition: transform 0.3s;
  color: var(--accent);
  flex-shrink: 0;
}
.accordion details[open] .faq-icon {
  transform: rotate(180deg);
}
.accordion .faq-content {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--text);
  margin: 0.75rem 0;
}

/* Price toggle */
.billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.billing-toggle button {
  min-height: 40px;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}
.billing-toggle button.is-active {
  background: var(--accent);
  color: var(--white);
}

/* Quantity */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: var(--surface);
}
.qty span {
  min-width: 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* Table */
.data-table {
  width: 100%;
  font-size: 0.9rem;
}
.data-table th,
.data-table td {
  padding: 0.85rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
}
.data-table td {
  color: var(--text-muted);
}

/* Page hero (inner) */
.page-hero {
  padding: calc(var(--header-h) + 2rem) 0 2rem;
  position: relative;
  overflow: hidden;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 10vw, 5rem);
  line-height: 0.92;
  margin: 0.75rem 0 1rem;
}
.page-hero p {
  color: var(--text-muted);
  max-width: 34rem;
  font-size: 1.05rem;
}

/* Rating stars */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--accent);
}
