.ecom-section {
  padding: 40px 0;
}

.ecom-card {
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-color);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06);
  height: 100%;
}

.ecom-card img {
  width: 100%;
  /* height: 220px; */
  object-fit: cover;
}

.ecom-card .content {
  padding: 16px;
}

.ecom-price {
  font-weight: 700;
  color: var(--accent-color);
}

.ecom-muted {
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  font-size: 0.9rem;
}

.cart-link {
  display: inline-flex;
  align-items: center;
}

#cart-count-badge {
  min-width: 24px;
}

.form-error {
  color: #dc3545;
  font-size: 0.875rem;
}

.ecom-summary {
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 85%);
  border-radius: 12px;
  padding: 20px;
  background: var(--surface-color);
}

.order-table img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
}

.product-gallery {
  position: relative;
}

.product-main-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.product-main-image {
  width: 100%;
  /* aspect-ratio: 1 / 1; */
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.product-main-wrap:hover .product-main-image {
  transform: scale(1.08);
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(7, 22, 19, 0.56);
  color: #fff;
  z-index: 2;
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

.product-thumbs {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.product-thumb {
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  background: #fff;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.product-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-thumb.active {
  border-color: var(--accent-color);
}

.product-thumb:hover {
  transform: translateY(-2px);
}

@media (max-width: 767px) {
  .product-thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Account pages (dashboard, profile) */
.acct-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.acct-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-color), transparent 85%);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.acct-hero h2 {
  font-weight: 700;
  margin: 0 0 2px;
}

.acct-hero p {
  margin: 0;
  color: color-mix(in srgb, var(--default-color), transparent 35%);
}

.acct-card {
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
  border-radius: 14px;
  padding: 24px;
  background: var(--surface-color);
  margin-bottom: 20px;
}

.acct-card h5 {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  margin-bottom: 18px;
}

.acct-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 93%);
  font-size: 0.95rem;
}

.acct-row:last-child {
  border-bottom: none;
}

.acct-row .acct-label {
  color: color-mix(in srgb, var(--default-color), transparent 30%);
}

.acct-row .acct-value {
  font-weight: 600;
  text-align: right;
}

.acct-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
}

.acct-pill-success { background: rgba(25, 135, 84, 0.12); color: #198754; }
.acct-pill-warning { background: rgba(255, 193, 7, 0.16); color: #b58105; }
.acct-pill-danger { background: rgba(220, 53, 69, 0.12); color: #dc3545; }
.acct-pill-secondary { background: rgba(108, 117, 125, 0.14); color: #6c757d; }

.acct-card .form-control {
  border-radius: 8px;
}

.acct-card .btn {
  border-radius: 8px;
}

.acct-table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: color-mix(in srgb, var(--default-color), transparent 40%);
  border-bottom-width: 1px;
}

.acct-table td, .acct-table th {
  vertical-align: middle;
}

.acct-line-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 93%);
}

.acct-line-item:last-child {
  border-bottom: none;
}

.acct-line-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
}

.acct-line-item .acct-line-name {
  font-weight: 600;
}

.acct-line-item a.acct-line-name {
  color: inherit;
  text-decoration: none;
  display: inline-block;
}

.acct-line-item a.acct-line-name:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.acct-line-item .acct-line-meta {
  font-size: 0.85rem;
  color: color-mix(in srgb, var(--default-color), transparent 35%);
}

.acct-line-item .acct-line-total {
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
}

.acct-total-line {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
  font-size: 1.1rem;
  font-weight: 700;
}

.acct-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--default-color), transparent 30%);
  text-decoration: none;
  margin-bottom: 14px;
}

.acct-back-link:hover {
  color: var(--accent-color);
}


@media (max-width: 767px) {
  .ecom-card img {
    height: 180px;
  }
}
