/* HSE Commerce — ürün, sepet, ödeme (checkout.css ayrı yüklenir) */
:root {
  --hse-primary: #0f172a;
  --hse-accent: #c9a227;
  --hse-accent-hover: #b8921f;
  --hse-bg: #f8fafc;
  --hse-border: #e2e8f0;
  --hse-radius: 12px;
  --hse-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  --hse-muted: #64748b;
}

/* Checkout progress */
.hse-checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  padding: 1rem;
  background: #fff;
  border-radius: var(--hse-radius);
  box-shadow: var(--hse-shadow);
}

.hse-checkout-steps .step {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--hse-muted);
  font-weight: 500;
}

.hse-checkout-steps .step-num {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hse-border);
  font-size: 0.75rem;
  font-weight: 700;
}

.hse-checkout-steps .step.is-active .step-num,
.hse-checkout-steps .step.is-done .step-num {
  background: var(--hse-primary);
  color: #fff;
}

.hse-checkout-steps .step.is-active {
  color: var(--hse-primary);
  font-weight: 600;
}

.hse-checkout-steps .step-divider {
  width: 1.5rem;
  height: 2px;
  background: var(--hse-border);
}

/* Cart layout */
.hse-cart-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.hse-cart-summary {
  position: sticky;
  top: 1rem;
  background: #fff;
  border-radius: var(--hse-radius);
  box-shadow: var(--hse-shadow);
  padding: 1.25rem;
}

.hse-cart-summary h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hse-cart-summary .row-line {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--hse-muted);
  border-bottom: 1px solid var(--hse-border);
}

.hse-cart-summary .row-line.total {
  border-bottom: none;
  font-size: 1.05rem;
  color: var(--hse-primary);
  font-weight: 700;
  padding-top: 0.75rem;
}

.hse-cart-summary .default-btn {
  width: 100%;
  text-align: center;
  margin-top: 1rem;
  display: block;
}

.hse-btn-secondary {
  display: block;
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--hse-muted);
}

/* Cart item cards (mobile-first) */
.hse-cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hse-cart-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 1rem;
  align-items: center;
  background: #fff;
  border-radius: var(--hse-radius);
  box-shadow: var(--hse-shadow);
  padding: 1rem;
}

.hse-cart-item__img {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--hse-bg);
}

.hse-cart-item__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hse-cart-item__title {
  font-weight: 600;
  color: var(--hse-primary);
  font-size: 0.95rem;
  line-height: 1.35;
  display: block;
  margin-bottom: 0.25rem;
}

.hse-cart-item__variant {
  font-size: 0.8rem;
  color: var(--hse-muted);
}

.hse-cart-item__meta {
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.hse-cart-item__price {
  text-align: right;
  font-weight: 700;
  color: var(--hse-primary);
}

.hse-cart-item__remove {
  grid-column: 1 / -1;
  justify-self: end;
  background: none;
  border: none;
  color: var(--hse-error, #dc2626);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0;
}

.hse-empty-cart {
  text-align: center;
  padding: 3rem 1.5rem;
  background: #fff;
  border-radius: var(--hse-radius);
  box-shadow: var(--hse-shadow);
}

.hse-empty-cart .default-btn {
  margin-top: 1rem;
}

/* Product page */
.product-details-area .product-content {
  background: #fff;
  border-radius: var(--hse-radius);
  box-shadow: var(--hse-shadow);
  padding: 1.5rem;
}

.product-details-area .price .new-price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--hse-primary);
}

.product-details-area .price del {
  font-size: 1rem;
  color: var(--hse-muted);
  margin-left: 0.5rem;
}

.product-details-area .in-stock {
  display: inline-block;
  margin-left: 0.75rem;
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  background: #ecfdf5;
  color: #059669;
  border-radius: 999px;
  font-weight: 600;
}

.product-add-to-cart {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}

.product-add-to-cart .default-btn {
  flex: 1;
  min-width: 160px;
  text-align: center;
}

.hse-trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hse-border);
}

.hse-trust-badges span {
  font-size: 0.8rem;
  color: var(--hse-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.hse-trust-badges i {
  color: var(--hse-accent);
}

/* Sticky mobile CTA */
.hse-product-sticky {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  background: #fff;
  border-top: 1px solid var(--hse-border);
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  gap: 0.75rem;
  align-items: center;
}

.hse-product-sticky .sticky-price {
  font-weight: 700;
  font-size: 1rem;
  color: var(--hse-primary);
  white-space: nowrap;
}

.hse-product-sticky .default-btn {
  flex: 1;
  text-align: center;
  margin: 0;
}

#alert-container .alert {
  border-radius: var(--hse-radius);
  margin-bottom: 1rem;
}

.hse-alert-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.hse-alert-actions a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hse-primary);
  text-decoration: underline;
}

/* Payment method cards */
.checkout-area .faq-accordion .accordion-item {
  border: 1px solid var(--hse-border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.checkout-area .accordion-title {
  padding: 0.85rem 1rem;
  display: block;
  font-weight: 600;
  background: var(--hse-bg);
}

.checkout-area .accordion-title.active {
  background: var(--hse-primary);
  color: #fff;
}

.checkout-area .accordion-content {
  padding: 1rem;
  font-size: 0.9rem;
}

.checkout-area .form-group label {
  font-weight: 500;
  font-size: 0.9rem;
}

.checkout-area .form-control {
  border-radius: 8px;
  border-color: var(--hse-border);
  min-height: 44px;
}

.checkout-area .form-control:focus {
  border-color: var(--hse-accent);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.checkout-area .required {
  color: #dc2626;
}

.hse-legal-check {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-size: 0.85rem;
  line-height: 1.45;
}

.hse-legal-check input {
  margin-top: 0.2rem;
}

@media (max-width: 991px) {
  .hse-cart-layout {
    grid-template-columns: 1fr;
  }

  .hse-cart-summary {
    position: static;
    order: -1;
  }

  .cart-table thead {
    display: none;
  }
}

@media (max-width: 767px) {
  .hse-product-sticky {
    display: flex;
  }

  body.single,
  body.single-post {
    padding-bottom: 72px;
  }

  .hse-cart-item {
    grid-template-columns: 72px 1fr;
  }

  .hse-cart-item__price {
    grid-column: 2;
    text-align: left;
    margin-top: 0.25rem;
  }

  .hse-checkout-steps .step-label {
    display: none;
  }

  .hse-checkout-steps .step.is-active .step-label {
    display: inline;
  }
}

/* Hide legacy table on cart when using cards */
.hse-cart-page .cart-table--legacy {
  display: none;
}
