/* ==========================================
   ЮСАЕЛ ЕООД - Продуктов каталог (публична страница)
   Тема: млечни продукти - орнаменти, ленти, кръгли икони.
   Изградено само с CSS/HTML (emoji вместо снимки за икони).
   ========================================== */

:root {
  --color-bg: #F7F5EF;
  --color-surface: #FFFFFF;
  --color-text: #24291F;
  --color-muted: #6E7268;
  --color-green: #157A47;
  --color-green-dark: #0E5C36;
  --color-green-tint: #E9F5EE;
  --color-red: #E2231A;
  --color-red-dark: #A8140D;
  --color-red-tint: #FDEBEA;
  --color-gold: #F5A623;
  --color-gold-dark: #C97F10;
  --color-gold-tint: #FFF3E0;
  --color-viber: #6952E0;
  --radius: 20px;
  --shadow: 0 4px 14px rgba(30, 60, 40, 0.09);
  --shadow-lg: 0 10px 22px rgba(30, 60, 40, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
}

h1, h2 {
  font-family: "Baloo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ---------- Хедър / лого / лозунг ---------- */

.site-header {
  position: relative;
  background-image: url('../img/header-bg.jpg');
  background-size: cover;
  background-position: center;
  text-align: center;
  padding: 34px 16px 28px;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0.45) 45%,
    rgba(255, 255, 255, 0.1) 80%
  );
}

.logo {
  position: relative;
  max-width: 190px;
  width: 100%;
  height: auto;
  z-index: 1;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.25));
}

.tagline {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px auto 0;
  max-width: 480px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--color-green), var(--color-green-dark));
  font-family: "Baloo 2", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  padding: 14px 20px;
  border-radius: 999px;
  border: 2px solid var(--color-gold);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  line-height: 1.5;
}

.tagline-ornament {
  flex-shrink: 0;
  font-size: 1.1rem;
  opacity: 0.85;
}

/* ---------- Триколорна лента-разделител (два отделни бара) ---------- */

.ribbon-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 18px 16px;
}

.ribbon-bar {
  flex: 1;
  max-width: 160px;
  height: 5px;
  border-radius: 999px;
}

.ribbon-bar-green {
  background: linear-gradient(90deg, var(--color-green), var(--color-green-dark));
}

.ribbon-bar-red {
  background: linear-gradient(90deg, var(--color-red-dark), var(--color-red));
}

/* ---------- Общи ---------- */

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4px 16px 30px;
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 4px 0 22px;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

.category-page-title {
  justify-content: flex-start;
}

.ornament-line {
  flex: 1;
  max-width: 60px;
  height: 0;
  border-top: 2px dotted var(--color-gold);
}

.ornament-line-small {
  max-width: 44px;
}

.back-link {
  display: inline-block;
  font-weight: 600;
  color: var(--color-green-dark);
  padding: 10px 4px;
  margin-bottom: 6px;
}

.empty-state {
  color: var(--color-muted);
  text-align: center;
  padding: 40px 16px;
  font-size: 1.05rem;
}

/* ---------- Категории (най-видимият елемент на страницата) ---------- */

.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.category-tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 12px 16px;
  min-height: 96px;
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: var(--shadow);
  border-left: 8px solid var(--color-green);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.category-tile:nth-child(3n+2) {
  border-left-color: var(--color-red);
}

.category-tile:nth-child(3n) {
  border-left-color: var(--color-gold);
}

.category-tile:active,
.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Снимка на категорията - вляво, квадратна със заоблени ъгли */
.category-thumb {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.category-thumb-placeholder {
  background: linear-gradient(135deg, #eef4f0, #e2ece5);
}

.category-tile-name {
  flex: 1;
  min-width: 0;
  color: var(--color-green-dark);
}

.category-tile:nth-child(3n+2) .category-tile-name {
  color: var(--color-red-dark);
}

.category-tile:nth-child(3n) .category-tile-name {
  color: var(--color-gold-dark);
}

/* Кръгла outline стрелка вдясно */
.category-arrow {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--color-green);
  color: var(--color-green-dark);
  font-size: 1.2rem;
  font-weight: 700;
}

.category-tile:nth-child(3n+2) .category-arrow {
  border-color: var(--color-red);
  color: var(--color-red-dark);
}

.category-tile:nth-child(3n) .category-arrow {
  border-color: var(--color-gold-dark);
  color: var(--color-gold-dark);
}

/* ---------- Продукти ---------- */

.product-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.product-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border-top: 5px solid var(--color-green);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:nth-child(3n+2) {
  border-top-color: var(--color-red);
}

.product-card:nth-child(3n) {
  border-top-color: var(--color-gold);
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.product-image-wrap {
  position: relative;
  overflow: hidden;
}

.product-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
  display: block;
  background: var(--color-bg);
  padding: 12px;
  box-sizing: border-box;
}

.product-image-placeholder {
  background: linear-gradient(135deg, #eef4f0, #e2ece5);
}

.product-info {
  padding: 14px 18px 18px;
}

.product-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 6px;
}

.product-name {
  flex: 1;
  min-width: 0;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.product-price {
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--color-red), var(--color-red-dark));
  color: #ffffff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 6px 13px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.product-description {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Footer / контакти (тъмно зелен, като визитка) ---------- */

.site-footer {
  background: linear-gradient(165deg, var(--color-green), var(--color-green-dark));
  margin: 0 16px;
  border-radius: var(--radius);
  padding: 26px 20px 22px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.footer-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.footer-address {
  color: #ffffff;
  font-weight: 600;
  margin: 0 0 18px;
  font-size: 0.98rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
}

.contact-row-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-top: 1px dotted rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.contact-list .contact-row-line:first-child {
  border-top: none;
}

.contact-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  text-align: left;
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
}

.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 1.1rem;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.contact-icon-red {
  background: linear-gradient(180deg, var(--color-red), var(--color-red-dark));
}

.contact-icon-green {
  background: rgba(255, 255, 255, 0.14);
}

.contact-icon-viber {
  background: linear-gradient(180deg, #8b7cf6, var(--color-viber));
}

.contact-row-email {
  cursor: pointer;
}

.contact-chevron {
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

/* ---------- Долно послание за доверие ---------- */

.trust-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  max-width: 460px;
  margin: 26px auto 8px;
  padding: 0 16px 34px;
}

.trust-content {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.trust-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.trust-text {
  color: var(--color-green-dark);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
}

/* ---------- Достъпност ---------- */

a:focus-visible,
.category-tile:focus-visible,
.contact-icon:focus-visible,
.contact-row-email:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* ---------- По-широки екрани ---------- */

@media (min-width: 700px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-title {
    font-size: 1.9rem;
  }

  .site-footer {
    max-width: 600px;
    margin: 0 auto;
  }
}
