/* ===========================
   KIKARIGA — FULL CSS (NEW)
   Green + Yellow (premium)
   =========================== */

/* ===== Theme colors ===== */
:root {
  --green: #2f9e44;
  --green-dark: #1f7a35;
  --green-soft: #e6f4ea;

  --yellow: #f6c453;
  --yellow-soft: #fff6dd;

  --bg: #f7f8fa;
  --card: #ffffff;

  --text: #1f2933;
  --muted: #6b7280;

  --border: #e6e8eb;

  --shadow-sm: 0 6px 18px rgba(0,0,0,0.06);
  --shadow: 0 10px 28px rgba(0,0,0,0.08);
  --shadow-lg: 0 18px 42px rgba(0,0,0,0.12);

  --radius: 16px;
  --radius-sm: 12px;

  --focus: rgba(47, 158, 68, .25);
}

/* ===== Base ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

body::before{
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(246,196,83,.18), transparent 60%),
    radial-gradient(900px 520px at 92% 12%, rgba(47,158,68,.16), transparent 58%),
    radial-gradient(900px 520px at 50% 95%, rgba(47,158,68,.10), transparent 55%),
    linear-gradient(180deg, #f7f8fa 0%, #f2f5f7 100%);
  filter: saturate(1.05);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.container { width: min(1100px, 92%); margin: 0 auto; }

/* Smooth content pop-in */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
main { animation: pageIn .35s ease-out both; }

/* ===== Topbar ===== */
.topbar{
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar__row{
  display:flex;
  align-items:center;
  gap:16px;
  padding:12px 0;
  flex-wrap: wrap;
}

.brand{
  font-weight: 900;
  letter-spacing: .2px;
}

.brand a{ text-decoration:none; }

.brand::after{
  content:"";
  display:inline-block;
  width:10px;height:10px;
  margin-left:8px;
  border-radius:999px;
  background: linear-gradient(135deg, var(--yellow), var(--green));
  box-shadow: 0 0 0 4px rgba(47,158,68,.08);
  vertical-align: middle;
}

/* ===== Language switch ===== */
.lang{ display:flex; align-items:center; }
.lang a{
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-left: 6px;
  background: var(--card);
  color: var(--muted);
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.lang a:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.lang a.active{
  background: linear-gradient(135deg, rgba(47,158,68,.12), rgba(246,196,83,.12));
  border-color: rgba(47,158,68,.35);
  color: var(--green);
}

/* ===== Forms ===== */
.input, .select, textarea.input{
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  width: 100%;
  font: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.select{ appearance: auto; }

.input:focus, .select:focus, textarea.input:focus{
  border-color: rgba(47,158,68,.55);
  box-shadow: 0 0 0 4px var(--focus);
}

/* ===== Buttons ===== */
.btn{
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  line-height: 1.2;
  transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
  user-select: none;
}

.btn:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn:active{
  transform: translateY(0);
  box-shadow: none;
}

.btn.primary{
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  border: none;
  color: #fff;
}
.btn.primary:hover{ filter: brightness(1.05); }

/* ===== Layout (catalog) ===== */
.layout{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap: 18px;
  padding: 18px 0;
}

/* ===== Sidebar ===== */
.sidebar{
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.sidebar h3{
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: .2px;
  text-transform: uppercase;
}

/* ===== Menu ===== */
.menu{
  list-style:none;
  padding:0;
  margin:10px 0 0;
  display:flex;
  flex-direction: column;
  gap: 6px;
}

.menu li a{
  display:block;
  padding: 10px 10px;
  border-radius: 12px;
  transition: background .15s ease, transform .12s ease, border-color .15s ease;
}

.menu li a:hover{
  background: rgba(47,158,68,.08);
  transform: translateX(2px);
}

.menu li a.active{
  background: linear-gradient(135deg, rgba(47,158,68,.16), rgba(246,196,83,.12));
  color: var(--green);
  font-weight: 800;
  border: 1px solid rgba(47,158,68,.18);
}

.menu li a.active::before{
  content:"";
  width: 8px;
  height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  display:inline-block;
  margin-right: 8px;
  box-shadow: 0 0 0 4px rgba(246,196,83,.18);
}

/* Optional sub menu */
.submenu{
  list-style:none;
  padding: 8px 0 0 10px;
  margin: 8px 0 0 10px;
  border-left: 2px solid rgba(230,232,235,.9);
  display:flex;
  flex-direction: column;
  gap: 6px;
}
.submenu a{
  padding: 9px 10px;
  border-radius: 12px;
  display:block;
}
.submenu a:hover{
  background: rgba(246,196,83,.12);
}

/* ===== Search ===== */
.search{
  display:flex;
  gap: 8px;
  flex: 1;
  align-items:center;
  flex-wrap: wrap;
}

/* Wrapper for clear button */
.search-field{
  position: relative;
  width: 100%;
  max-width: 420px;
}

.search-field .input{
  width: 100%;
  padding-right: 48px;
}

/* Clear button (nice on mobile) */
#clearSearch{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: #f1f5f9;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #334155;
  z-index: 10;
  transition: transform .12s ease, filter .15s ease, opacity .15s ease;
}
#clearSearch:hover{
  filter: brightness(0.97);
  transform: translateY(-50%) scale(1.03);
}
#clearSearch:active{
  transform: translateY(-50%) scale(0.98);
}

.search .select{ width: 240px; }

/* ===== Product grid ===== */
.grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}

/* ===== Card ===== */
.card{
  position: relative;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(230,232,235,.9);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.card::before{
  content:"";
  position:absolute;
  left:0; top:0; right:0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--yellow));
  opacity: .85;
}

.card:hover{
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(47,158,68,.22);
  background: rgba(255,255,255,1);
}

.card:hover::after{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: calc(var(--radius) + 2px);
  background:
    radial-gradient(500px 220px at 20% 0%, rgba(47,158,68,.14), transparent 60%),
    radial-gradient(500px 220px at 80% 0%, rgba(246,196,83,.12), transparent 60%);
  z-index:-1;
}

.card__img{ position: relative; }

.card__img img{
  width:100%;
  height:220px;
  object-fit:cover;
  display:block;
  transition: transform .25s ease, filter .25s ease;
  filter: saturate(1.05) contrast(1.02);
}

.card:hover .card__img img{
  transform: scale(1.05);
  filter: saturate(1.12) contrast(1.05);
}

/* Placeholder shimmer */
@keyframes shimmer{
  0%{ background-position: -200% 0; }
  100%{ background-position: 200% 0; }
}
.placeholder{
  width:100%;
  height:220px;
  background: linear-gradient(90deg, #e9eaee 0%, #f4f5f7 50%, #e9eaee 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.placeholder.big{
  height: 420px;
  border-radius: var(--radius);
}

.card__body{ padding: 12px; }

.card__title{
  font-weight: 900;
  margin-bottom: 8px;
  line-height: 1.2;

  /* clamp long titles */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.3em;
}

.card__price{
  margin-bottom: 10px;
  font-weight: 900;
  color: var(--green-dark);
  display:flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

/* for sale rendering (optional) */
.card__price .old{
  color: #7b8794;
  text-decoration: line-through;
  font-weight: 800;
}
.card__price .new{
  color: var(--green-dark);
  font-weight: 900;
}
.card__price .sale{
  font-size: 12px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(246,196,83,.55);
  background: rgba(246,196,83,.22);
  color: #7a5a00;
}

/* ===== Badges ===== */
.badge{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--border);
}

.badge.ok{
  background: rgba(47,158,68,.12);
  border-color: rgba(47,158,68,.30);
  color: var(--green-dark);
}

.badge.no{
  background: rgba(201,42,42,.08);
  border-color: rgba(201,42,42,.22);
  color: #b42318;
}

/* ===== Product page ===== */
.product{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 18px 0;
}

.product__img{
  width:100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.product__info h1{
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: .1px;
}

.price{
  font-size: 22px;
  font-weight: 900;
  margin: 10px 0;
  color: var(--green-dark);
}

/* Sale price layout (used in product.php if you want classes) */
.price{
  display:flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.price__old{
  color:#7b8794;
  text-decoration: line-through;
  font-weight: 800;
}
.price__new{
  font-size: 22px;
  font-weight: 900;
}
.price__badge{
  font-size: 12px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(246,196,83,.55);
  background: rgba(246,196,83,.22);
  color: #7a5a00;
}

.desc{
  margin-top: 14px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.actions{
  margin-top: 14px;
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
}

.note{ margin-top: 10px; color: var(--muted); }

.back-link{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  margin: 14px auto 0;
  width: min(1100px, 92%);
  color: var(--muted);
  font-weight: 900;
}
.back-link:hover{ color: var(--text); }

/* thumbs (product gallery) */
.thumbs{
  display:flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.thumb{
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .15s ease;
}
.thumb:hover{ transform: translateY(-1px); box-shadow: var(--shadow); }
.thumb img{
  width: 74px;
  height: 74px;
  object-fit: cover;
  display:block;
}

/* ===== Admin tables helpers ===== */
table{ font-size: 14px; }
th{ color:#333; }
td{ vertical-align: top; word-break: break-word; }

table .btn{
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  padding: 8px 10px;
  font-size: 14px;
}

/* ===== Admin mobile cards ===== */
@media (max-width: 700px){
  table, thead, tbody, th, td, tr{
    display:block;
    width:100%;
  }
  thead{ display:none; }

  tr{
    background:#fff;
    border:1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
  }

  td{ padding: 6px 0; }

  td::before{
    content: attr(data-label);
    font-size: 12px;
    color: var(--muted);
    display:block;
    margin-bottom: 2px;
  }

  table .btn{
    width:100%;
    margin-top: 6px;
  }

  form[style*="grid-template-columns"]{
    grid-template-columns: 1fr !important;
  }
}

/* ===== Category order controls ===== */
.order-cell{ min-width: 90px; }
.order-controls{ display:flex; gap: 6px; }

.order-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .15s ease;
}
.order-btn:hover{ box-shadow: var(--shadow); transform: translateY(-1px); }
.order-btn:active{ transform: scale(0.97); }

.order-meta{
  font-size: 12px;
  color: #777;
  margin-top: 4px;
}

@media (max-width: 640px){
  .order-btn{
    width: 44px;
    height: 44px;
    font-size: 18px;
    border-radius: 14px;
  }
  table{ font-size: 13px; }
}

/* ===== Responsive ===== */
@media (max-width: 900px){
  .layout{ grid-template-columns: 1fr; }
  .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .product{ grid-template-columns: 1fr; }
  .search-field{ max-width: none; }
  .search .select{ width: 100%; }
}

@media (max-width: 520px){
  .grid{ grid-template-columns: 1fr; }
  .actions .btn{ width: 100%; }
  .card__img img{ height: 240px; }
  .product__img{ height: 360px; }
}

/* Back to catalog button */
.back-link{
  display: inline-flex;
  align-items: center;
  gap: 10px;

  margin: 14px auto 0;
  width: min(1100px, 92%);

  padding: 10px 14px;
  border-radius: 999px;

  background: rgba(255,255,255,.92);
  border: 1px solid rgba(230,232,235,.95);
  box-shadow: var(--shadow-sm);

  color: var(--text);
  font-weight: 900;

  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}

.back-link:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: rgba(47,158,68,.28);
}

.back-link:active{
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.back-link::before{
  content: "←";
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(135deg, rgba(47,158,68,.18), rgba(246,196,83,.18));
  border: 1px solid rgba(47,158,68,.22);
  color: var(--green-dark);
}

/* ===== Footer ===== */
.site-footer{
  margin-top: 32px;
  background: linear-gradient(180deg, rgba(47,158,68,0.04), rgba(0,0,0,0));
  border-top: 1px solid var(--border);
  padding: 28px 0 20px;
  color: var(--muted);
}
.site-footer .footer__grid{
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.site-footer .footer__col{ flex: 1 1 220px; min-width: 180px; }
.site-footer h4{ margin:0 0 8px; font-size:14px; color:var(--text); font-weight:800 }
.site-footer a{ color: inherit; text-decoration: none; }
.site-footer .footer__bottom{ text-align:center; margin-top:18px; font-size:13px; color:var(--muted); }

@media (max-width:900px){
  .site-footer .footer__grid{ gap:16px }
}

/* Pagination */
.pager{
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pager__pages{
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pager__btn,
.pager__page{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow-sm);
  font-weight: 900;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}

.pager__btn:hover,
.pager__page:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: rgba(47,158,68,.22);
}

.pager__page.is-active{
  background: linear-gradient(135deg, rgba(47,158,68,.16), rgba(246,196,83,.14));
  border-color: rgba(47,158,68,.30);
  color: var(--green-dark);
}

.pager__btn.is-disabled{
  opacity: .45;
  pointer-events: none;
}

.pager__dots{
  color: var(--muted);
  padding: 0 6px;
  font-weight: 900;
}

/* ===== Running top bar ===== */
.noticebar{
  position: sticky;
  top: 0;
  z-index: 999;
  background: linear-gradient(90deg, var(--yellow-soft), #ffffff);
  color: #000000;
  border-bottom: 1px solid rgba(255,255,255,.18);
}

.noticebar__inner{
  width: min(1100px, 92%);
  margin: 0 auto;
  overflow: hidden;
  padding: 8px 0;
}

.noticebar__track{
  display: inline-flex;
  align-items: center;
  gap: 48px;
  white-space: nowrap;

  /* ВАЖНО: чтобы полоса не "сжималась" */
  width: max-content;

  will-change: transform;
  animation: noticebar-move 16s linear infinite;
  font-weight: 700;
  letter-spacing: .2px;
}

.noticebar__track span{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.noticebar__track span::before{
  content: "";
  color: var(--yellow);
}

/* Двигаем постоянно */
@keyframes noticebar-move{
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* если у пользователя включено "уменьшить движение" */
@media (prefers-reduced-motion: reduce){
  .noticebar__track{ animation: none; }
}


.video-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:14px;
}

.video-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-frame{
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame iframe,
.video-frame video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  border:0;
}

.video-title{
  padding: 12px;
  font-weight: 800;
  line-height: 1.25;
}

@media (max-width: 900px){
  .video-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 520px){
  .video-grid{ grid-template-columns: 1fr; }
}

/* ===== Promo Gallery block (index) ===== */
.promo-gallery{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;

  padding:14px 14px;
  margin-bottom:14px;

  border-radius:16px;
  border:1px solid var(--border);
  background:
    radial-gradient(1200px 240px at 15% 0%, rgba(246,196,83,0.18), transparent 60%),
    radial-gradient(900px 260px at 85% 100%, rgba(47,158,68,0.16), transparent 55%),
    var(--card);
  box-shadow: var(--shadow);

  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.promo-gallery:hover{
  transform: translateY(-2px);
  filter: brightness(1.02);
}

.promo-gallery__title{
  font-weight: 900;
  letter-spacing: .2px;
  font-size: 16px;
}

.promo-gallery__hint{
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.25;
}

.promo-gallery__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:12px;
  font-weight: 800;
  color:#111;

  background:
    linear-gradient(135deg, var(--yellow), #ffd36b);
  border:1px solid rgba(0,0,0,0.06);
}

@media (max-width: 520px){
  .promo-gallery{
    flex-direction:column;
    align-items:flex-start;
  }
  .promo-gallery__right{ width:100%; }
  .promo-gallery__btn{ width:100%; }
}

/* Sidebar: не бесконечно длинный список */
.sidebar {
  position: sticky;
  top: 12px;
  align-self: start;
}

.sidebar .menu {
  max-height: calc(100vh - 160px);
  overflow: auto;
  padding-right: 6px;
}

/* красивый скролл (опционально) */
.sidebar .menu::-webkit-scrollbar { width: 8px; }
.sidebar .menu::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.12);
  border-radius: 10px;
}

.gallery-btn{
  border: 1px solid rgba(47,158,68,0.25);
  background: linear-gradient(135deg, rgba(47,158,68,0.14), rgba(246,196,83,0.14));
  font-weight: 800;
}
.gallery-btn:hover{
  filter: brightness(1.03);
}


/* ===== Gallery (TikTok-like) ===== */
.gallery-body {
  background: #0b0d10;
  color: #fff;
}

.gallery {
  height: calc(100vh - 62px); /* примерно высота topbar */
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.gallery__item {
  position: relative;
  height: calc(100vh - 62px);
  scroll-snap-align: start;
  display: grid;
  place-items: center;
  background: #0b0d10;
}

.gallery__video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* если хочешь как тикток "в кадр" — поставь cover */
  background: #000;
}

.gallery__caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
  font-weight: 600;
  line-height: 1.25;
  max-width: 720px;
}

.gallery__tap {
  position: absolute;
  inset: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

/* Делаем topbar светлее для галереи */
.gallery-body .topbar {
  background: rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.gallery-body .lang a {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.85);
}
.gallery-body .lang a.active {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.22);
  color: #fff;
}
.gallery-body .btn {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.92);
}
.gallery-body .btn:hover {
  transform: translateY(-1px);
}

.fab-gallery{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  padding: 12px 14px;
  border-radius: 999px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--green), #37b24d);
  color: #fff;
  border: 0;
  box-shadow: 0 14px 30px rgba(0,0,0,0.22);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.fab-gallery:hover { filter: brightness(1.05); transform: translateY(-2px); }

/* =========================
   TikTok-like Gallery (centered, responsive)
   ========================= */
.gallery-wrap { display: grid; gap: 12px; }

.gallery-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.gallery-title { font-weight: 900; font-size: 18px; }
.gallery-sub { color: var(--muted); font-size: 13px; }

.gallery {
  margin: 0 auto;
  width: min(420px, 100%);
  height: min(78vh, 720px);
  overflow: auto;

  border: 1px solid var(--border);
  border-radius: 20px;
  background: #0b0d12;
  box-shadow: var(--shadow);

  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.g-item {
  scroll-snap-align: start;
  height: 100%;
  padding: 10px;
  display: grid;
  place-items: center;
}

.g-frame {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.08);
}

.g-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.g-caption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
  backdrop-filter: blur(6px);
}

@media (min-width: 900px) {
  .gallery { width: 420px; height: min(76vh, 760px); }
}

@media (max-width: 520px) {
  .gallery { width: 100%; height: 72vh; border-radius: 18px; }
}

/* =========================
   Videos page (simple gallery grid)
   ========================= */
.video-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
}

.video-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.video-card__media{
  background:#0b0d12;
}

.video-card__media video{
  width:100%;
  height: 240px;
  object-fit: cover;
  display:block;
  background:#000;
}

.video-card__body{
  padding: 12px;
}

.video-card__title{
  font-weight: 800;
  line-height: 1.25;
}

.video-card__meta{
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px){
  .video-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 520px){
  .video-grid{ grid-template-columns: 1fr; }
  .video-card__media video{ height: 220px; }
}

.btn.messenger {
  background: linear-gradient(135deg,#0084ff,#00c6ff);
  color: #fff;
  border: none;
}

.btn.whastapp {
  background: linear-gradient(135deg,#3b7c0f,#72e481);
  color: #fff;
  border: none;
}