*{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

/* NASLOV + ADMIN GUMB */

h1{
  text-align:center;
  margin:28px 0 10px;
  font-size:30px;
  font-weight:700;
}

/* MODAL + PREVIEW */
.modal{
  display:none;
}
.modal.is-open{
  display:flex;
}

label{
  display:block;
  margin-top:10px;
  font-weight:600;
}

input,
select,
textarea{
  width:100%;
  padding:8px;
  margin-top:5px;
  border:1px solid #ccc;
  border-radius:6px;
}

textarea{
  resize:vertical;
}

#seoTitleHr,#metaDescriptionHr{
  box-sizing:border-box;
  max-width:100%;
  border:1px solid #d9b5cb;
  border-radius:12px;
  padding:11px 12px;
  background:#fffaf5;
  color:#50324e;
  font:inherit;
}
#seoTitleHr:focus-visible,#metaDescriptionHr:focus-visible{
  outline:3px solid #a371ae;
  outline-offset:3px;
}
#product-seo-help{display:block;margin:8px 0 14px;color:#73546e;line-height:1.5;overflow-wrap:anywhere}

.preview-gallery{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.preview-item{
  position:relative;
  display:inline-block;
}

.preview-item img,
.preview-item video{
  width:120px;
  height:120px;
  object-fit:cover;
  border-radius:6px;
  border:1px solid #ccc;
  display:block;
}

.remove-btn{
  position:absolute;
  top:2px;
  right:4px;
  width:22px;
  height:22px;
  line-height:22px;
  border:none;
  border-radius:50%;
  background:rgba(167,78,155,.9);
  color:#fff;
  font-weight:700;
  cursor:pointer;
}

.star-btn{
  position:absolute;
  left:6px;
  top:6px;
  width:26px;
  height:26px;
  border-radius:50%;
  background:#ffffffd9;
  border:1px solid #e0e0e0;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:16px;
  transition:transform .15s ease;
}

.star-btn:hover{
  transform:scale(1.08);
}

.star-btn.active{
  background:#ffe082;
  border-color:#f4b400;
}

.star-index{
  position:absolute;
  left:6px;
  bottom:6px;
  background:#a74e9b;
  color:#fff;
  font-size:11px;
  padding:2px 6px;
  border-radius:12px;
  display:none;
}

.star-btn.active + .star-index{
  display:inline-block;
}

/* Istaknuto (Top/Novo/Akcija) vodoravno */

.featured-row{
  display:flex;
  gap:18px;
  margin-top:6px;
  align-items:center;
}

.featured-row label{
  margin-top:0;
  font-weight:500;
}

/* GRUPE / NASLOVI */

.product-group h2{
  text-align:center;
  font-size:28px;
  margin:2rem 0 1.5rem;
  color:var(--accent);
}

.product-subgroup h3{
  margin:1rem 0 .5rem 1rem;
  font-size:20px;
  color:var(--accent);
}

/* TEKSTUALNI DIO */

.product-right{
  width:100%;
  padding:4px 4px 0;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  min-width:0;
}

.product-right h4{
  font-size:1rem;
  color:#333;
  margin:4px 0 6px;
  text-align:center;
  width:100%;
}

.product-right p{
  color:var(--muted);
  font-size:0.85rem;
  margin-bottom:0.9rem;
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:15;
  line-clamp:15;
  line-height:1.5;
  max-height:calc(15 * 1.5em);
}

.meta-row{
  margin:.25rem 0;
  color:#333;
  font-size:0.7rem;
}

.meta-label{
  font-weight:700;
}

/* CIJENA */

.price-block{
  display:inline-flex;
  align-items:center;
  gap:8px;
}

.old-price{
  text-decoration:line-through;
  color:#999;
  font-size:.9rem;
}

.new-price{
  color:#e65100;
  font-weight:700;
  font-size:1.1rem;
}

.discount-pill{
  background:#ff5252;
  color:#fff;
  font-size:.8rem;
  padding:2px 8px;
  border-radius:999px;
}

/* GUMBI - manji, uredni  */
.shop-actions{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  padding:10px 16px 0;
}

.product-left .btn{
  width:80%;
  max-width:260px;
}

/* osnovni stil */
.btn{
  border:none;
  padding:7px 14px;          /* manje nego prije */
  border-radius:999px;       /* zaobljeni, "tablet" stil */
  font-weight:600;
  cursor:pointer;
  font-size:0.85rem;         /* manji font */
  box-shadow:0 2px 4px rgba(0,0,0,0.15);
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    opacity .15s ease;
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 8px rgba(0,0,0,0.25);
}

/* Dodaj u kosaricu */
.btn-cart{
  background:#FFD166;
  color:#3b3b3b;
}

/* Vise slika / galerija */
.btn-more-photos{
  background:#F5D7FF;
  color:#555;
  border:1px solid #e6d6ea;
}

/* kad je artikl rasprodan ili rezerviran */
.btn-disabled{
  opacity:0.6;
  cursor:not-allowed;
}

/* === ADMIN === */

.edit-toggle{
  position:absolute;
  bottom:14px;
  right:14px;
  width:36px;
  height:36px;
  background:#a74e9b;
  color:#fff;
  border:none;
  border-radius:50%;
  font-size:18px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 2px 8px rgba(0,0,0,0.25);
  transition:transform .25s ease, background .25s ease;
  z-index:10;
}

.edit-toggle:hover{
  transform:scale(1.15);
  background:#b65fb3;
}

.card-actions{
  position:absolute;
  bottom:60px;
  right:14px;
  display:flex;
  flex-direction:column;
  gap:8px;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
  z-index:11;
}

.card-actions.show{
  opacity:1;
  pointer-events:auto;
}

.edit-btn,
.delete-btn{
  padding:8px;
  font-size:.85rem;
  font-weight:bold;
  border:none;
  border-radius:6px;
  cursor:pointer;
}

.edit-btn{
  background:#ffc107;
  color:#333;
}

.delete-btn{
  background:#f44336;
  color:#fff;
}

/* LIGHTBOX - fullscreen galerija (novi stil) */
.lb-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.85);
  display:none;                 /* JS pali na "flex" */
  align-items:center;
  justify-content:center;
  z-index:200;
  padding:1rem;
}

.lb-wrap{
  position:relative;
  max-width:100%;
  max-height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}

/* srediste lightboxa - tu ubacujemo sliku ili video */
#lbContent{
  max-width:100%;
  max-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}
.lb-dimensions{flex:none;margin:10px 14px;padding:8px 16px;border:1px solid #e2c1ce;border-radius:999px;background:#fff6ed;color:#603e6a;text-align:center;font:inherit;max-width:calc(100vw - 64px);overflow-wrap:anywhere}
.lb-dimensions[hidden]{display:none}

/* zajednicki stil za sliku i video u lightboxu */
.lb-img,
.lb-video{
  max-width:100%;
  max-height:calc(100dvh - 150px);
  object-fit:contain;
  border-radius:10px;
  background:#000;
  box-shadow:0 10px 30px rgba(0,0,0,.5);
  display:block;
}

/* jednostavan loader dok se slika ne ucita */
.lb-loading{
  width:48px;
  height:48px;
  border-radius:50%;
  border:4px solid rgba(255,255,255,.4);
  border-top-color:#fff;
  animation:lb-spin .8s linear infinite;
}

@keyframes lb-spin{
  to{ transform:rotate(360deg); }
}

/* gumbi: close / prev / next */
.lb-close,
.lb-prev,
.lb-next{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:rgba(255,255,255,.9);
  border:none;
  cursor:pointer;
  width:44px;
  height:44px;
  border-radius:50%;
  font-size:22px;
  line-height:44px;
  text-align:center;
  user-select:none;
  box-shadow:0 4px 12px rgba(0,0,0,.4);
}

.lb-close{
  top:10px;
  right:10px;
  transform:none;
  font-size:20px;
}

.lb-prev{
  left:10px;
}

.lb-next{
  right:10px;
}

/* malo sitnije na mobitelu */
@media (max-width:768px){
  .lb-close,
  .lb-prev,
  .lb-next{
    width:38px;
    height:38px;
  font-size:18px;
  }
}

/* === GLOBALNI POPUP OVERLAY (poklon + kosarica) === */

.popup-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.45);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:300;
}

.popup-overlay.show{
  display:flex;
}

.popup-box{
  position:relative;
  background:#fff;
  border-radius:14px;
  padding:20px 24px 18px;
  max-width:420px;
  width:90%;
  box-shadow:0 12px 28px rgba(0,0,0,0.35);
  font-size:0.95rem;
}

.popup-box h3{
  margin-bottom:8px;
  font-size:1.1rem;
}

.popup-box p{
  margin-bottom:12px;
}

.popup-total{
  margin-top:10px;
  font-weight:600;
}

.popup-actions{
  margin-top:14px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
}

/* === Shop controls (filter/sort/wishlist) === */
.shop-controls {
  display: none;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin: 0.75rem 0 0.5rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.shop-controls.is-open {
  display: grid;
}

.filters-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #fbdde2, #f5b8c4);
  color: #4b2b2b;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0,0,0,0.12);
  transition: transform 0.12s ease, box-shadow 0.2s ease;
  margin: 0.6rem auto 0.4rem;
  justify-content: center;
  width: fit-content;
}

/* Hidden removes the button and its margins; filtering code remains intact. */
.filters-toggle[hidden] { display: none; }

.filters-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.16);
}

.admin-panel .add-btn {
  border: none;
  background: #f7d6dd;
  color: #4b2b2b;
  font-weight: 700;
  padding: 0.65rem 1.3rem;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0,0,0,0.12);
  transition: transform 0.12s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-panel .add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.16);
}

.admin-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0.75rem auto 0.25rem;
  text-align: center;
}
.admin-panel.admin-only.admin-visible {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
}

/* Osnovno skrivanje admin elemenata (sprječava flash prije admin.css) */
.admin-only {
  display: none !important;
}

.admin-only.admin-visible {
  display: inline-block !important;
}

.admin-panel.admin-only.admin-visible {
  display: flex !important;
}

.filters-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.filters-actions .btn {
  min-width: 120px;
}

.filters-row,
.sort-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.filters-row label,
.sort-row label {
  font-weight: 600;
  color: #4b2b2b;
}

.filters-row select,
.sort-row select,
.filters-row input[type="number"] {
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  border: 1px solid #e0d6d6;
  background: #faf7f6;
  min-width: 120px;
}

.price-filter {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.wishlist-share {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.wishlist-counter {
  background: #f7e8ef;
  color: #a74e9b;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.wishlist-share button {
  border: 1px solid #d7bfd7;
  background: #fff;
  border-radius: 12px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

.wishlist-share button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

/* === Quick View === */
.quickview {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 120;
}

.quickview.show {
  display: flex;
}

.quickview__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(3px);
}

.quickview__dialog {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 1rem;
  max-width: 720px;
  width: min(94vw, 720px);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  z-index: 1;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.1fr 1fr;
}

.quickview__close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
  color: #8a3c3c;
}

.quickview__media {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quickview__media img,
.quickview__media video {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

.quickview__title {
  margin: 0 0 0.35rem;
}

.quickview__content{min-width:0}

.quickview__price {
  font-weight: 700;
  font-size: 1.1rem;
  color: #a74e9b;
  margin-bottom: 0.4rem;
}

.quickview__meta {
  color: #333;
  margin: 0;
}

.quickview__meta .meta-row {
  margin: 0.35rem 0;
  font-size: 0.9rem;
}

.quickview__meta .price-block {
  flex-wrap: wrap;
  align-items: baseline;
}

.quickview__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* === Recently viewed === */
.recently-viewed {
  margin: 2rem 0 1rem;
  padding: 1rem;
  background: #fff8f6;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.08);
}

.recently-viewed h3 {
  margin: 0 0 0.5rem;
}

.recently-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.recent-card {
  background: #fff;
  border-radius: 10px;
  padding: 0.5rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.recent-card img {
  width: 100%;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}

.recent-card h4 {
  margin: 0.4rem 0 0.2rem;
  font-size: 0.95rem;
}

.recent-card .price {
  color: #a74e9b;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Add-to-cart flash */
.cart-flash {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #4caf50;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
}

.cart-flash.show {
  opacity: 1;
  transform: translate(-50%, -6px);
}

@media (max-width: 960px) {
  .shop-controls {
    grid-template-columns: 1fr;
  }

  .quickview__dialog {
    grid-template-columns: 1fr;
    width: 94vw;
  }
}

.popup-close{
  position:absolute;
  top:8px;
  right:10px;
  width:26px;
  height:26px;
  border-radius:50%;
  border:none;
  background:#f44336;
  color:#fff;
  font-weight:bold;
  cursor:pointer;
}

/* === POPUP "Dodano u kosaricu" - thumbnail === */

#cart-popup-list{
  max-height:220px;
  overflow-y:auto;
}

.cart-popup-item{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:8px;
}

.cart-popup-thumb{
  width:60px;
  height:60px;
  border-radius:8px;
  overflow:hidden;
  flex-shrink:0;
  background:#fff;
}

.cart-popup-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  display:block;
}

/* malo teksta desno od slike */

.cart-popup-info{
  flex:1 1 auto;
  min-width:0;
  font-size:0.9rem;
}

.cart-popup-title{
  font-weight:600;
  margin-bottom:2px;
}

.cart-popup-price{
  color:#e65100;
  font-weight:600;
  font-size:0.9rem;
}

html{
  scroll-padding-top:100px;
}

/* Osnovni stil za popup dugmad */

.popup-actions button,
.popup-actions a{
  padding:10px 18px;
  border-radius:6px;
  border:none;
  font-size:1rem;
  font-weight:600;
  cursor:pointer;
  transition:background 0.2s ease, transform 0.1s ease;
  display:inline-block;
  text-align:center;
  text-decoration:none;
}

/* Zelena - za Pokloni i Blagajna */

.popup-btn-green{
  background-color:#4caf50;
  color:white;
}
.popup-btn-green:hover{
  background-color:#43a047;
}

/* Siva - za Nastavi bez poklona i Nastavi s kupnjom */

.popup-btn-gray{
  background-color:#e0e0e0;
  color:#333;
}
.popup-btn-gray:hover{
  background-color:#d5d5d5;
}

/* Animacija */

.popup-actions button:hover,
.popup-actions a:hover{
  transform:translateY(-1px);
}

.popup-close,
.cart-popup-close{
  position:absolute;
  top:10px;
  right:12px;
  width:28px;
  height:28px;
  background-color:transparent;
  border:none;
  border-radius:50%;
  font-size:18px;
  font-weight:bold;
  color:#666;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:all 0.2s ease;
}

.popup-close:hover,
.cart-popup-close:hover{
  background-color:#ffe6e6;
  color:#d32f2f;
  transform:rotate(90deg);
}

.cart-popup-remove{
  background:transparent;
  border:none;
  color:#999;
  font-size:16px;
  font-weight:bold;
  cursor:pointer;
  border-radius:50%;
  width:24px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:all 0.2s ease;
}

.cart-popup-remove:hover{
  background-color:#ffe6e6;
  color:#d32f2f;
  transform:rotate(90deg);
}

/* === SHELL OKO OGLASA + THUMB-KARTICE === */

.product-shell{
  display:flex;
  flex-direction:column;
  gap:0.6rem;
  height:100%;
}

/* Glavni header blok - desktop */
.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 999px;
  padding: 0.8rem 1.4rem;
}

/* Mobile tweaks for dense layouts */
@media (max-width: 640px){
  .product-card{
    min-height: auto;
    padding: 12px 12px 16px;
  }

  .product-right p{
    -webkit-line-clamp: 10;
    line-clamp: 10;
    max-height: none;
  }

  .featured-row{
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .modal-content{
    padding: 16px 14px;
    max-height: 88vh;
  }

  .popup-box{
    width: 95%;
  }
}
/* Chat/deep-link target stays marked until this product is clicked. */
.product-card[data-deep-link-target="true"]{box-shadow:0 0 0 3px #a74e9b !important;scroll-margin-top:100px}

/* Main-photo selection is independent of the chatbot comparison star. */
.preview-item img.product-main-choice{box-sizing:border-box;border:3px solid transparent;background:#fff8f2;cursor:pointer;transition:border-color .15s ease,box-shadow .15s ease}
.preview-item img.product-main-choice:hover{border-color:#c292cf;box-shadow:0 0 0 2px #f5e5f5}
.preview-item img.product-main-choice.is-main{border-color:#824399;box-shadow:0 0 0 2px #eedcf2}
.preview-item img.product-main-choice:focus-visible{outline:3px solid #824399;outline-offset:3px}
.main-photo-help{font-size:.9rem;line-height:1.5;color:#72506e;margin:10px 0 14px;max-width:65ch}
@media (max-width:480px){.preview-item img.product-main-choice{width:104px;height:104px}}

/* Popup photo loading only; retain the existing 60px thumbnail and white box. */
.cart-popup-thumb > canvas{display:block;width:100%;height:100%}
.cart-popup-thumb > .image-fallback{display:grid;place-items:center;width:100%;height:100%;min-height:0;padding:0;border:0;border-radius:inherit;background:#f8eff4;color:#594752;font-size:0}
.cart-popup-thumb > .image-fallback::before{content:"▧";font-size:24px}
.cart-popup-thumb > [hidden]{display:none!important}

/* Reserve the main photograph before download; the full-quality original replaces
   only the same product's cached preview, without moving the dialog contents. */
.quickview-photo-frame{position:relative;width:100%;aspect-ratio:1;border-radius:12px;overflow:hidden;background:#f8eff4;flex:none}
.quickview__media .quickview-photo-frame > img,
.quickview__media .quickview-photo-frame > canvas,
.quickview-photo-frame > .image-fallback{position:absolute;inset:0;width:100%;height:100%;margin:0;box-sizing:border-box;object-fit:contain;min-height:0;border-radius:inherit}
.quickview-photo-frame > canvas{display:block}

/* The close target stays visible while the product dialog scrolls. */
body.shop-page .quickview{box-sizing:border-box;padding:max(12px,env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) max(12px,env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px))}
body.shop-page .quickview__close{position:sticky;top:0;right:0;grid-column:1 / -1;justify-self:end;margin-bottom:-44px;width:44px;height:44px;min-width:44px;min-height:44px;display:grid;place-items:center;padding:0;z-index:5;border-radius:50%;background:#fff;color:#71314f;box-shadow:0 1px 5px #0002;touch-action:manipulation}
body.shop-page .quickview__close:focus-visible{outline:2px solid #71314f;outline-offset:2px}
body.shop-page .quickview__dialog{max-width:min(720px,calc(100% - 2rem));max-height:min(90vh,calc(100vh - max(12px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px)) - 2rem));max-height:min(90dvh,calc(100dvh - max(12px,env(safe-area-inset-top,0px)) - max(12px,env(safe-area-inset-bottom,0px)) - 2rem));scroll-padding-top:48px;overscroll-behavior:contain}
.category-loading{position:relative;inset:auto;z-index:auto;display:grid;place-items:center;background:transparent;margin:0;padding:16px;min-height:96px;box-sizing:border-box}
.category-loading>img{display:block;width:80px;max-width:100%;height:auto}
.category-loading[data-load-failed]{position:relative;min-height:160px;color:#873875;text-align:center}

/* Reserve the covered catalogue area only while its existing loader is active.
   Filled products, empty results and the category landing retain their layout. */
@supports selector(body:has(#products-loader)){
 body:has(#products-loader:not([aria-hidden="true"])) #products:empty:not([hidden]){min-height:100vh}
}

/* Visual category hierarchy only: no product cards, routes or filters are replaced. */
#products > .product-group > h2 {
 box-sizing: border-box; width: fit-content; min-width: min(360px,calc(100% - 24px)); max-width: calc(100% - 24px);
 margin: 30px auto 22px; padding: 16px 28px; border: 1px solid #e5c5d5; border-radius: 18px;
 background: linear-gradient(135deg,#fff9fc,#faedf4); color: #78445f; font-family: Georgia,'Times New Roman',serif;
 font-size: clamp(22px,2.2vw,28px); font-weight: 500; line-height: 1.35; letter-spacing: .015em; text-align: center; text-wrap: balance; overflow-wrap: break-word;
 box-shadow: 0 3px 12px rgb(132 63 99 / 4%);
}
#products .product-subgroup > h3 {
 box-sizing: border-box; width: fit-content; max-width: calc(100% - 24px); margin: 18px auto 16px; text-align: center; padding: 10px 18px;
 border: 1px solid #ead3df; border-radius: 13px; background: #fff7fb; color: #85536d;
 font-family: Georgia,'Times New Roman',serif; font-size: 19px; font-weight: 500; line-height: 1.35; letter-spacing: .01em; text-wrap: balance; overflow-wrap: break-word;
}
#offer-panel .offer-section-title {
 box-sizing: border-box; padding: 12px 14px; margin: 18px 0 9px; border: 1px solid #e5c5d5; border-radius: 14px;
 background: #faedf4; color: #78445f; font-family: Georgia,'Times New Roman',serif; font-size: 19px; font-weight: 500; line-height: 1.3; letter-spacing: .01em; text-transform: none; overflow-wrap: break-word;
}
#offer-panel .offer-link {
 box-sizing: border-box; min-height: 44px; margin: 0 0 8px 10px; padding: 10px 14px; border: 1px solid #ecdce5; border-radius: 12px;
 background: #fff9fc; color: #6c465b; font-size: 15px; line-height: 1.4; white-space: normal; overflow-wrap: break-word;
}
#offer-panel .offer-section-title > .offer-link { margin: -12px -14px; padding: 12px 14px; border: 0; border-radius: 13px; background: transparent; font: inherit; color: inherit; }
#offer-panel .offer-link:hover { background: #f7e7ef; border-color: #dbafc5; }
#offer-panel .offer-link:focus-visible { outline: 2px solid #9b567e; outline-offset: 2px; }
#filters-panel #filter-material, #filters-panel #filter-type { min-height: 44px; border: 1px solid #e5c5d5; border-radius: 12px; background-color: #fff9fc; color: #6c465b; }
@media(max-width:600px){#products > .product-group > h2{padding:13px 18px;margin-top:80px;font-size:22px;}#products .product-subgroup > h3{padding:10px 14px;font-size:17px;}#offer-panel .offer-section-title{font-size:18px;}}

/* Approved compact category titles; photographs and product cards stay unchanged. */
#products > .product-group > h2 { min-width: min(216px,calc(100% - 24px)); padding: 10px 17px; border-radius: 11px; font-size: clamp(14px,1.32vw,17px); }
#products .product-subgroup > h3 { margin: 11px auto 10px; padding: 6px 11px; border-radius: 8px; font-size: 12px; text-align: center; }
#offer-panel .offer-section-title { padding: 8px 9px; border-radius: 9px; font-size: 14px; }
#offer-panel .offer-section-title > .offer-link { margin: -8px -9px; padding: 8px 9px; min-height: 44px; }
#offer-panel .offer-link { font-size: 14px; }
@media(max-width:600px){#products > .product-group > h2{padding:8px 11px;font-size:14px;}#products .product-subgroup > h3{padding:6px 9px;font-size:12px;}#offer-panel .offer-section-title{font-size:14px;}}

/* Approved desktop-only category title enlargement; mobile remains unchanged. */
@media(min-width:1024px){
#products > .product-group > h2 { min-width: min(237.6px,calc(100% - 24px)); padding: 11px 18.7px; border-radius: 12.1px; font-size: clamp(15.4px,1.452vw,18.7px); }
#products .product-subgroup > h3 { padding: 6.6px 12.1px; border-radius: 8.8px; font-size: 13.2px; }
#offer-panel .offer-section-title { padding: 8.8px 9.9px; border-radius: 9.9px; font-size: 15.4px; }
#offer-panel .offer-section-title > .offer-link { margin: -8.8px -9.9px; padding: 8.8px 9.9px; }
#offer-panel .offer-link { font-size: 15.4px; }
}

/* Only confirmed empty Offer entries are unavailable; links remain readable. */
#offer-panel .offer-link[aria-disabled="true"] { opacity: .48; cursor: not-allowed; box-shadow: none; }
#offer-panel .offer-link[data-offer-availability="pending"] { cursor: progress; }

/* Retired Set menu entries are excluded from the public Offer, including before JS starts. */
#offer-panel .offer-list > [data-i18n="shop.group.set"],
#offer-panel .offer-list > li:has(> .offer-link[href="#cat-set"]),
#offer-panel .offer-list > li:has(> .offer-link[data-offer-href="#cat-set"]),
#offer-panel .offer-list > li:has(> .offer-link[data-category-anchor="cat-set"]) { display: none !important; }

/* Unknown entries retain their normal appearance; only confirmed empty entries dim. */
#offer-panel .offer-link[data-offer-availability="pending"] { opacity: 1; }
