/* ShopyGoods — Inner pages */

.page-main {
  padding-top: calc(var(--nav-height) + 2rem);
  padding-bottom: 4rem;
  min-height: 60vh;
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.product-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-actions-row .btn {
  flex: 1;
  min-width: 120px;
}

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.product-detail-gallery {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 4/3;
}

.product-detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-info h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.product-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.product-specs {
  background: rgba(91, 61, 245, 0.04);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.product-specs h3 {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.product-specs ul {
  list-style: disc;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.product-specs li {
  margin-bottom: 0.35rem;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Cart */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}

.cart-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h3 {
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.cart-qty button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
}

.cart-summary {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  height: fit-content;
}

.cart-summary .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.cart-summary .total {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
}

.empty-state h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Auth */
.auth-card {
  max-width: 440px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

.auth-card h1 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.form-group input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(91, 61, 245, 0.1);
}

.form-error {
  color: #dc2626;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

/* Legal / content */
.content-page {
  max-width: 800px;
  margin: 0 auto;
}

.content-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.content-page h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.content-page p,
.content-page li {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.content-page ul {
  list-style: disc;
  padding-left: 1.5rem;
}

/* Search */
.search-meta {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Account */
.account-grid {
  display: grid;
  gap: 1.5rem;
}

.account-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
}

.order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

/* Toast */
.shopy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: #fff;
  padding: 0.85rem 1.5rem;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.shopy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 404 */
.error-page {
  text-align: center;
  padding: 6rem 2rem;
}

.error-page h1 {
  font-size: 6rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.track-form {
  max-width: 480px;
  margin: 2rem auto 0;
  display: flex;
  gap: 0.75rem;
}

.track-form input {
  flex: 1;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 100px;
}

@media (min-width: 768px) {
  .product-detail {
    grid-template-columns: 1fr 1fr;
  }

  .cart-layout {
    grid-template-columns: 1fr 340px;
  }
}
