/* Single-product page - Prostor.dc.html. Restyles the CF7 inquiry form to use
   the design system's .field/.input/.btn look instead of CF7's defaults. */

.single-product .wpcf7-form p { margin: 0 0 14px; }
.single-product .wpcf7-form label { display: block; font-size: 12px; margin-bottom: 5px; color: color-mix(in srgb, var(--color-text) 70%, transparent); }
.single-product .wpcf7-form input[type=text],
.single-product .wpcf7-form input[type=email],
.single-product .wpcf7-form input[type=tel],
.single-product .wpcf7-form input[type=number],
.single-product .wpcf7-form input[type=date],
.single-product .wpcf7-form textarea {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit; font-size: 14px;
  color: var(--color-text); background: #fff; border: 1px solid var(--color-divider); border-radius: 0;
  box-sizing: border-box;
}
.single-product .wpcf7-form textarea { min-height: 70px; resize: vertical; }
.single-product .wpcf7-form input[type=submit] {
  width: 100%; margin-top: 6px; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 800; font-size: 14px;
  background: var(--color-accent); color: var(--color-bg); border: 0; border-radius: 0;
  padding: 12px; cursor: pointer;
}
.single-product .wpcf7-form input[type=submit]:hover { background: var(--color-accent-600); }
.single-product .wpcf7-form .wpcf7-not-valid-tip { font-size: 12px; color: var(--color-accent-700); margin-top: 4px; }
.single-product .wpcf7-response-output { font-size: 13px; border-radius: 0 !important; margin: 14px 0 0 !important; }

.single-product .comment-form p { margin: 0 0 14px; }
.single-product .comment-form label { display: block; font-size: 12px; margin-bottom: 5px; }
.single-product .comment-form input[type=text],
.single-product .comment-form input[type=email],
.single-product .comment-form textarea {
  width: 100%; padding: 6px 10px; font: inherit; font-size: 14px; background: #fff;
  border: 1px solid var(--color-divider); box-sizing: border-box;
}

/* - gallery hover zoom - */
.gs-gallery-thumb:hover img { transform: scale(1.06); }
.gs-gallery-thumb:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* - full-screen lightbox - */
.gs-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: color-mix(in srgb, #1a1013 94%, transparent);
  display: flex; flex-direction: column; color: var(--color-bg);
}
.gs-lightbox[hidden] { display: none; }
.gs-lightbox-top { display: flex; justify-content: space-between; align-items: center; padding: 20px 32px; }
.gs-lightbox-title { font-weight: 800; font-size: 17px; }
.gs-lightbox-close { all: unset; cursor: pointer; font-weight: 800; font-size: 15px; color: var(--color-bg); }
.gs-lightbox-main { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 20px; padding: 0 24px; }
.gs-lightbox-main img { max-width: min(1100px, calc(100vw - 200px)); max-height: calc(100vh - 220px); object-fit: contain; display: block; }
.gs-lightbox-arrow {
  all: unset; cursor: pointer; width: 52px; height: 52px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid color-mix(in srgb, var(--color-bg) 50%, transparent); font-size: 22px; color: var(--color-bg);
}
.gs-lightbox-arrow:hover { background: var(--color-accent); border-color: var(--color-accent); }
.gs-lightbox-thumbs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 20px 24px 28px; }
.gs-lightbox-thumbs button {
  all: unset; cursor: pointer; width: 84px; height: 63px; flex: none;
  background-size: cover; background-position: center; opacity: 0.55; outline-offset: 2px;
}
.gs-lightbox-thumbs button.is-active { opacity: 1; outline: 2px solid var(--color-accent-2); }
@media (max-width: 600px) {
  .gs-lightbox-main img { max-width: calc(100vw - 32px); max-height: calc(100vh - 260px); }
  .gs-lightbox-arrow { width: 40px; height: 40px; }
}

/* - availability calendar popover - */
.gs-cal-pop {
  position: absolute; z-index: 50; margin-top: 4px; background: #fff;
  border: 2px solid var(--color-divider); box-shadow: var(--shadow-lg); padding: 14px; width: 280px;
}
.gs-cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 800; font-size: 14px; }
.gs-cal-head button { all: unset; cursor: pointer; padding: 4px 8px; }
.gs-cal-head button:disabled { opacity: 0.3; cursor: not-allowed; }
.gs-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.gs-cal-dow { font-size: 11px; text-align: center; color: color-mix(in srgb, var(--color-text) 60%, transparent); padding-bottom: 4px; }
.gs-cal-day { all: unset; text-align: center; font-size: 13px; padding: 6px 0; cursor: pointer; box-sizing: border-box; }
.gs-cal-day:hover:not(:disabled) { background: var(--color-surface); }
.gs-cal-day:disabled { color: color-mix(in srgb, var(--color-text) 30%, transparent); cursor: not-allowed; text-decoration: line-through; }
.gs-cal-day.is-selected { background: var(--color-accent); color: #fff; }

@media (max-width: 900px) {
  /* These were originally scoped with a ">" direct-child chain
     (.single-product > .gs-container > div[...]) on the assumption that the
     product markup sits right under the outer .gs-container from header.php.
     In reality WooCommerce's own template wrapper (#primary > #main) nests a
     SECOND .gs-container several levels deeper, so that direct-child chain
     never matched anything - these rules were silently dead. Using a plain
     descendant selector instead so they actually apply regardless of depth. */
  .single-product div[style*="grid-template-columns: minmax(0, 2fr)"] { grid-template-columns: 1fr !important; grid-template-rows: none !important; }
  .single-product div[style*="repeat(4, minmax(0, 1fr))"] { grid-template-columns: 1fr 1fr !important; }
  .single-product div[style*="minmax(0, 1fr) minmax(300px, 380px)"] { grid-template-columns: 1fr !important; }
  .single-product aside[style*="sticky"] { position: static !important; }
  /* "O prostoru / Detalji / Utisci" label+content rows (narrow label column
     + content column) - same hidden-content bug as the homepage FAQ: the
     content column has too little width left after the label column and
     gets squeezed off-screen. Stack label above content on mobile. */
  .single-product div[style*="minmax(96px, 160px) minmax(0, 1fr)"] { grid-template-columns: 1fr !important; gap: 8px !important; }
}
@media (max-width: 480px) {
  .single-product div[style*="repeat(2, minmax(0, 1fr))"] { grid-template-columns: 1fr !important; }
}
