/* Contact actions share one appearance across the public store. */
a[href^="tel:"],
a[href^="mailto:"],
a[href^="https://wa.me/"],
a[href^="http://wa.me/"],
a[href^="https://api.whatsapp.com/"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  max-width: 100%;
  padding: 11px 16px;
  border: 1px solid rgba(201, 168, 76, 0.7);
  border-radius: 4px;
  background: rgba(201, 168, 76, 0.06);
  color: var(--gold-light);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
  vertical-align: middle;
  transition: color 0.2s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
a[href^="tel:"]::before,
a[href^="mailto:"]::before,
a[href^="https://wa.me/"]::before,
a[href^="http://wa.me/"]::before,
a[href^="https://api.whatsapp.com/"]::before {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: var(--contact-icon) center / contain no-repeat;
  mask: var(--contact-icon) center / contain no-repeat;
}
a[href^="tel:"] {
  --contact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3H4c-.6 0-1 .4-1 1 0 9.4 7.6 17 17 17 .6 0 1-.4 1-1v-3l-5-2-2 2a15 15 0 0 1-7-7l2-2-2-5Z' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'/%3E%3C/svg%3E");
}
a[href^="mailto:"] {
  --contact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' fill='none' stroke='black' stroke-width='1.7'/%3E%3Cpath d='m3 6 9 7 9-7' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'/%3E%3C/svg%3E");
}
a[href^="https://wa.me/"],
a[href^="http://wa.me/"],
a[href^="https://api.whatsapp.com/"] {
  --contact-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 11.5a9 9 0 0 1-13.4 7.9L3 21l1.6-4.6A9 9 0 1 1 21 11.5Z' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'/%3E%3Cpath d='m9 7-1.5 1c0 4 2.5 6.5 6.5 6.5l1-1.5-2-1-1 1c-1.4-.6-2.4-1.6-3-3l1-1-1-2Z' fill='black'/%3E%3C/svg%3E");
}
a[href^="tel:"]:visited,
a[href^="mailto:"]:visited,
a[href^="https://wa.me/"]:visited,
a[href^="http://wa.me/"]:visited,
a[href^="https://api.whatsapp.com/"]:visited { color: var(--gold-light); }
a[href^="tel:"]:hover,
a[href^="mailto:"]:hover,
a[href^="https://wa.me/"]:hover,
a[href^="http://wa.me/"]:hover,
a[href^="https://api.whatsapp.com/"]:hover {
  color: var(--dark);
  border-color: var(--gold-light);
  background-color: var(--gold-light);
}
a[href^="tel:"]:focus-visible,
a[href^="mailto:"]:focus-visible,
a[href^="https://wa.me/"]:focus-visible,
a[href^="http://wa.me/"]:focus-visible,
a[href^="https://api.whatsapp.com/"]:focus-visible {
  outline: 2px solid var(--gold-pale);
  outline-offset: 4px;
}
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.product-actions { gap: 12px; }
.contacts .contact-item { min-width: 0; }
.contacts .social-icons { flex-wrap: wrap; align-items: center; }
.contacts .social-icons a[href^="https://wa.me/"] { width: auto; height: auto; }
.contacts .social-icons a[href^="https://wa.me/"] img { display: none; }

/* Each real card keeps the same width; partial rows are centred without filler cells. */
.catalog-container {
  --catalog-columns: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  background: transparent;
}
.catalog-container .catalog-item {
  flex: 0 0 calc((100% - (var(--catalog-columns) - 1) * 12px) / var(--catalog-columns));
  min-width: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}
.catalog-container .no-products { flex: 1 0 100%; }
.catalog-item img { object-fit: contain; }
.catalog-item:hover img { transform: none; }

/* Category illustrations form balanced rows and retain all original pixels. */
.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.gallery .gallery-item { flex: 0 0 calc((100% - 24px) / 3); min-width: 0; aspect-ratio: 3 / 4; border-radius: 4px; }
.gallery .gallery-item:first-child { aspect-ratio: 3 / 4; grid-row: auto; }
.gallery .gallery-item img { object-fit: contain; }
.gallery .gallery-item:hover img { transform: none; }
.gallery .gallery-overlay { opacity: 1; }

/* Product photographs keep their intrinsic aspect instead of a square white canvas. */
.product-photo { display: flex; justify-content: center; align-items: center; aspect-ratio: auto; width: 100%; background: var(--dark-2); }
.product-photo img { width: auto; height: auto; max-width: 100%; max-height: 760px; object-fit: contain; }
@media (max-width: 1559px) { .catalog-container { --catalog-columns: 4; } }
@media (max-width: 1279px) { .catalog-container { --catalog-columns: 3; } }
@media (max-width: 1000px) { .catalog-container { --catalog-columns: 2; } }
@media (max-width: 900px) { .gallery .gallery-item { flex-basis: calc((100% - 12px) / 2); } }
@media (max-width: 560px) {
  .gallery .gallery-item { flex-basis: 100%; }
  .contacts .contact-list { gap: 28px; }
  .contact-actions, .product-actions { gap: 10px; }
  a[href^="tel:"], a[href^="mailto:"], a[href^="https://wa.me/"], a[href^="http://wa.me/"], a[href^="https://api.whatsapp.com/"] { padding: 11px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  a[href^="tel:"], a[href^="mailto:"], a[href^="https://wa.me/"], a[href^="http://wa.me/"], a[href^="https://api.whatsapp.com/"] { transition: none; }
}

/* The expanded original has its own placeholder until it loads and decodes. */
.modal-close, .modal-counter { z-index: 2002; }
.modal-image-frame { display: flex; align-items: center; justify-content: center; max-width: 90vw; max-height: 88vh; border-radius: var(--radius); }
.modal-image-frame.is-loading, .modal-image-frame.has-image-error { width: min(72vw, 720px); height: min(78vh, 760px); }
.modal-image-frame .modal-content { display: block; width: auto; height: auto; max-width: 90vw; max-height: 88vh; object-fit: contain; }
@media (prefers-reduced-motion: reduce) { .modal, .modal-content { animation: none; } }
