/*
 * NoGray's — Redesign Override CSS
 *
 * All original styles load from the live site (nograys.cz).
 * Add your layout changes here. They will override the remote styles.
 */

/* Prevent horizontal overflow from edge-to-edge elements (e.g. mobile gallery) */
html, body {
  overflow-x: clip;
}

/* h3.secondary line-height fix */
h3.secondary {
  line-height: var(--line-height-33);
}

/* Accordion text: ensure 16px in product info */
.accordion-content-inner,
.accordion-content-inner p {
  font-size: var(--font-size-16);
  line-height: var(--line-height-25);
}

/* Shipping info: visual separation from add-to-cart */
.shipping-info {
  padding-top: var(--spacing-30);
  border-top: 1px solid var(--white-color-light);
}

/* Before/after blocks: 50% width only inside .major-results-images (homepage, two blocks side by side) */
.major-results-images .major-results-block {
  width: 50%;
}

.major-results-section .major-results-images .twentytwenty-wrapper {
  width: auto;
  height: auto;
}

@media (max-width: 640px) {
  .major-results-images .major-results-block {
    width: 100%;
  }
}

/* Testimonial styling */
.major-results-testimonial {
  margin: 0;
  padding: var(--spacing-30) 0 0;
  border: none;
  max-width: 520px;
}

.major-results-testimonial p {
  margin: 0 0 6px;
  font-size: var(--font-size-16, 16px);
  line-height: 1.55;
  opacity: 0.85;
  font-style: italic;
}

.major-results-testimonial footer {
  font-size: var(--font-size-14, 14px);
  opacity: 0.55;
  font-style: normal;
}

/* Header: raise mobile menu breakpoint from 840px to 950px (extra nav item "Návod") */
@media (max-width: 950px) {
  .header__menu-list,
  .header__basket-link--hide-mobile {
    display: none;
  }
  .header__mobile-menu-button {
    display: block;
  }
  .header__mobile-menu {
    display: block;
  }
  .header__nav {
    flex: 0;
  }
}

/* Product layout: gap between gallery and info */
.product .product-layout {
  gap: var(--spacing-80);
}

/* Skrýt volbu varianty (zůstává v DOM kvůli WooCommerce formuláři) */
.product .product-layout .product-info .add-to-cart-section .variations .variation-row .variation-selection {
  display: none !important;
}

/* Product gallery: compact layout with square main image + small thumbnail row */
.product .product-layout .product-gallery .main-image {
  height: auto !important;
  max-width: 588px;
  aspect-ratio: 1 / 1;
  margin-bottom: var(--spacing-20);
}

.product .product-layout .product-gallery .main-image img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
}

.product .product-layout .product-gallery .gallery-thumbs {
  display: flex !important;
  gap: 10px;
  flex-wrap: wrap;
}

.product .product-layout .product-gallery .gallery-thumbs .thumb {
  width: 80px !important;
  height: 80px !important;
  max-width: 80px !important;
  margin-bottom: 0 !important;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  border-radius: 15px !important;
  overflow: hidden !important;
}

.product .product-layout .product-gallery .gallery-thumbs .thumb img {
  border-radius: 15px !important;
}

.product .product-layout .product-gallery .gallery-thumbs .thumb.active,
.product .product-layout .product-gallery .gallery-thumbs .thumb:hover {
  opacity: 1;
}

.product .product-layout .product-gallery .gallery-thumbs .thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

/* Gallery is now compact enough for sticky */
.product .product-layout .product-gallery {
  position: sticky;
  top: 140px;
  height: fit-content;
  align-self: flex-start;
  padding-bottom: 40px;
}

.product .product-layout .product-info {
  position: static;
}

@media (max-width: 768px) {
  .product .product-layout .product-gallery {
    position: static;
  }
}

/* Product cards section (homepage — "Naše produkty" redesign) */
.product-cards {
  display: flex;
  gap: 40px;
}

.product-card {
  display: flex;
  gap: 30px;
  flex: 1;
  align-items: center;
}

.product-card__image {
  flex: 0 0 40%;
  min-height: 420px;
  border-radius: 15px;
  overflow: hidden;
  padding: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card:first-child .product-card__image {
  background-color: #c6d4dc;
}

.product-card:last-child .product-card__image {
  background-color: #d4cdc6;
}

.product-card__image img {
  width: auto;
  height: 100%;
  max-height: 360px;
  object-fit: contain;
}

.product-card__content {
  flex: 0 0 60%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-top: 10px;
}

.product-card__content h3 {
  margin-bottom: 0;
}

.product-card__content p {
  opacity: 0.7;
}

.product-card__content .button {
  align-self: flex-start;
  padding: 12px 30px;
  font-size: inherit;
}

@media (max-width: 1520px) {
  .product-card__image {
    min-height: 320px;
    padding: 20px;
  }
}

@media (max-width: 1280px) {
  .product-cards {
    flex-direction: column;
    gap: 40px;
  }
}

@media (max-width: 640px) {
  .product-card {
    flex-direction: column;
  }

  .product-card__image {
    width: 100%;
    min-height: 300px;
  }

  .product-card__image img {
    max-height: 260px;
  }
}

@media (max-width: 480px) {
  .product-card__image {
    min-height: 250px;
  }

  .product-card__image img {
    max-height: 210px;
  }
}

/* Product cards: limit content width on smaller screens */
@media (max-width: 1280px) {
  .product-card__content {
    max-width: 450px;
  }
}

@media (max-width: 640px) {
  .product-card {
    align-items: flex-start;
    padding-top: 0;
  }
  .product-cards {
    gap: 60px;
  }
}

/* Responsive h2 — fix missing scaling in remote theme CSS
   Desktop 45px is already correct; override only smaller breakpoints */
@media (max-width: 1440px) {
  h2:not(.secondary):not(.wp-block-heading):not(.h1) {
    font-size: var(--font-size-32);
    line-height: 42px;
  }
}

/* ============================
   Shop / Produkty page
   ============================ */

/* Hide default WooCommerce elements */
.post-type-archive-product .woocommerce-result-count,
.post-type-archive-product .woocommerce-ordering,
.post-type-archive-product .woocommerce-breadcrumb {
  display: none;
}

/* Force DM Sans on headings inside shop layout */
.shop-layout h3,
.shop-layout h4 {
  font-family: var(--font-secondary, "DM Sans", sans-serif);
}

/* Shop header */
.shop-header {
  padding-bottom: 0;
}

.shop-header h1 {
  margin-bottom: 44px;
}


/* Two-column layout: sidebar + main */
.shop-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 50px;
  padding-bottom: var(--spacing-80, 80px);
}

/* Tablet: sidebar narrows */
@media (max-width: 1100px) {
  .shop-layout {
    grid-template-columns: 280px 1fr;
    gap: 40px;
  }
}

/* Below 860px: sidebar moves above grid */
@media (max-width: 860px) {
  .shop-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ---- Sidebar ---- */
.shop-sidebar {
  padding-top: 0;
}

.shop-sidebar__section {
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-sidebar__heading {
  font-size: var(--font-size-22, 22px);
  font-weight: 500;
  margin: 20px 0;
}

.shop-sidebar__subheading {
  font-size: var(--font-size-16, 16px);
  font-weight: 600;
  margin-bottom: 10px;
}

/* Custom checkboxes */
.shop-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--font-size-16, 16px);
  cursor: pointer;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.15s;
}

.shop-checkbox:hover {
  color: #fff;
}

.shop-checkbox__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.shop-checkbox__mark {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s;
}

.shop-checkbox:hover .shop-checkbox__mark {
  border-color: rgba(255, 255, 255, 0.5);
}

.shop-checkbox__input:checked + .shop-checkbox__mark {
  background: #fff;
  border-color: #fff;
}

.shop-checkbox__input:checked + .shop-checkbox__mark::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 6px;
  height: 9px;
  border: solid #1a1a1a;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---- Help card (sidebar) ---- */
.shop-help {
  background: #2a2520;
  border-radius: 12px;
  padding: 28px;
}

.shop-help__label {
  display: block;
  font-size: var(--font-size-14, 14px);
  color: #c9a84c;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: 0.03em;
}

.shop-help__title {
  font-size: var(--font-size-22, 22px);
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 16px;
}

.shop-help__person {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.shop-help__photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.shop-help__name {
  display: block;
  font-size: var(--font-size-16, 16px);
  font-weight: 500;
}

.shop-help__role {
  display: block;
  font-size: var(--font-size-14, 14px);
  opacity: 0.5;
}

.shop-help__contacts {
  display: flex;
  flex-direction: column;
}

.shop-help__contact {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--font-size-16, 16px);
  color: #fff;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.shop-help__contact:hover {
  opacity: 1;
}

.shop-help__contact svg {
  flex-shrink: 0;
  opacity: 0.5;
}

/* ---- Main content area ---- */
.shop-main {
  min-width: 0;
}

/* Filter group with top border */
.shop-sidebar__group {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  margin-bottom: 0;
}

/* Sort block inside sidebar — divider above */
.shop-sortbar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  margin-top: 20px;
}

.shop-sortbar .shop-sort {
  width: 100%;
}


/* Sort dropdown */
.shop-sort {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  font-size: var(--font-size-16, 16px);
  font-family: inherit;
  padding: 10px 38px 10px 16px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.2s;
}

.shop-sort:hover,
.shop-sort:focus {
  border-color: rgba(255, 255, 255, 0.35);
  outline: none;
}

.shop-sort option {
  background: #1a1a1a;
  color: #fff;
}

/* Product grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 20px;
}

/* Sidebar present: 2 columns once sidebar takes space */
@media (max-width: 1100px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .shop-grid {
    gap: 24px 16px;
  }
}

@media (max-width: 600px) {
  .shop-grid {
    gap: 20px 12px;
  }
}

/* Product card */
.shop-product {
  display: flex;
  flex-direction: column;
}

.shop-product__link,
.shop-product__link:hover {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.shop-product__link:hover .shop-product__image img {
  transform: scale(1.04);
}

/* Product image */
.shop-product__image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  margin-bottom: 16px;
}

.shop-product__image--muzi {
  background-color: #c6d4dc;
}

.shop-product__image--zeny {
  background-color: #d4cdc6;
}

.shop-product__image img {
  width: auto;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}


/* Product info */
.shop-product__info {
  padding: 0 4px;
}

.shop-product__category {
  display: block;
  font-size: var(--font-size-14, 14px);
  opacity: 0.45;
  margin-bottom: 6px;
}

.shop-product__title {
  font-size: var(--font-size-20, 20px);
  font-weight: 500;
  line-height: 1.3;
}

.shop-product__variant {
  font-size: var(--font-size-16, 16px);
  opacity: 0.5;
  margin-bottom: 6px;
}

.shop-product__price {
  font-size: var(--font-size-22, 22px);
  font-weight: 600;
  margin-bottom: 0;
}

.shop-product__price-original {
  font-size: var(--font-size-16, 16px);
  opacity: 0.35;
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 8px;
}

/* ---- Mobile toolbar (hidden on desktop) ---- */
.shop-mobile-toolbar {
  display: none;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  /* Show mobile toolbar */
  .shop-mobile-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 20px;
  }

  .shop-sort--mobile {
    flex: 1;
    max-width: 240px;
  }

  /* Filter toggle button */
  .shop-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: var(--font-size-16, 16px);
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.2s;
  }

  .shop-filter-toggle:hover,
  .shop-filter-toggle[aria-expanded="true"] {
    border-color: rgba(255, 255, 255, 0.4);
  }

  /* Sidebar: hidden by default, shown when open */
  .shop-sidebar {
    display: none;
  }

  .shop-sidebar.shop-sidebar--open {
    display: block;
    padding-bottom: 8px;
  }

  /* Help card: hidden on mobile */
  .shop-help {
    display: none;
  }

  /* Sort in sidebar hidden on mobile (moved to toolbar) */
  .shop-sortbar {
    display: none;
  }

  .shop-sidebar__heading {
    display: none;
  }

  .shop-sidebar__section {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 24px;
    margin-bottom: 0;
  }
}

/* ≤600px: sidebar + product card scale */
@media (max-width: 600px) {
  .shop-sidebar__heading {
    font-size: var(--font-size-20, 20px);
    margin: 16px 0;
  }

  .shop-product__title {
    font-size: var(--font-size-16, 16px);
    margin-bottom: 2px;
  }

  .shop-product__variant {
    font-size: var(--font-size-14, 14px);
    margin-bottom: 6px;
  }

  .shop-product__price {
    font-size: var(--font-size-18, 18px);
  }

  .shop-product__price-original {
    font-size: var(--font-size-14, 14px);
    margin-left: 4px;
  }

  .shop-product__image {
    padding: 16px;
    margin-bottom: 10px;
    border-radius: 10px;
  }

  .shop-product__category {
    font-size: 12px;
    margin-bottom: 3px;
  }

  .shop-product__info {
    padding: 0 2px;
  }
}

/* Override theme's button { width: 100% } at ≤480px */
.shop-filter-toggle {
  width: auto;
}

@media (max-width: 480px) {
  .shop-filter-toggle {
    flex-shrink: 0;
    width: auto !important;
  }

  .shop-sort--mobile {
    flex: 1;
    max-width: none;
    min-width: 0;
  }
}
