/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  background: #010b09;
  font-family: 'Josefin Sans', sans-serif;
  overflow: hidden; color: white;
  -webkit-user-select: none; user-select: none;
}

/* ── APP SHELL ── */
.app {
  position: fixed; inset: 0;
  background: #020a09;
  max-width: 430px; margin: 0 auto;
  display: flex; flex-direction: column;
}

@media (min-width: 430px) {
  .app { box-shadow: 0 0 60px rgba(0,0,0,0.9); }
  body { background: #000; }
}

/* ── BOTTOM NAV ── */
.bottom-nav {
  flex-shrink: 0;
  display: flex; justify-content: space-around; align-items: center;
  height: 66px;
  padding-bottom: max(8px, env(safe-area-inset-bottom, 8px));
  background: rgba(2,10,9,0.96);
  border-top: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(14px);
  z-index: 100;
}

.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; padding: 4px 14px; min-width: 60px;
  text-decoration: none; color: white;
  transition: opacity 0.15s;
}

.nav-item:active { opacity: 0.6; }

.nav-item p {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.3px; color: white;
}

/* ── TOP NAV (category bar) ── */
.top-nav {
  flex-shrink: 0;
  display: flex; align-items: center;
  padding: calc(env(safe-area-inset-top,0px) + 10px) 0 10px;
}

.top-nav.solid {
  background: #020a09;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.top-nav.overlay {
  position: absolute; top: 0; left: 0; right: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.62), transparent);
  z-index: 50;
}

.nav-sp { width: 42px; flex-shrink: 0; }

.cat-area { flex: 1; overflow: hidden; }

.cat-sw { width: 100%; }
.cat-sw .swiper-slide { width: auto !important; }

.cat-item {
  height: 35px; display: flex; align-items: center;
  justify-content: center; cursor: pointer;
}

.cat-text {
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.42);
  padding: 5px 16px; border-radius: 20px;
  transition: all 0.22s; white-space: nowrap;
}

.cat-text.active {
  color: white;
  background: rgba(0,169,157,0.22);
  border: 1px solid rgba(0,169,157,0.52);
}

/* ── FLAG ── */
.flag-wrap {
  width: 52px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

.flag-btn {
  background: none; border: none; cursor: pointer;
  padding: 5px; border-radius: 50%;
}

.flag-btn img {
  width: 28px; height: 20px;
  object-fit: cover; border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5); display: block;
}

.flag-dd {
  display: none; position: absolute;
  top: 46px; right: 6px;
  background: rgba(4,16,14,0.97);
  border: 1px solid rgba(0,169,157,0.22);
  border-radius: 14px; padding: 10px;
  width: 172px; flex-wrap: wrap; gap: 7px;
  z-index: 400; backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.7);
}

.flag-dd.open { display: flex; }

.flag-dd button {
  background: none; border: none; cursor: pointer;
  padding: 2px; border-radius: 3px; transition: transform 0.15s;
}

.flag-dd button:hover { transform: scale(1.2); }

.flag-dd img {
  width: 28px; height: 20px;
  object-fit: cover; border-radius: 2px; display: block;
}

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(14px);
  background: #00a99d; color: white;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700; font-size: 13px;
  padding: 9px 22px; border-radius: 50px;
  opacity: 0; transition: all 0.27s ease;
  pointer-events: none; z-index: 600; white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,169,157,0.5);
  max-width: 430px;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── COMMON BUTTONS ── */
.btn-primary {
  width: 100%; background: #00a99d; color: white; border: none;
  border-radius: 50px; padding: 14px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 15px; font-weight: 700; cursor: pointer;
  letter-spacing: 0.5px; transition: all 0.18s;
  box-shadow: 0 4px 20px rgba(0,169,157,0.32);
}
.btn-primary:active { transform: scale(0.97); }

.btn-outline-teal {
  background: transparent; color: #00a99d;
  border: 1.5px solid #00a99d; border-radius: 50px;
  padding: 5px 14px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 12px; font-weight: 700; cursor: pointer;
  letter-spacing: 0.3px; transition: all 0.18s;
}
.btn-outline-teal:active { background: rgba(0,169,157,0.1); transform: scale(0.94); }

/* ── AUTH VIEWS ── */
.auth-page {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column;
}
.auth-page::-webkit-scrollbar { width: 0; }

.auth-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top,0px) + 14px) 24px 8px;
  flex-shrink: 0;
}

.btn-back {
  display: flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer;
  color: white; font-family: 'Josefin Sans', sans-serif;
  font-size: 13px; font-weight: 500;
}

.auth-body {
  flex: 1; display: flex; flex-direction: column;
  padding: 0 24px 28px;
}

.auth-logo {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin: 18px 0 24px; flex-shrink: 0;
}

.logo-text { font-size: 18px; font-weight: 300; letter-spacing: 0.5px; }
.logo-text strong { font-weight: 700; }

.auth-title {
  font-size: 17px; font-weight: 700; text-align: center;
  letter-spacing: 1px; margin-bottom: 5px; text-transform: uppercase;
  flex-shrink: 0;
}

.auth-sub {
  font-size: 13px; text-align: center;
  color: rgba(255,255,255,0.72); margin-bottom: 24px; flex-shrink: 0;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; flex-shrink: 0; }

.inp-wrap { position: relative; }

.inp-icon {
  position: absolute; left: 17px; top: 50%;
  transform: translateY(-50%); display: flex;
}

.auth-inp {
  width: 100%; background: transparent;
  border: 1.5px solid #00a99d; border-radius: 50px;
  padding: 13px 18px 13px 46px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 14px; color: rgba(0,169,157,0.9); outline: none;
  transition: border-color 0.2s;
}
.auth-inp::placeholder { color: rgba(0,169,157,0.52); }
.auth-inp:focus { border-color: #00c4b7; }

.auth-link {
  font-size: 12.5px; color: #00a99d; text-align: center;
  cursor: pointer; background: none; border: none;
  font-family: 'Josefin Sans', sans-serif;
}

.chk-row { display: flex; align-items: flex-start; gap: 10px; flex-shrink: 0; }

.chk {
  width: 20px; height: 20px;
  border: 1.5px solid rgba(255,255,255,0.28);
  border-radius: 4px; background: transparent; cursor: pointer;
  flex-shrink: 0; appearance: none; -webkit-appearance: none;
  position: relative; transition: all 0.2s;
}
.chk:checked { background: #00a99d; border-color: #00a99d; }
.chk:checked::after {
  content: ''; position: absolute; left: 5px; top: 2px;
  width: 6px; height: 10px; border: 2px solid white;
  border-top: none; border-left: none; transform: rotate(45deg);
}

.chk-label { font-size: 12px; color: rgba(255,255,255,0.62); line-height: 1.5; }
.chk-label a { color: #00a99d; text-decoration: underline; cursor: pointer; }

.auth-spacer { flex: 1; min-height: 16px; }

.auth-bottom { display: flex; flex-direction: column; gap: 14px; flex-shrink: 0; }

.auth-divider { display: flex; align-items: center; gap: 12px; }
.auth-div-line { flex: 1; height: 1px; background: rgba(255,255,255,0.1); }
.auth-div-txt { font-size: 12px; color: rgba(255,255,255,0.36); white-space: nowrap; }

.btn-google {
  width: 100%; background: transparent;
  border: 1.5px solid rgba(255,255,255,0.12); border-radius: 50px;
  padding: 12px; display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer; font-family: 'Josefin Sans', sans-serif;
  font-size: 14px; font-weight: 600; color: white; transition: background 0.2s;
}
.btn-google:active { background: rgba(255,255,255,0.05); }

.auth-version { font-size: 11px; color: rgba(255,255,255,0.16); text-align: center; }

/* ── SIMPLE VIEWS (favoritos, milista) ── */
.sv-header {
  display: flex; align-items: center; justify-content: center;
  position: relative;
  padding: calc(env(safe-area-inset-top,0px) + 16px) 52px 12px;
  flex-shrink: 0;
}

.sv-flag { position: absolute; right: 8px; top: calc(env(safe-area-inset-top,0px) + 10px); }

.sv-title { font-size: 17px; font-weight: 600; color: #00a99d; letter-spacing: 0.5px; }

.sv-dot { width: 6px; height: 6px; background: #00a99d; border-radius: 50%; margin: 4px auto 0; }

.sv-body { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0 20px; overflow-y: auto; }
.sv-body::-webkit-scrollbar { width: 0; }

.sv-empty { font-size: 15px; color: white; text-align: center; margin-top: 36px; margin-bottom: 20px; line-height: 1.45; }

.btn-plus {
  width: 100%; background: transparent;
  border: 1.5px solid #00a99d; border-radius: 14px;
  padding: 16px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 0.2s;
}
.btn-plus:active { background: rgba(0,169,157,0.08); }

.sv-items { width: 100%; margin-top: 16px; }

.sv-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sv-item img { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.sv-item-info { flex: 1; }
.sv-item-info p { font-size: 13px; font-weight: 600; }
.sv-item-info span { font-size: 12px; color: rgba(255,255,255,0.42); }
.sv-item-del {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.22); font-size: 18px; padding: 4px; line-height: 1;
}
.sv-item-del:hover { color: #ff4757; }

.sv-cta { flex-shrink: 0; padding: 12px 20px 14px; }

.list-qty {
  background: rgba(0,169,157,0.14);
  border: 1px solid rgba(0,169,157,0.38);
  border-radius: 8px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #00a99d; flex-shrink: 0;
}

/* ── VIDEO VIEW ── */
.outer-sw {
  flex: 1; overflow: hidden; position: relative; min-height: 0;
}
/* Force every Swiper layer to fill available height */
.outer-sw,
.outer-sw > .swiper-wrapper,
.outer-sw > .swiper-wrapper > .swiper-slide,
.inner-sw,
.inner-sw > .swiper-wrapper {
  height: 100% !important;
}
.inner-sw > .swiper-wrapper > .swiper-slide { height: 100% !important; }

.inner-sw {
  width: 100%; position: relative;
}

.vid-slide {
  position: relative; width: 100%; height: 100%;
  display: flex; flex-direction: column;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  overflow: hidden;
}

.vid-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.0)  0%,
    rgba(0,0,0,0.0)  40%,
    rgba(0,0,0,0.55) 70%,
    rgba(0,0,0,0.82) 100%
  );
  pointer-events: none;
}

/* Pagination bars – left side */
.vid-pagination {
  position: absolute; left: 11px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 5px;
  z-index: 10;
}
.vid-pagination .swiper-pagination-bullet {
  width: 3px !important; height: 22px !important; border-radius: 2px !important;
  background: rgba(255,255,255,0.28) !important; opacity: 1 !important;
  transition: background 0.2s !important;
}
.vid-pagination .swiper-pagination-bullet-active {
  background: white !important;
}

/* Up / down arrows – right side */
.vid-arrows {
  position: absolute; right: 11px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 10;
}
.vid-arrow {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; backdrop-filter: blur(6px); transition: all 0.15s;
}
.vid-arrow:active { background: rgba(255,255,255,0.22); transform: scale(0.9); }
.vid-arrow:disabled { opacity: 0.22; pointer-events: none; }

/* Product details overlay – bottom */
.prod-details {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
  gap: 10px; z-index: 10;
}

.prod-left  { flex: 1; min-width: 0; }
.prod-right { display: flex; flex-direction: column; align-items: center; gap: 14px; flex-shrink: 0; }

.prod-name-row {
  display: flex; align-items: center; gap: 7px; margin-bottom: 3px;
}

.prod-title {
  font-size: 16px; font-weight: 700; color: white; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.prod-price {
  font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,0.78); margin-bottom: 5px;
}

.prod-desc {
  font-size: 11.5px; color: rgba(255,255,255,0.46); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.btn-add-vid {
  background: transparent; color: #00a99d;
  border: 1.5px solid #00a99d; border-radius: 50px;
  padding: 8px 18px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 12px; font-weight: 700; cursor: pointer;
  letter-spacing: 0.3px; transition: all 0.16s; white-space: nowrap;
}
.btn-add-vid:active { background: rgba(0,169,157,0.14); transform: scale(0.94); }

.vid-fav-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.vid-heart {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.16s;
}
.vid-heart:active { transform: scale(0.82); }
.vid-fav-label {
  font-size: 9px; font-weight: 600; color: rgba(255,255,255,0.5);
  letter-spacing: 0.3px; text-transform: uppercase;
}
