:root {
  --theme-ink: #171717;
  --theme-muted: #6b7280;
  --theme-line: #e5e7eb;
  --theme-accent: #0f766e;
  --theme-soft: #f6f7f9;
}

body {
  color: var(--theme-ink);
  background: #ffffff;
}

.hero-default {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.theme-preview,
.product-gallery-placeholder,
.product-image {
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(23, 23, 23, 0.06)),
    #f3f4f6;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  color: var(--theme-muted);
  font-weight: 600;
}

.product-card,
.filters-panel,
.checkout-panel,
.empty-state {
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  background: #ffffff;
}

.checkout-summary {
  position: sticky;
  top: 96px;
}

.checkout-items {
  display: grid;
  gap: 1rem;
}

.checkout-item {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.checkout-item-info {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 58px minmax(0, 1fr);
  min-width: 0;
}

.checkout-item-image {
  align-items: center;
  background: #f3f4f6;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.checkout-item-image img {
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  width: 100%;
}

.checkout-item-body {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.checkout-item-body strong {
  line-height: 1.25;
}

.checkout-item-total {
  white-space: nowrap;
}

.payment-methods {
  display: grid;
  gap: 0.75rem;
}

.payment-method-option {
  align-items: flex-start;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem;
}

.payment-method-option input {
  margin-top: 0.25rem;
}

.payment-method-option small {
  color: var(--theme-muted);
  display: block;
}

.order-success-panel {
  max-width: 760px;
}

.bank-transfer-print-header {
  display: none;
}

.product-card {
  overflow: hidden;
}

.product-link {
  color: inherit;
  display: block;
  height: 100%;
  text-decoration: none;
}

.product-link:hover {
  border-color: #cbd5e1;
}

.product-image {
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 0;
  display: block;
  object-fit: cover;
  width: 100%;
}

.filters-panel,
.checkout-panel,
.empty-state {
  padding: 1.25rem;
}

.catalog-sort {
  width: min(190px, 50vw);
}

.category-dropdown {
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  min-width: 230px;
  padding: 0.55rem;
}

.category-dropdown .dropdown-item {
  border-radius: 6px;
  color: var(--theme-ink);
  padding: 0.55rem 0.7rem;
}

.category-dropdown .dropdown-item:hover,
.category-dropdown .dropdown-item:focus {
  background: var(--theme-soft);
  color: var(--store-secondary);
}

.mini-cart-nav {
  position: relative;
}

.mini-cart-trigger {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
}

.mini-cart-count {
  align-items: center;
  background: var(--theme-ink);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 0.35rem;
}

.mini-cart-panel {
  background: #ffffff;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  opacity: 0;
  padding: 1rem;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.75rem);
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  visibility: hidden;
  width: min(380px, calc(100vw - 2rem));
  z-index: 1050;
}

.mini-cart-panel::before {
  content: "";
  height: 0.75rem;
  left: 0;
  position: absolute;
  right: 0;
  top: -0.75rem;
}

.mini-cart-nav.open .mini-cart-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.mini-cart-nav.open .mini-cart-trigger {
  background: var(--theme-ink);
  border-color: var(--theme-ink);
  color: #ffffff;
}

.mini-cart-nav.open .mini-cart-count {
  background: #ffffff;
  color: var(--theme-ink);
}

.mini-cart-header,
.mini-cart-footer {
  border-bottom: 1px solid var(--theme-line);
  display: flex;
  justify-content: space-between;
  padding-bottom: 0.75rem;
}

.mini-cart-header span {
  color: var(--theme-muted);
  font-size: 0.88rem;
}

.mini-cart-items {
  display: grid;
  gap: 0.8rem;
  max-height: 360px;
  overflow: auto;
  padding: 0.9rem 0;
}

.mini-cart-item {
  color: inherit;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 64px minmax(0, 1fr) auto;
}

.mini-cart-item-body a {
  color: var(--theme-ink);
  font-weight: 800;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-cart-item-body a:hover {
  color: var(--store-secondary);
}

.mini-cart-item-image {
  background: #f3f4f6;
  border-radius: 8px;
  display: block;
  overflow: hidden;
}

.mini-cart-item-image img {
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  width: 100%;
}

.mini-cart-item-body {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.mini-cart-item-body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-cart-item-body small,
.mini-cart-more,
.mini-cart-empty {
  color: var(--theme-muted);
}

.mini-cart-item-total {
  color: var(--theme-ink);
  font-weight: 800;
  white-space: nowrap;
}

.mini-cart-line-updating {
  opacity: 0.68;
}

.mini-cart-stepper {
  align-items: stretch;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  display: inline-grid;
  grid-template-columns: 30px 44px 30px;
  height: 32px;
  margin-top: 0.25rem;
  overflow: hidden;
}

.mini-cart-step-button {
  align-items: center;
  background: #f9fafb;
  border: 0;
  color: var(--theme-ink);
  display: flex;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
}

.mini-cart-step-button:hover {
  background: #eef2ff;
}

.mini-cart-step-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.mini-cart-qty {
  border: 0;
  border-left: 1px solid var(--theme-line);
  border-right: 1px solid var(--theme-line);
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 0;
  text-align: center;
  width: 44px;
}

.mini-cart-qty:focus {
  outline: 0;
}

.mini-cart-footer {
  border-bottom: 0;
  border-top: 1px solid var(--theme-line);
  display: block;
  padding-bottom: 0;
  padding-top: 0.9rem;
}

.mini-cart-more {
  font-size: 0.88rem;
  margin: 0 0 0.75rem;
}

.mini-cart-empty {
  padding-top: 0.9rem;
}

.product-gallery-main {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.product-carousel .product-gallery-main {
  border: 0;
}

.product-carousel {
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  overflow: hidden;
}

.product-carousel .carousel-control-prev,
.product-carousel .carousel-control-next {
  background: rgba(17, 24, 39, 0.24);
  width: 12%;
}

.product-carousel .carousel-indicators [data-bs-target] {
  background-color: #111827;
}

.product-gallery-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, 1fr);
}

.product-gallery-thumb {
  background: transparent;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  padding: 0;
}

.product-gallery-thumb.active {
  border-color: var(--theme-ink);
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.12);
}

.product-gallery-grid img,
.product-gallery-thumb img {
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  width: 100%;
}

.cart-lines {
  display: grid;
  gap: 1rem;
}

.cart-line,
.cart-summary {
  background: #ffffff;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
}

.cart-line {
  display: grid;
  gap: 1rem;
  grid-template-columns: 88px 1fr auto;
  padding: 1rem;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.cart-line-updating {
  border-color: #c7d2fe;
  opacity: 0.68;
}

.cart-line-image {
  align-items: center;
  background: #f3f4f6;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.cart-line-image img {
  aspect-ratio: 1 / 1;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.cart-line-title {
  color: var(--theme-ink);
  font-weight: 700;
  text-decoration: none;
}

.cart-line-body {
  display: grid;
  gap: 1rem;
}

.cart-line-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cart-quantity-stepper {
  align-items: stretch;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  display: inline-grid;
  grid-template-columns: 38px 70px 38px;
  min-height: 40px;
  overflow: hidden;
}

.cart-quantity-button {
  align-items: center;
  background: #f9fafb;
  border: 0;
  color: var(--theme-ink);
  display: flex;
  font-size: 1.15rem;
  font-weight: 800;
  justify-content: center;
  line-height: 1;
}

.cart-quantity-button:hover {
  background: #eef2ff;
}

.cart-quantity-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.cart-qty {
  border: 0;
  border-left: 1px solid var(--theme-line);
  border-radius: 0;
  border-right: 1px solid var(--theme-line);
  min-height: 40px;
  text-align: center;
  width: 70px;
}

.cart-qty:focus {
  box-shadow: inset 0 0 0 2px rgba(17, 24, 39, 0.12);
}

.cart-line-price {
  display: grid;
  gap: 0.25rem;
  justify-items: end;
  min-width: 110px;
}

.cart-line-price span {
  color: var(--theme-muted);
  font-size: 0.875rem;
}

.cart-summary {
  padding: 1.25rem;
  position: sticky;
  top: 96px;
}

@media (max-width: 767.98px) {
  .cart-line {
    grid-template-columns: 72px 1fr;
  }

  .cart-line-price {
    grid-column: 1 / -1;
    justify-items: start;
  }
}

@media print {
  body.printing-bank-transfer * {
    visibility: hidden;
  }

  body.printing-bank-transfer .bank-transfer-print-area,
  body.printing-bank-transfer .bank-transfer-print-area * {
    visibility: visible;
  }

  body.printing-bank-transfer .bank-transfer-print-area {
    background: #ffffff !important;
    border: 0;
    color: #111111;
    left: 0;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 0;
    width: 100%;
  }

  body.printing-bank-transfer .bank-transfer-print-header {
    display: block;
    margin-bottom: 1rem;
  }

  body.printing-bank-transfer .bank-transfer-print-header h2 {
    font-size: 22px;
    margin: 0 0 0.35rem;
  }

  body.printing-bank-transfer .bank-transfer-print-header p {
    margin: 0;
  }

  body.printing-bank-transfer .no-print {
    display: none !important;
  }
}
