/* PRIMEFILL FINAL PRODUCT + MENU FIX */

* { box-sizing: border-box; }
img { max-width: 100%; }

:root {
  --pf-page-bg: #f4f3f1;
  --pf-card-bg: #ffffff;
}

body {
  background: var(--pf-page-bg);
}

.primefill-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle,
.menu-backdrop,
.materials-toggle {
  display: none;
}

/* sjednocení pozadí fotek */
.product-image,
.photo-image,
.detail-image,
.detail-photo,
.product-detail-photo,
.admin-product-image {
  background: var(--pf-page-bg) !important;
}

.product-image img,
.photo-image img,
.detail-photo img,
.detail-image img,
.product-detail-photo img {
  object-fit: contain !important;
  padding: 10px;
}

.product,
.product-info,
.panel,
.cart-summary,
.loyalty-info-box,
.loyalty-progress-card,
.legal-page,
.material-card {
  background: var(--pf-card-bg);
  color: var(--text);
}

/* detail produktu */
.product-detail-pro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr);
  gap: 42px;
  align-items: start;
  margin: 22px 0 50px;
}

.product-detail-photo {
  min-height: 660px;
  border-radius: 30px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-detail-photo img {
  width: 100%;
  height: 100%;
  max-height: 720px;
}

.product-detail-panel {
  background: transparent;
}

.product-detail-panel h1 {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
  margin: 8px 0 14px;
}

.print-settings-card,
.tech-card,
.material-use-box {
  border: 1px solid var(--border);
  background: #f2f2f2;
  border-radius: 14px;
}

.print-settings-card {
  padding: 18px;
  margin: 24px 0 10px;
}

.print-settings-card h2 {
  text-transform: uppercase;
  color: #888;
  font-size: 13px;
  letter-spacing: .08em;
  margin: 0 0 14px;
}

.print-settings-card p {
  margin: 4px 0;
  color: #333;
}

.tech-card {
  display: grid;
  grid-template-columns: 46px 1fr 24px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  margin: 10px 0 22px;
}

.tech-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #e5e5e5;
  font-weight: 900;
}

.tech-card strong,
.tech-card span {
  display: block;
}

.tech-card span {
  color: var(--muted);
  font-size: 13px;
}

.tech-arrow {
  font-size: 22px;
  color: #777;
}

.material-description p {
  line-height: 1.65;
  color: #222;
}

.material-use-box {
  padding: 15px;
  margin: 18px 0;
}

.material-use-box strong,
.material-use-box span {
  display: block;
}

.material-use-box span {
  color: var(--muted);
  margin-top: 6px;
}

.material-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 20px;
}

.material-tags span {
  background: rgba(39, 120, 73, .10);
  color: var(--green);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  font-size: 13px;
}

.compact-specs {
  margin-top: 18px;
}

/* desktop header */
@media (min-width: 901px) {
  .primefill-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

/* mobile */
@media (max-width: 900px) {
  body { overflow-x: hidden; }

  .primefill-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    color: var(--text);
    padding: 12px 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
  }

  .brand-menu-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .brand {
    color: var(--text) !important;
    text-decoration: none;
    min-width: 0;
  }

  .brand span {
    color: var(--text) !important;
    font-size: 23px;
    line-height: 1;
  }

  .brand small {
    color: var(--muted) !important;
    font-size: 10px;
  }

  .menu-toggle {
    display: grid;
    gap: 5px;
    width: 44px;
    height: 44px;
    place-content: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #f7f7f7;
    cursor: pointer;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 99px;
  }

  .primefill-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(84vw, 340px);
    height: 100vh;
    z-index: 200;
    background: #ffffff;
    color: var(--text);
    box-shadow: -20px 0 60px rgba(0,0,0,.18);
    padding: 86px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: translateX(110%);
    transition: transform .22s ease;
  }

  body.menu-open .primefill-menu {
    transform: translateX(0);
  }

  .menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.36);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  body.menu-open .menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .primefill-menu a,
  .primefill-menu .cart-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 48px;
    padding: 13px 15px;
    background: #f7f7f7;
    color: var(--text) !important;
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    font-weight: 800;
  }

  .primefill-menu .cart-button {
    background: var(--green);
    color: #ffffff !important;
    justify-content: center;
  }

  .material-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
  }

  .material-title-row h2 { margin: 0; }

  .materials-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text);
    font-weight: 900;
    cursor: pointer;
  }

  .material-chevron {
    font-size: 18px;
    line-height: 1;
  }

  body.materials-open .material-chevron {
    transform: rotate(180deg);
  }

  .material-filters {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 14px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 12px;
  }

  body.materials-open .material-filters {
    display: grid;
  }

  .material-filters a {
    text-align: center;
    background: #f7f7f7;
    color: var(--text) !important;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 10px;
    font-weight: 900;
    text-decoration: none;
  }

  .material-filters a.active {
    background: var(--green);
    color: #ffffff !important;
  }

  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }

  .product {
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
  }

  .product-image,
  .photo-image {
    height: 245px !important;
  }

  .product-info {
    background: #ffffff;
    color: var(--text);
    padding: 16px;
  }

  .product-info h3 { color: var(--text) !important; }
  .product-info p { color: var(--muted) !important; }

  .product-price {
    color: var(--green) !important;
    font-weight: 900;
  }

  .primary-button,
  .product .primary-button {
    width: 100%;
    min-height: 48px;
    background: var(--green);
    color: #ffffff !important;
    border-radius: 14px;
    font-weight: 900;
  }

  .secondary-button[disabled],
  button[disabled] {
    background: #eeeeee !important;
    color: #555555 !important;
    border: 1px solid #dddddd !important;
  }

  .product-detail-pro {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .product-detail-photo {
    min-height: 320px;
    border-radius: 24px;
  }

  .product-detail-panel h1 {
    font-size: 34px;
  }

  .print-settings-card,
  .tech-card,
  .material-use-box {
    border-radius: 16px;
  }

  .detail-layout,
  .checkout-grid {
    grid-template-columns: 1fr !important;
  }

  .footer {
    display: grid;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .material-filters { grid-template-columns: 1fr; }
  .product-image, .photo-image { height: 220px !important; }
  .product-detail-photo { min-height: 280px; }
}
