/* ——— Veřejný e-shop — premium retail ——— */

.shop-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.shop-shell .main {
  flex: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  letter-spacing: -0.03em;
  transition: opacity var(--transition);
}

.brand:hover {
  color: var(--text);
  opacity: 0.88;
}

.brand .logo {
  height: 2.5rem;
  width: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.brand-name {
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .brand-name {
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav a.nav-link {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition), background var(--transition), box-shadow var(--transition);
}

.nav a.nav-link:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.nav-cart {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-cart-active {
  color: var(--text) !important;
  background: var(--color-primary-subtle) !important;
}

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.375rem;
  height: 1.375rem;
  padding: 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-on-primary);
  background: linear-gradient(135deg, var(--color-primary), color-mix(in srgb, var(--color-accent) 70%, var(--color-primary)));
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-btn);
}

.nav-account {
  border: 1px solid var(--border);
  background: var(--surface);
}

.nav-account:hover {
  border-color: var(--border-strong);
}

.main {
  padding: var(--space-8) 0 var(--space-16);
}

/* Hero — katalog */
.shop-hero {
  position: relative;
  margin: calc(var(--space-2) * -1) calc(var(--space-4) * -1) var(--space-10);
  padding: var(--space-12) var(--space-8);
  border-radius: var(--radius-2xl);
  background: var(--bg-hero);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  overflow: hidden;
}

.shop-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 50%;
  height: 140%;
  background: radial-gradient(circle, var(--color-primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.shop-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.shop-hero h1 {
  position: relative;
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: var(--space-3);
  max-width: 16ch;
}

.shop-hero .slogan,
.shop-hero .page-lead {
  position: relative;
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 36rem;
  line-height: var(--leading-relaxed);
}

/* Kategorie */
.cat-filter {
  margin-bottom: var(--space-8);
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: flex-end;
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
}

.catalog-toolbar label {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
}

.catalog-search {
  flex: 1 1 14rem;
}

.catalog-search input {
  width: 100%;
  margin-top: var(--space-2);
}

.catalog-meta {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.breadcrumbs {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--link);
}

.product-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 2;
  padding: 0.2rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-full);
}

.product-badge-ok {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.product-badge-warn {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.product-badge-muted {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.product-availability {
  font-weight: 600;
  font-size: var(--text-sm);
  margin: 0 0 var(--space-3);
}

.availability-in_stock { color: var(--color-success); }
.availability-on_order { color: var(--color-warning); }
.availability-out_of_stock { color: var(--text-muted); }

.btn-disabled {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  margin: var(--space-4);
  opacity: 0.55;
  cursor: not-allowed;
}

.related-products {
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border);
}

.related-products h2 {
  margin-bottom: var(--space-6);
}

/* Produktové karty */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: var(--space-6);
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--color-primary) 25%, var(--border));
}

.product-card-link {
  display: block;
  padding: var(--space-4);
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.product-card-link:hover {
  color: inherit;
}

.product-card .img-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
  background: var(--bg-subtle);
  aspect-ratio: 1;
}

.product-card img,
.product-card .no-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover img {
  transform: scale(1.04);
}

.product-card .no-img {
  display: block;
  background: linear-gradient(145deg, var(--bg-subtle), var(--border));
}

.product-card h2 {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0 0 var(--space-2);
  line-height: var(--leading-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .price {
  font-size: var(--text-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

.product-card form {
  padding: 0 var(--space-4) var(--space-4);
  margin-top: auto;
}

.product-card button {
  width: 100%;
  border-radius: var(--radius-lg);
  font-weight: 600;
}

/* Detail produktu */
.product-detail {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-12);
  align-items: start;
}

.product-detail-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
}

.gallery {
  display: grid;
  gap: var(--space-4);
}

.gallery img {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  width: 100%;
}

.detail-info h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
  letter-spacing: -0.03em;
}

.detail-info .product-summary {
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
  font-size: var(--text-lg);
}

.product-detail-extended {
  margin-top: var(--space-10);
  padding: var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-card);
}

.product-detail-extended .product-detail-body {
  color: var(--text);
  line-height: var(--leading-relaxed);
}

.detail-info .price {
  display: inline-block;
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: var(--space-6);
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary-subtle);
  border-radius: var(--radius-lg);
}

.detail-info .desc {
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
}

.rich-body .cms-md-p {
  margin: 0 0 0.75em;
}

.rich-body .cms-md-p:last-child {
  margin-bottom: 0;
}

.rich-body .cms-md-ul {
  margin: 0.5em 0 1em;
  padding-left: 1.35em;
}

.rich-body .cms-md-ul li {
  margin-bottom: 0.35em;
}

.rich-body .cms-md-h2,
.rich-body .cms-md-h3,
.rich-body .cms-md-h4 {
  margin: 1em 0 0.45em;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.rich-body .cms-md-h4:first-child,
.rich-body .cms-md-h3:first-child,
.rich-body .cms-md-h2:first-child {
  margin-top: 0;
}

.rich-body .cms-md-h2 { font-size: var(--text-2xl); }
.rich-body .cms-md-h3 { font-size: var(--text-xl); }
.rich-body .cms-md-h4 { font-size: var(--text-lg); }

.rich-body .cms-md-center {
  text-align: center;
}

.rich-body .cms-md-link {
  color: var(--link);
}

.detail-info .desc {
  margin-bottom: var(--space-8);
  font-size: var(--text-base);
}

.add-to-cart-form {
  max-width: 22rem;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

/* Košík & checkout */
.cart-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-8);
  background: linear-gradient(135deg, var(--surface) 0%, var(--color-primary-subtle) 100%);
  border: 1px solid color-mix(in srgb, var(--color-primary) 15%, var(--border));
  border-radius: var(--radius-xl);
  margin-top: var(--space-8);
  box-shadow: var(--shadow-sm);
}

.cart-summary strong {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cart-qty-form {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cart-qty-form input[type="number"] {
  width: 4.5rem;
  min-height: var(--input-height-sm);
  padding: 0.5rem 0.65rem;
  text-align: center;
  border: 1.5px solid var(--input-border, var(--border-strong));
  border-radius: var(--radius-md);
  background-color: var(--input-bg, var(--surface));
  color: var(--input-text, var(--text));
  font-size: var(--text-sm);
  font-weight: 600;
}

/* Účet & auth stránky */
.account-hero {
  text-align: center;
  max-width: 28rem;
  margin: 0 auto var(--space-10);
}

.auth-card {
  max-width: 26rem;
  margin: 0 auto;
  padding: var(--space-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
}

/* Děkujeme */
.success-card {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-10) !important;
  border-radius: var(--radius-2xl) !important;
  background: linear-gradient(180deg, var(--surface) 0%, var(--color-primary-subtle) 120%) !important;
}

.success-card h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
}

.success-card .order-number {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
}

.success-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto var(--space-6);
  border-radius: var(--radius-full);
  background: var(--color-success-bg);
  color: var(--color-success);
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  font-weight: 700;
}

.form-actions-center {
  justify-content: center;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--sidebar-solid);
  color: var(--sidebar-muted);
  padding: var(--space-12) 0 var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-10);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--sidebar-text);
  margin: 0 0 var(--space-4);
  letter-spacing: -0.02em;
}

.footer-about {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--sidebar-muted);
}

.footer-about a {
  color: #cbd5e1;
}

.footer-legal {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--sidebar-muted);
  margin: 0 0 var(--space-4);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  font-size: var(--text-sm);
  margin: 0;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: var(--space-6);
  font-size: var(--text-xs);
  color: var(--sidebar-muted);
  opacity: 0.75;
}

/* Page header upgrade */
.page-header {
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* Kontakt — strukturovaná stránka */
.contact-page {
  max-width: 56rem;
  margin: 0 auto;
}

.contact-hero {
  margin-bottom: var(--space-10);
  padding: var(--space-10) var(--space-8);
  border-radius: var(--radius-2xl);
  background: var(--bg-hero);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.contact-eyebrow {
  margin: 0 0 var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.contact-hero h1 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--heading-color);
}

.contact-lead {
  margin: 0;
  max-width: 38rem;
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.contact-card:hover {
  border-color: color-mix(in srgb, var(--color-primary) 35%, var(--border));
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.contact-card-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.contact-card-icon-sm {
  width: 2.5rem;
  height: 2.5rem;
}

.contact-card-title {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-card-body {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: var(--leading-normal);
}

.contact-value-link {
  color: var(--text);
  text-decoration: none;
  word-break: break-word;
}

.contact-value-link:hover {
  color: var(--color-primary);
}

.contact-address-text {
  margin: 0 0 var(--space-3);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: var(--leading-relaxed);
  color: var(--text);
}

.contact-map-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.contact-map-link:hover {
  color: var(--color-primary-hover);
}

.contact-card-hint {
  margin: var(--space-2) 0 0;
  font-size: var(--text-sm);
  color: var(--text-subtle);
  line-height: var(--leading-normal);
}

.contact-legal {
  margin-bottom: var(--space-5);
  padding: var(--space-6) var(--space-8);
}

.contact-legal-head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.contact-legal-title {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 700;
}

.contact-legal-name {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.contact-legal-meta {
  margin: 0;
  font-size: var(--text-base);
  color: var(--text-muted);
}

.contact-legal-label {
  display: inline-block;
  min-width: 2.5rem;
  font-weight: 700;
  color: var(--text-subtle);
}

.contact-prose {
  padding: var(--space-8);
}

.contact-prose-title {
  margin: 0 0 var(--space-5);
  font-size: var(--text-xl);
  font-weight: 700;
}

.contact-empty {
  text-align: center;
  padding: var(--space-12) var(--space-8);
  margin-bottom: var(--space-5);
}

.contact-empty-icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto var(--space-5);
  border-radius: var(--radius-full);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.contact-empty-title {
  margin: 0 0 var(--space-3);
  font-size: var(--text-2xl);
  font-weight: 800;
}

.contact-empty-lead {
  margin: 0 auto;
  max-width: 26rem;
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
}

/* Právní / informační stránky */
.content-page {
  max-width: 48rem;
  margin: 0 auto;
}

.content-hero {
  margin-bottom: var(--space-8);
}

.content-hero h1 {
  margin: 0 0 var(--space-3);
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.content-lead {
  margin: 0;
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-muted);
}

.content-prose {
  padding: var(--space-8) var(--space-10);
}

@media (max-width: 768px) {
  .shop-hero {
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding: var(--space-8) var(--space-5);
    border-radius: var(--radius-xl);
  }

  .shop-shell .main {
    padding-top: var(--space-5);
    padding-bottom: var(--space-10);
  }

  .header-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding: var(--space-3) 0;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
  }

  .product-detail {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .contact-hero {
    padding: var(--space-8) var(--space-5);
  }

  .contact-hero h1 {
    font-size: var(--text-3xl);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-legal,
  .contact-prose,
  .content-prose {
    padding: var(--space-6);
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .cart-summary {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
  }

  .cart-summary .btn {
    width: 100%;
    text-align: center;
  }

  .form-section {
    padding: var(--space-4);
  }

  .success-card {
    padding: var(--space-6) var(--space-5);
  }
}
