/* WooCommerce-like category grid (3 columns, title under image) */
ul.products {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem 1.5rem;
}

ul.products li.product {
  margin: 0;
  text-align: center;
}

ul.products li.product a {
  display: block;
  color: inherit;
}

ul.products li.product img,
ul.products li.product .ph {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #eee;
  display: block;
}

ul.products li.product .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(145deg, #3a3a3a, #6b5a3a);
  color: #fff;
  font-weight: 700;
}

ul.products .woocommerce-loop-product__title {
  margin: 0.85rem 0 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-ink);
}

.product-card-price,
.product-price {
  margin: 0.45rem 0 0;
  color: var(--color-accent-dark);
  font-weight: 700;
  font-size: 1.02rem;
}

.product-card .product-card-price {
  display: block;
  text-align: center;
  padding: 0 0.5rem 0.75rem;
}

.product-detail-body > .product-price {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 0 0 1.15rem;
  padding: 0.9rem 1.05rem;
  background: #fff7e4;
  border: 2px solid var(--color-accent);
  border-radius: 10px;
}

.product-price-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.product-detail-body .product-price-value,
.product-detail-body .product-price strong {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: #9a1b12;
  letter-spacing: -0.02em;
}

table.shop_attributes tr.is-price th,
table.shop_attributes tr.is-price td {
  background: #fff7e4;
  font-size: 1.08rem;
}

table.shop_attributes tr.is-price td {
  font-weight: 800;
  color: #9a1b12;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.product-offices {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line, #e6e1d6);
  background: #fbfaf6;
  border-radius: 8px;
}

.product-offices li {
  margin: 0;
  padding: 0.2rem 0;
  line-height: 1.5;
}

.product-offices strong {
  display: inline-block;
  min-width: 4.8rem;
}

ul.products li.product a:hover .woocommerce-loop-product__title {
  color: var(--color-accent-dark);
}

@media (max-width: 900px) {
  ul.products {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  ul.products {
    grid-template-columns: 1fr;
  }
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  align-items: start;
}

.product-detail-media img,
.product-detail-media .ph {
  width: 100%;
  min-height: 280px;
  object-fit: cover;
  background: #eee;
}

.product-detail-media .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #3a3a3a, #6b5a3a);
  color: #fff;
  font-weight: 700;
  padding: 1rem;
}

.product-content img {
  max-width: 100%;
  height: auto;
  margin: 0.75rem 0;
}

.product-content table,
table.shop_attributes {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.product-content th,
table.shop_attributes th {
  width: 42%;
  background: #f7f7f7;
  text-align: left;
  font-weight: 600;
  color: var(--color-ink);
}

.product-content td,
.product-content th,
table.shop_attributes td,
table.shop_attributes th {
  border: 1px solid var(--color-border);
  padding: 0.55rem 0.75rem;
}

.product-content a {
  color: var(--color-accent-dark);
}

.product-grid .product-card img {
  height: 220px;
  width: 100%;
  object-fit: cover;
}

@media (max-width: 900px) {
  .product-detail {
    grid-template-columns: 1fr;
  }
}

.catalog-main .product-detail {
  grid-template-columns: 1fr 1.1fr;
}

@media (max-width: 900px) {
  .catalog-main .product-detail {
    grid-template-columns: 1fr;
  }
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.product-gallery-item {
  display: block;
  border: 1px solid var(--color-border, #ddd);
  overflow: hidden;
}

.product-gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.product-stock-video {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #111;
}

body.quote-modal-open {
  overflow: hidden;
}

.quote-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.quote-modal[hidden] {
  display: none;
}

.quote-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 8, 0.55);
}

.quote-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(92vh, 760px);
  overflow: auto;
  background: #fff;
  border: 2px solid var(--color-accent, #c9a227);
  border-radius: 10px;
  padding: 1.35rem 1.4rem 1.2rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.quote-modal__x {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.quote-modal h2 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
}

.quote-modal__hint {
  margin: 0 0 0.7rem;
  color: var(--color-muted, #5c5c5c);
  font-size: 0.92rem;
}

.quote-modal__product {
  margin: 0 0 1rem;
  padding: 0.55rem 0.7rem;
  background: #fff7e4;
  border-radius: 6px;
  font-weight: 700;
  color: var(--color-ink, #1a1a1a);
}

.quote-modal__form {
  margin: 0;
  max-width: none;
}

.quote-modal__form textarea {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--color-border, #e8e8e8);
  background: #fff;
  color: var(--color-ink, #1a1a1a);
  font: inherit;
  resize: vertical;
  min-height: 4.5rem;
}

.quote-modal__form .btn {
  margin-top: 0.25rem;
}

.quote-modal__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.quote-modal__product[hidden] {
  display: none;
}

@media (max-width: 520px) {
  .quote-modal__row {
    grid-template-columns: 1fr;
  }
}
