/* ==========================================================================
   HEDONA SHOP — /shop/, arhive i strana proizvoda (Hedona_Shop modul)

   Sve je zaključano na dve body klase koje dodaje Hedona_Shop::body_class():
     .hedona-shop-archive  → /shop/, product_cat, product_tag, product_brand
     .hedona-product       → single proizvod
   Te klase se NIKAD ne dodaju na /cart/, /checkout/ i /my-account/ (modul se
   tamo uopšte ne pokreće), pa nijedan selektor iz ovog fajla ne može da
   pogodi korpu, kasu ili payment gateway markup.

   Paleta: ponoćna #0F0D0A · espresso #241D12 · staro zlato #C9A54A
           duboko zlato #8A6D24 · pergament #F7F2E9 · vinska #7A2F3E
   ========================================================================== */

/*
 * PAŽNJA — ovde je ranije stajao blok koji je na `body.hedona-shop-archive` i
 * `body.hedona-product` DEKLARISAO svetle vrednosti `--hd-*`. Pošto je body
 * potomak `:root`, te vrednosti su nadjačavale `:root[data-theme="dark"]` i
 * tamna tema je bila mrtva na /shop/, kategorijama, strani proizvoda i pretrazi
 * (navigacija crna na crnom, izmereno 1,02:1). Boje su sada ISKLJUČIVO u
 * hedona-layout.css, gde su definisane za obe teme. Ovde ostaju samo tokeni
 * koji nisu boje.
 */
.hedona-shop-archive,
.hedona-product {
  --hd-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hd-serif: "Playfair Display", Georgia, serif;
}

/* --------------------------------------------------------------------------
   0. Čišćenje starog Elementor šablona arhive (#336)
   Stari šablon je iznad grida imao: 2 lottie strelice, crni hero visok 77vh sa
   starim kvadratnim logom kao pozadinom (89 KB slika) i praznu traku. To je
   glavni razlog zašto je prodavnica delovala prazno — sklanja se u celosti.
   -------------------------------------------------------------------------- */
.hedona-shop-archive .elementor-location-archive .elementor-element-54f790f2,
.hedona-shop-archive .elementor-location-archive .elementor-element-73d6ae12,
.hedona-shop-archive .elementor-location-archive .elementor-element-38bfbfed,
.hedona-shop-archive .elementor-location-archive .elementor-element-6c8e3ba,
.hedona-shop-archive .elementor-location-archive .elementor-element-d6b2b0a,
.hedona-shop-archive .elementor-location-archive .elementor-widget-lottie {
  display: none !important;
}

/* Kontejner sa proizvodima: bez min-height 100vh i bez 6–12% paddinga */
.hedona-shop-archive.elementor-page-336 .elementor-element.elementor-element-251206b5,
.hedona-shop-archive .elementor-location-archive > .e-con:last-child {
  --min-height: 0px;
  --justify-content: flex-start;
  --align-items: stretch;
  --margin-top: 0px;
  --margin-bottom: 0px;
  --padding-top: 30px;
  --padding-bottom: 64px;
  --padding-left: 18px;
  --padding-right: 18px;
  background-color: var(--hd-parch);
}

.hedona-shop-archive .elementor-location-archive > .e-con:last-child > .e-con-inner {
  max-width: 1240px;
}

/* --------------------------------------------------------------------------
   1. Raster arhive: zaglavlje / sidebar 260px / glavna kolona
   -------------------------------------------------------------------------- */
.hedona-shop {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  grid-auto-rows: min-content;
  column-gap: 34px;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  font-family: var(--hd-sans);
  color: var(--hd-espresso);
  text-align: left;
}

.hedona-shop .hedona-arch { grid-column: 1 / -1; grid-row: 1; }
.hedona-shop .woocommerce-notices-wrapper { grid-column: 1 / -1; grid-row: 2; }
.hedona-shop .hedona-filters { grid-column: 1; grid-row: 3 / span 3; }
.hedona-shop .hedona-toolbar { grid-column: 2; grid-row: 3; }
.hedona-shop ul.products { grid-column: 2; grid-row: 4; }
.hedona-shop .hedona-empty { grid-column: 2; grid-row: 4; }
.hedona-shop nav.woocommerce-pagination { grid-column: 2; grid-row: 5; }
.hedona-shop .hedona-filters__backdrop { grid-row: 1; grid-column: 1; }

/* --------------------------------------------------------------------------
   2. Zaglavlje arhive — tamna traka sa breadcrumbs, H1, opisom i brojem
   -------------------------------------------------------------------------- */
.hedona-arch {
  background: var(--hd-espresso);
  background-image: linear-gradient(180deg, #2B2216 0%, #1C160E 100%);
  border-radius: var(--hd-r-md);
  border: 1px solid rgba(201, 165, 74, 0.22);
  padding: 26px 30px 28px;
  margin-bottom: 26px;
}

.hedona-crumbs { font-size: 12.5px; letter-spacing: 0.02em; }
.hedona-crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.hedona-crumbs li { display: flex; align-items: center; gap: 6px; }
.hedona-crumbs li + li::before {
  content: "/";
  color: rgba(239, 231, 213, 0.4);
}
.hedona-arch .hedona-crumbs a { color: #B9AC90; text-decoration: none; }
.hedona-arch .hedona-crumbs a:hover { color: var(--hd-gold); text-decoration: underline; }
.hedona-arch .hedona-crumbs span[aria-current] { color: #8F8672; }

.hedona-arch__title {
  font-family: var(--hd-serif);
  font-weight: 600;
  font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.1;
  color: var(--hd-parch);
  margin: 12px 0 0;
  text-wrap: balance;
}

.hedona-arch__desc {
  color: #C6BBA3;
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 68ch;
  margin-top: 10px;
}
.hedona-arch__desc p { margin: 0; }
.hedona-arch__desc p + p { margin-top: 8px; }

.hedona-arch__count {
  margin: 14px 0 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hd-gold);
}

/* --------------------------------------------------------------------------
   3. Sidebar sa filterima
   -------------------------------------------------------------------------- */
.hedona-filters { align-self: start; position: sticky; top: 96px; }

.hedona-filters__panel {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-r-md);
  padding: 4px 18px 18px;
}

.hedona-filters__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 0;
}
.hedona-filters__heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hd-muted);
}
.hedona-filters__close {
  display: none;
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: var(--hd-espresso);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

.hedona-filters__group { border-top: 1px solid var(--hd-line); padding: 16px 0 4px; margin-top: 14px; }
.hedona-filters__group:first-of-type { border-top: 0; margin-top: 6px; }

.hedona-filters__title {
  font-family: var(--hd-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hd-espresso);
  margin: 0 0 10px;
}

.hedona-filters__hint { font-size: 12.5px; color: var(--hd-muted); margin: 8px 0 0; }

.hedona-cats { list-style: none; margin: 0; padding: 0; }
.hedona-cats__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: var(--hd-r-sm);
  color: var(--hd-espresso);
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.3;
}
.hedona-cats__link:hover { background: var(--hd-shell); color: var(--hd-gold-deep); }
.hedona-cats__link.is-active {
  background: var(--hd-parch);
  color: var(--hd-gold-deep);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--hd-gold-deep);
}
.hedona-cats__n {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--hd-muted);
  background: var(--hd-shell);
  border-radius: var(--hd-r-pill);
  padding: 2px 8px;
}
.hedona-cats__link.is-active .hedona-cats__n { background: #FFFFFF; color: var(--hd-gold-deep); }

.hedona-price { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.hedona-price__in {
  flex: 1 1 82px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-r-sm);
  background: #FFFFFF;
  font: inherit;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--hd-espresso);
}
.hedona-price__in:focus { border-color: var(--hd-gold-deep); outline: 2px solid rgba(138, 109, 36, 0.25); outline-offset: 1px; }
.hedona-price__sep { color: var(--hd-muted); }
.hedona-price__go { flex: 1 1 100%; }

.hedona-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: var(--hd-r-sm);
  font-size: 14.5px;
  color: var(--hd-espresso);
  text-decoration: none;
}
.hedona-check:hover { background: var(--hd-shell); }
.hedona-check__box {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border: 1.5px solid var(--hd-line);
  border-radius: 4px;
  background: #FFFFFF;
  position: relative;
}
.hedona-check.is-on { font-weight: 600; color: var(--hd-gold-deep); }
.hedona-check.is-on .hedona-check__box { background: var(--hd-gold-deep); border-color: var(--hd-gold-deep); }
.hedona-check.is-on .hedona-check__box::after {
  content: "";
  position: absolute;
  inset: 2px 4px 4px 3px;
  border: solid #FFFFFF;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

.hedona-filters__reset {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 14px;
  color: var(--hd-wine);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   4. Traka sa alatima
   -------------------------------------------------------------------------- */
.hedona-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 0 0 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--hd-line);
}

.hedona-toolbar__count {
  margin: 0;
  font-size: 13.5px;
  color: var(--hd-muted);
  font-variant-numeric: tabular-nums;
}

.hedona-toolbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.hedona-toolbar__filters {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--hd-espresso);
  border-radius: var(--hd-r-sm);
  background: #FFFFFF;
  color: var(--hd-espresso);
  font: 600 14px/1 var(--hd-sans);
  cursor: pointer;
}
.hedona-toolbar__n {
  background: var(--hd-wine);
  color: #F6E9DC;
  border-radius: var(--hd-r-pill);
  font-size: 11px;
  padding: 2px 7px;
}

.hedona-view { display: inline-flex; border: 1px solid var(--hd-line); border-radius: var(--hd-r-sm); overflow: hidden; }
.hedona-view__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--hd-card);
  color: var(--hd-muted);
  cursor: pointer;
}
.hedona-view__btn .hedona-icon {
  display: block;
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.hedona-view__btn + .hedona-view__btn { border-left: 1px solid var(--hd-line); }
.hedona-view__btn.is-active { background: var(--hd-espresso); color: var(--hd-cream); }
.hedona-view__btn:focus-visible { outline: 2px solid var(--hd-gold); outline-offset: 2px; }

.hedona-shop .hedona-sort .woocommerce-ordering {
  margin: 0;
  float: none;
  display: flex;
  gap: 8px;
  align-items: center;
}
.hedona-shop .hedona-sort select.orderby {
  min-height: 44px;
  padding: 8px 34px 8px 12px;
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-r-sm);
  background-color: #FFFFFF;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6350' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  appearance: none;
  font: 600 14px/1.2 var(--hd-sans);
  color: var(--hd-espresso);
  max-width: 230px;
}
.hedona-shop-js .hedona-sort__go { display: none; }

.hedona-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; flex-basis: 100%; }
.hedona-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-r-pill);
  background: #FFFFFF;
  font-size: 13px;
  color: var(--hd-espresso);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.hedona-chip:hover { border-color: var(--hd-gold-deep); color: var(--hd-gold-deep); }
.hedona-chip__x { font-size: 15px; line-height: 1; color: var(--hd-muted); }
.hedona-chip--reset { background: var(--hd-espresso); border-color: var(--hd-espresso); color: var(--hd-cream); }
.hedona-chip--reset:hover { background: var(--hd-gold-deep); border-color: var(--hd-gold-deep); color: #FDF7E8; }

/* --------------------------------------------------------------------------
   5. Grid i kartica proizvoda
   -------------------------------------------------------------------------- */
.hedona-shop-archive ul.products.hedona-pgrid,
.hedona-product ul.products.hedona-pgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px !important;
  list-style: none;
  margin: 0;
  padding: 0;
  float: none;
}
/* Woo clearfix pseudo-elementi bi u gridu postali fantomske ćelije */
.hedona-shop-archive ul.products.hedona-pgrid::before,
.hedona-shop-archive ul.products.hedona-pgrid::after,
.hedona-product ul.products.hedona-pgrid::before,
.hedona-product ul.products.hedona-pgrid::after {
  content: none !important;
  display: none !important;
}

.hedona-shop-archive ul.products.hedona-pgrid li.product,
.hedona-product ul.products.hedona-pgrid li.product {
  display: flex;
  flex-direction: column;
  position: relative;
  width: auto;
  margin: 0;
  padding: 0;
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-r-md);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.hedona-shop-archive ul.products.hedona-pgrid li.product:hover,
.hedona-product ul.products.hedona-pgrid li.product:hover {
  transform: translateY(-3px);
  border-color: var(--hd-line);
  box-shadow: var(--hd-sh-md);
}

.hedona-pcard__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}
.hedona-pbadge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
}
.hedona-pbadge--sale { background: var(--hd-wine); color: var(--hd-onink, #f6e9dc); }
.hedona-pbadge--age {
  margin-left: auto;
  background: var(--hd-card);
  color: var(--hd-wine);
  border: 1.5px solid var(--hd-wine);
}

.hedona-pcard__media {
  display: block;
  background: var(--hd-well);
  border-bottom: 1px solid var(--hd-line);
}
.hedona-shop-archive .hedona-pcard__media img,
.hedona-product .hedona-pcard__media img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 14px;
  border: 0 !important;
  margin: 0 !important;
}

.hedona-pcard__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  padding: 14px 16px 16px;
  text-align: left;
}

.hedona-pcard__brand {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hd-gold);
}

.hedona-pcard__title {
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: var(--hd-ink);
  text-transform: none;
  letter-spacing: 0;
}
.hedona-pcard__title a { color: inherit; text-decoration: none; }
.hedona-pcard__title a:hover { color: var(--hd-gold); }

.hedona-pcard__price {
  margin-top: auto;
  padding-top: 6px;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--hd-ink);
}
.hedona-pcard__price del { color: var(--hd-muted); font-weight: 400; font-size: 14px; margin-right: 6px; }
.hedona-pcard__price ins { color: var(--hd-wine); text-decoration: none; }
.hedona-pcard__price .woocommerce-Price-currencySymbol { font-size: 0.8em; font-weight: 600; }

.hedona-pcard__stock { font-size: 12px; color: var(--hd-wine); font-weight: 600; }

/* C8: CTA = isti kao .hedona-card__cta (hedona-btn iz layout.css) */
.hedona-shop-archive .hedona-pcard__cta.hedona-card__cta,
.hedona-product .hedona-pcard__cta.hedona-card__cta {
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  min-height: 44px;
}
.hedona-shop-archive .hedona-pcard__cta.loading,
.hedona-shop-archive .hedona-pcard__cta.added { opacity: 0.75; }
.hedona-shop-archive .added_to_cart,
.hedona-product .added_to_cart {
  display: inline-block;
  margin: 8px 16px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--hd-gold-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* prikaz u listi (JS enhancement, difolt ostaje mreža) */
.hedona-shop.is-list ul.products.hedona-pgrid { grid-template-columns: minmax(0, 1fr); }
.hedona-shop.is-list ul.products.hedona-pgrid li.product { flex-direction: row; align-items: stretch; padding-bottom: 0; }
.hedona-shop.is-list .hedona-pcard__media { flex: 0 0 clamp(120px, 22%, 190px); border-bottom: 0; border-right: 1px solid var(--hd-line); }
.hedona-shop.is-list .hedona-pcard__body { padding: 16px 18px; gap: 8px; }
.hedona-shop.is-list .hedona-pcard__title { font-size: 17px; }
.hedona-shop.is-list .hedona-pcard__cta { width: auto; min-width: 190px; margin-top: 4px; }

/* --------------------------------------------------------------------------
   6. Paginacija
   -------------------------------------------------------------------------- */
.hedona-shop nav.woocommerce-pagination { margin-top: 34px; text-align: left; }
.hedona-shop nav.woocommerce-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hedona-shop nav.woocommerce-pagination ul li { border: 0; margin: 0; overflow: visible; }
.hedona-shop nav.woocommerce-pagination ul li a,
.hedona-shop nav.woocommerce-pagination ul li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-r-sm);
  background: #FFFFFF;
  color: var(--hd-espresso);
  font: 600 14px/1 var(--hd-sans);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}
.hedona-shop nav.woocommerce-pagination ul li a:hover {
  border-color: var(--hd-gold-deep);
  color: var(--hd-gold-deep);
  background: #FFFFFF;
}
.hedona-shop nav.woocommerce-pagination ul li span.current {
  background: var(--hd-espresso);
  border-color: var(--hd-espresso);
  color: var(--hd-cream);
}
.hedona-shop nav.woocommerce-pagination ul li span.dots { border-color: transparent; background: transparent; min-width: 24px; }

/* C3: spreči preklapanje strelice i teksta (WC/Elementor dupli ::before). */
.hedona-shop nav.woocommerce-pagination ul li a.prev,
.hedona-shop nav.woocommerce-pagination ul li a.next {
  gap: 6px;
  white-space: nowrap;
  padding-inline: 14px;
}
.hedona-shop nav.woocommerce-pagination ul li a::before,
.hedona-shop nav.woocommerce-pagination ul li a::after {
  content: none !important;
  display: none !important;
}

/* --------------------------------------------------------------------------
   7. Prazan rezultat
   -------------------------------------------------------------------------- */
.hedona-empty {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-r-md);
  padding: 40px 28px;
}
.hedona-empty__title { font-family: var(--hd-serif); font-size: 24px; font-weight: 600; margin: 0 0 8px; color: var(--hd-espresso); }
.hedona-empty__text { margin: 0 0 18px; color: var(--hd-muted); }
.hedona-empty__cats { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; }
.hedona-empty__cats a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-r-pill);
  color: var(--hd-espresso);
  font-size: 13.5px;
  text-decoration: none;
}
.hedona-empty__cats a:hover { border-color: var(--hd-gold-deep); color: var(--hd-gold-deep); }

/* --------------------------------------------------------------------------
   8. Zajednička dugmad modula
   -------------------------------------------------------------------------- */
.hedona-shop-archive .hedona-sbtn,
.hedona-product .hedona-sbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: var(--hd-r-sm);
  border: 1px solid var(--hd-espresso);
  background: var(--hd-espresso);
  color: var(--hd-cream);
  font: 600 14px/1.2 var(--hd-sans);
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}
.hedona-shop-archive .hedona-sbtn--ghost,
.hedona-product .hedona-sbtn--ghost { background: #FFFFFF; color: var(--hd-espresso); }
.hedona-shop-archive .hedona-sbtn--primary,
.hedona-product .hedona-sbtn--primary { background: var(--hd-espresso); color: var(--hd-cream); }
.hedona-shop-archive .hedona-sbtn:hover,
.hedona-product .hedona-sbtn:hover { background: var(--hd-gold-deep); border-color: var(--hd-gold-deep); color: #FDF7E8; }

.hedona-shop-archive a:focus-visible,
.hedona-shop-archive button:focus-visible,
.hedona-shop-archive input:focus-visible,
.hedona-shop-archive select:focus-visible,
.hedona-product a:focus-visible,
.hedona-product button:focus-visible,
.hedona-product input:focus-visible,
.hedona-product select:focus-visible {
  outline: 2px solid var(--hd-gold-deep);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   9. STRANA PROIZVODA — dve kolone iz postojećeg Elementor šablona (#332)
   Kolone šablona se "otapaju" (display:contents), pa svi widgeti postaju
   ćelije jednog grida i mogu da se poređaju kupovnim redosledom.
   -------------------------------------------------------------------------- */
.hedona-product .elementor-location-single > .e-con:first-of-type {
  --min-height: 0px;
  --padding-top: 26px;
  --padding-bottom: 40px;
  --padding-left: 18px;
  --padding-right: 18px;
  background-color: var(--hd-parch);
}
.hedona-product .elementor-location-single > .e-con:last-child {
  --margin-top: 0px;
  --margin-bottom: 0px;
  --padding-top: 10px;
  --padding-bottom: 64px;
  --padding-left: 18px;
  --padding-right: 18px;
  background-color: var(--hd-parch);
}
.hedona-product .elementor-location-single > .e-con > .e-con-inner { max-width: 1200px; }

.hedona-product .elementor-location-single > .e-con:first-of-type > .e-con-inner {
  display: grid;
  grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
  column-gap: 46px;
  align-items: start;
}
.hedona-product .elementor-location-single > .e-con:first-of-type > .e-con-inner > .e-con {
  display: contents;
}

.hedona-product .elementor-widget-woocommerce-breadcrumb { grid-column: 1 / -1; grid-row: 1; margin-bottom: 14px; }
.hedona-product .elementor-widget-woocommerce-product-images { grid-column: 1; grid-row: 2 / span 8; }
.hedona-product .elementor-widget-woocommerce-product-title { grid-column: 2; grid-row: 2; }
.hedona-product .elementor-widget-woocommerce-product-price { grid-column: 2; grid-row: 3; }
.hedona-product .elementor-widget-woocommerce-product-content { grid-column: 2; grid-row: 4; }
.hedona-product .elementor-widget-woocommerce-notices { grid-column: 2; grid-row: 5; }
.hedona-product .elementor-widget-woocommerce-product-add-to-cart { grid-column: 2; grid-row: 6; }
.hedona-product .elementor-widget-woocommerce-product-meta { grid-column: 2; grid-row: 7; }

/* breadcrumbs na svetloj podlozi */
.hedona-product .hedona-crumbs a { color: var(--hd-muted); text-decoration: none; }
.hedona-product .hedona-crumbs a:hover { color: var(--hd-gold-deep); text-decoration: underline; }
.hedona-product .hedona-crumbs span[aria-current] { color: var(--hd-espresso); font-weight: 600; }
.hedona-product .hedona-crumbs li + li::before { color: #B6AC96; }

/* galerija */
.hedona-product .elementor-widget-woocommerce-product-images {
  position: sticky;
  top: 96px;
  align-self: start;
}
.hedona-product .woocommerce-product-gallery {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-r-md);
  padding: 16px;
}
.hedona-product .woocommerce-product-gallery__wrapper { border: 0 !important; margin: 0; }
.hedona-product .woocommerce-product-gallery__image img {
  border-radius: var(--hd-r-sm);
  background: var(--hd-shell);
  aspect-ratio: 4 / 3;
  object-fit: contain;
  width: 100%;
  height: auto;
}
.hedona-product .flex-control-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
.hedona-product .flex-control-thumbs li { width: 68px; padding: 0 !important; margin: 0; }
.hedona-product .flex-control-thumbs img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  background: var(--hd-shell);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-r-sm);
  opacity: 0.75;
  cursor: pointer;
}
.hedona-product .flex-control-thumbs img.flex-active,
.hedona-product .flex-control-thumbs img:hover { opacity: 1; border-color: var(--hd-gold-deep); }
.hedona-product .woocommerce-product-gallery__trigger { z-index: 3; }

/* kupovni blok */
.hedona-buy__brand {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border: 1px solid rgba(138, 109, 36, 0.4);
  border-radius: var(--hd-r-pill);
  font: 700 10.5px/1.4 var(--hd-sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hd-gold-deep);
  background: rgba(201, 165, 74, 0.1);
}

.hedona-product .product_title {
  font-family: var(--hd-serif);
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--hd-espresso);
  margin: 0 0 10px;
  text-transform: none;
  letter-spacing: 0;
  text-wrap: balance;
}

.hedona-product .elementor-widget-woocommerce-product-price .price,
.hedona-product .elementor-widget-woocommerce-product-price p.price {
  font-family: var(--hd-sans);
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--hd-gold-deep);
  margin: 0 0 14px;
  line-height: 1.2;
}
.hedona-product .elementor-widget-woocommerce-product-price del { color: #8B7D63; font-size: 20px; font-weight: 400; margin-right: 8px; }
.hedona-product .elementor-widget-woocommerce-product-price ins { color: var(--hd-wine); text-decoration: none; }

.hedona-buy__excerpt {
  color: #4A4132;
  font-size: 15.5px;
  line-height: 1.65;
  margin-bottom: 16px;
  max-width: 56ch;
}
.hedona-buy__excerpt p { margin: 0 0 8px; }

.hedona-buy__stock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}
.hedona-buy__dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }
.hedona-buy__stock.is-in { color: #1F6B3B; }
.hedona-buy__stock.is-in .hedona-buy__dot { background: #1F6B3B; }
.hedona-buy__stock.is-out { color: var(--hd-wine); }
.hedona-buy__stock.is-out .hedona-buy__dot { background: var(--hd-wine); }

.hedona-product .elementor-add-to-cart form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin: 0;
}
.hedona-product .elementor-add-to-cart form.cart .quantity { margin: 0; flex: 0 0 108px; }
.hedona-product .elementor-add-to-cart form.cart .quantity .qty {
  width: 100%;
  height: 54px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-r-sm);
  background: #FFFFFF;
  font: 600 16px/1 var(--hd-sans);
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--hd-espresso);
}
.hedona-product .elementor-add-to-cart form.cart button.single_add_to_cart_button {
  flex: 1 1 200px;
  min-height: 54px;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--hd-r-sm);
  background: var(--hd-espresso);
  color: var(--hd-cream);
  font: 600 16px/1.2 var(--hd-sans);
  letter-spacing: 0.02em;
  text-transform: none;
  box-shadow: none;
  transition: background-color 0.18s ease;
}
.hedona-product .elementor-add-to-cart form.cart button.single_add_to_cart_button:hover { background: var(--hd-gold-deep); color: #FDF7E8; }

.hedona-ptrust {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--hd-line);
}
.hedona-ptrust__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--hd-muted);
}
.hedona-ptrust__item .hedona-icon { color: var(--hd-gold-deep); }

.hedona-buy__age {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--hd-wine);
}

.hedona-buy__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--hd-muted);
}
.hedona-buy__meta b { font-weight: 600; color: var(--hd-espresso); }
.hedona-buy__meta a { color: var(--hd-gold-deep); text-decoration: none; }
.hedona-buy__meta a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   10. Tabovi
   -------------------------------------------------------------------------- */
.hedona-tabs {
  background: var(--hd-card);
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-r-md);
  padding: 0 28px 26px;
  margin: 0 0 40px;
}
.hedona-tabs .woocommerce-tabs { padding: 0; }
.hedona-tabs ul.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0 -28px 22px;
  padding: 0 28px;
  border-bottom: 1px solid var(--hd-line);
}
.hedona-tabs ul.tabs::before,
.hedona-tabs ul.tabs::after { display: none !important; }
.hedona-tabs ul.tabs li {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.hedona-tabs ul.tabs li::before,
.hedona-tabs ul.tabs li::after { display: none !important; }
.hedona-tabs ul.tabs li a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 4px;
  margin-right: 22px;
  border-bottom: 2px solid transparent;
  font: 600 14.5px/1.2 var(--hd-sans);
  letter-spacing: 0.03em;
  color: var(--hd-muted);
  text-decoration: none;
  text-transform: none;
}
.hedona-tabs ul.tabs li a:hover { color: var(--hd-espresso); }
.hedona-tabs ul.tabs li.active a { color: var(--hd-espresso); border-bottom-color: var(--hd-gold); }

.hedona-tabs .woocommerce-Tabs-panel { font-size: 15.5px; line-height: 1.7; color: #4A4132; }
.hedona-tabs .woocommerce-Tabs-panel > h2:first-child { display: none; }
.hedona-tabs .woocommerce-Tabs-panel p { margin: 0 0 12px; max-width: 78ch; }
.hedona-tabs .woocommerce-Tabs-panel h3 {
  font-family: var(--hd-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--hd-espresso);
  margin: 22px 0 8px;
}
.hedona-tabs .woocommerce-Tabs-panel h3:first-child { margin-top: 0; }

/* bez JS-a svi paneli ostaju vidljivi — razdvajamo ih linijom */
.hedona-tabs .woocommerce-Tabs-panel + .woocommerce-Tabs-panel {
  border-top: 1px solid var(--hd-line);
  margin-top: 22px;
  padding-top: 22px;
}

.hedona-specs { width: 100%; border-collapse: collapse; margin: 0; font-size: 14.5px; }
.hedona-specs th,
.hedona-specs td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--hd-line); vertical-align: top; }
.hedona-specs th { width: 34%; font-weight: 600; color: var(--hd-espresso); background: var(--hd-shell); }
.hedona-specs td { color: #4A4132; font-variant-numeric: tabular-nums; }
.hedona-specs tr:last-child th,
.hedona-specs tr:last-child td { border-bottom: 0; }
.hedona-specs a { color: var(--hd-gold-deep); }

.hedona-ship { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 40px; }
.hedona-ship h3:first-child { margin-top: 0; }

.hedona-tabs #reviews .comment-reply-title { font-weight: 600; color: var(--hd-espresso); }
.hedona-tabs #reviews .woocommerce-noreviews { color: var(--hd-muted); }
.hedona-tabs #reviews input[type="text"],
.hedona-tabs #reviews input[type="email"],
.hedona-tabs #reviews textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--hd-line);
  border-radius: var(--hd-r-sm);
  background: #FFFFFF;
  font: 15px/1.5 var(--hd-sans);
}
.hedona-tabs #reviews .submit {
  min-height: 44px;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--hd-r-sm);
  background: var(--hd-espresso);
  color: var(--hd-cream);
  font: 600 14px/1.2 var(--hd-sans);
  cursor: pointer;
}
.hedona-tabs #reviews .stars a { color: var(--hd-gold); }

/* --------------------------------------------------------------------------
   11. Povezani proizvodi
   -------------------------------------------------------------------------- */
.hedona-related section.related { margin: 0; }
.hedona-related section.related > h2 {
  font-family: var(--hd-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--hd-espresso);
  margin: 0 0 18px;
  text-align: left;
  text-transform: none;
}

/* --------------------------------------------------------------------------
   12. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hedona-shop {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }
  /* `.hedona-shop > *` je (0,1,0) i GUBI od osnovnih pravila tipa
     `.hedona-shop .hedona-toolbar { grid-column: 2 }` (0,2,0). Zbog toga su
     elementi ostajali u drugoj koloni, browser je pravio implicitnu kolonu, a
     eksplicitna se skupljala na 0px — zaglavlje kategorije je na telefonu
     izgledalo kao uska traka. Zato nabrajamo elemente istom specifičnošću. */
  .hedona-shop .hedona-arch,
  .hedona-shop .woocommerce-notices-wrapper,
  .hedona-shop .hedona-filters,
  .hedona-shop .hedona-toolbar,
  .hedona-shop ul.products,
  .hedona-shop .hedona-empty,
  .hedona-shop nav.woocommerce-pagination,
  .hedona-shop .hedona-filters__backdrop,
  .hedona-shop > * {
    grid-column: 1 !important;
    grid-row: auto;
  }
  .hedona-filters { position: static; margin-bottom: 20px; }

  .hedona-shop-archive ul.products.hedona-pgrid,
  .hedona-product ul.products.hedona-pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .hedona-product .elementor-location-single > .e-con:first-of-type > .e-con-inner {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 22px;
  }
  .hedona-product .elementor-location-single > .e-con:first-of-type > .e-con-inner > .e-con { display: contents; }
  .hedona-product .elementor-widget-woocommerce-breadcrumb,
  .hedona-product .elementor-widget-woocommerce-product-images,
  .hedona-product .elementor-widget-woocommerce-product-title,
  .hedona-product .elementor-widget-woocommerce-product-price,
  .hedona-product .elementor-widget-woocommerce-product-content,
  .hedona-product .elementor-widget-woocommerce-notices,
  .hedona-product .elementor-widget-woocommerce-product-add-to-cart,
  .hedona-product .elementor-widget-woocommerce-product-meta { grid-column: 1; grid-row: auto; }
  .hedona-product .woocommerce-product-gallery { position: static; }
  .hedona-product .elementor-widget-woocommerce-product-images { margin-bottom: 4px; }

  .hedona-ship { grid-template-columns: minmax(0, 1fr); }
}

/* Drawer sa filterima — samo kada JS radi. Bez JS-a filteri ostaju obična
   sekcija iznad grida, pa je prodavnica upotrebljiva i bez JavaScript-a. */
@media (max-width: 1024px) {
  .hedona-shop-js .hedona-toolbar__filters { display: inline-flex; }

  .hedona-shop-js .hedona-filters {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100000;
    width: min(340px, 88vw);
    margin: 0;
    transform: translateX(-102%);
    transition: transform 0.24s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--hd-card);
  }
  .hedona-shop-js .hedona-filters__panel { border: 0; border-radius: 0; min-height: 100%; padding-bottom: 40px; }
  .hedona-shop-js .hedona-filters__close { display: inline-flex; align-items: center; justify-content: center; }
  .hedona-shop-js .hedona-filters.is-open { transform: translateX(0); box-shadow: 0 0 60px rgba(15, 13, 10, 0.35); }

  .hedona-shop-js .hedona-filters__backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 13, 10, 0.55);
    border: 0;
  }
  html.hedona-filters-open { overflow: hidden; }
}

@media (max-width: 782px) {
  .hedona-arch { padding: 20px 18px 22px; }
  .hedona-toolbar { gap: 10px; }
  .hedona-toolbar__count { flex-basis: 100%; order: 3; }
  .hedona-toolbar__right { margin-left: auto; }
  .hedona-shop .hedona-sort select.orderby { max-width: 190px; }
  .hedona-view { display: none; }
  .hedona-ptrust { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hedona-ptrust__item { flex-direction: row; align-items: center; gap: 10px; font-size: 13px; }
  .hedona-tabs { padding: 0 18px 20px; }
  .hedona-tabs ul.tabs { margin-inline: -18px; padding-inline: 18px; overflow-x: auto; flex-wrap: nowrap; }
  .hedona-tabs ul.tabs li a { white-space: nowrap; margin-right: 16px; }
}

@media (max-width: 600px) {
  .hedona-shop-archive ul.products.hedona-pgrid,
  .hedona-product ul.products.hedona-pgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px !important;
  }
  .hedona-pcard__body { padding: 12px 12px 0; }
  .hedona-pcard__title { font-size: 14px; }
  .hedona-pcard__price { font-size: 15.5px; }
  .hedona-shop-archive .hedona-pcard__cta { padding: 10px 12px; font-size: 13px; }
  .hedona-shop.is-list .hedona-pcard__cta { min-width: 0; width: 100%; }
  .hedona-arch__title { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  .hedona-shop-archive *,
  .hedona-product * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .hedona-shop-archive ul.products.hedona-pgrid li.product:hover,
  .hedona-product ul.products.hedona-pgrid li.product:hover { transform: none; }
}

@media (prefers-contrast: more) {
  .hedona-shop-archive,
  .hedona-product { --hd-muted: #4A4132; --hd-line: #C9BB9C; }
}

/* == C15: ikonice prekidača mreža/lista ==================================
   Tema ne stilizuje .screen-reader-text u našem toolbaru, pa tekst zauzme
   ceo 44px flex prostor i SVG se stisne na width:0 (izmereno CDP-om).
   Tekst čitača ide u standardni vizuelni klip, ikonica ne sme da se skuplja. */
.hedona-view__btn { position: relative; }
.hedona-view__btn .screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.hedona-view__btn .hedona-icon { flex: none; }

/* == C16: strelica paginacije preko teksta ================================
   Selektor `ul li span` hvata i <span> SA STRELICOM unutar linka
   „Sledeća →" i pretvara ga u belu pilulu preko teksta. Unutrašnji span
   je čist tekst, bez kutije. */
.hedona-shop nav.woocommerce-pagination ul li a span {
  background: transparent; border: 0; box-shadow: none;
  min-width: 0; min-height: 0; padding: 0; margin: 0;
  display: inline; line-height: inherit;
}
/* Prev/Sledeća — ista bela pilula kao brojevi (Woo default davao sivu). */
.hedona-shop nav.woocommerce-pagination ul li a.prev,
.hedona-shop nav.woocommerce-pagination ul li a.next { background: var(--hd-card); }
