/* ========================================
   MANZAPROMO — STYLESHEET PRINCIPAL
   ======================================== */

/* Reset + Variables */
:root {
  color-scheme: light only;
  --black: #000;
  --white: #fff;
  --muted: rgba(0, 0, 0, 0.65);
  --muted-light: rgba(0, 0, 0, 0.5);
  --border-light: rgba(0, 0, 0, 0.12);
  --border: rgba(0, 0, 0, 0.22);
  --shadow-soft: 0 8px 18px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 14px 30px rgba(0, 0, 0, 0.18);
  --shadow-modal: 0 20px 40px rgba(0, 0, 0, 0.3);
  
  /* Gradientes */
  --gradient-bg: linear-gradient(135deg, #34d399 0%, #06b6d4 45%, #2563eb 100%);
  --gradient-hot: linear-gradient(135deg, #ef4444, #dc2626);
  --gradient-day: linear-gradient(135deg, #475569, #334155);
  --gradient-button: linear-gradient(to bottom, #fff, #e2e8f0);
  
  /* Transições */
  --transition-fast: 0.12s ease;
  --transition-normal: 0.2s ease;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--black);
  background: var(--gradient-bg);
  min-height: 100vh;
}

/* ========== CONTAINERS ========== */

.bg {
  min-height: 100vh;
  background: var(--gradient-bg);
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 16px;
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

/* ========== HEADER ========== */

.header {
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.logo {
  width: 360px;
  max-width: 92vw;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.25));
  height: auto;
}

.tagline {
  font-size: 14px;
  color: var(--black);
  margin: 0;
}

.headerBtns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ========== BUTTONS ========== */

.btn {
  appearance: none;
  border: 1px solid var(--black);
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  background: var(--white);
  color: var(--black);
  transition: var(--transition-fast);
  font-size: 14px;
  min-height: 44px; /* Acessibilidade */
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}

.btn-black-3d {
  background: var(--black);
  color: var(--white);
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.6),
    0 10px 20px rgba(0, 0, 0, 0.35);
}

.btn-black-3d:hover {
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.6),
    0 8px 16px rgba(0, 0, 0, 0.35);
}

.btn-black-3d:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.pillbtn {
  width: 100%;
  border: 1px solid var(--black);
  border-radius: 18px;
  padding: 11px 12px;
  background: #e2e8f0;
  color: var(--black);
  font-weight: 700;
}

/* ========== CARDS ========== */

.card {
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.card-pad {
  padding: 16px;
}

.card-title {
  font-weight: 800;
  font-size: 14px;
  margin: 0 0 10px 0;
  letter-spacing: 0.05em;
}

/* ========== FORMS ========== */

.controls {
  display: grid;
  gap: 10px;
}

@media (min-width: 768px) {
  .controls {
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
  }
}

.input {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--black);
  border-radius: 18px;
  padding: 10px 12px;
  background: var(--white);
}

.input input {
  width: 100%;
  border: 0;
  outline: 0;
  font-size: 15px;
  background: transparent;
  color: inherit;
}

.input input::placeholder {
  color: var(--muted);
}

.select {
  width: 100%;
  border: 1px solid var(--black);
  border-radius: 18px;
  padding: 11px 12px;
  background: #e2e8f0;
  color: var(--black);
  font-weight: 700;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 1.2em;
  padding-right: 36px;
}

.select:focus-visible {
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}

.smallmuted {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* ========== GRID ========== */

.grid {
  display: grid;
  gap: 14px;
}

.grid.cols {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid.cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .grid.cols {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid.cols {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .grid.cols {
    grid-template-columns: repeat(5, 1fr);
  }
}

.empty {
  border: 1px dashed var(--border);
  border-radius: 18px;
  padding: 32px 18px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  grid-column: 1 / -1;
}

/* ========== TABS ========== */

.tabsbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.tabs {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.tab {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  background: var(--gradient-button);
  color: var(--black);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
  transition: var(--transition-fast);
  font-size: 14px;
}

.tab:hover {
  transform: translateY(-1px);
}

.tab.active {
  background: var(--gradient-hot);
  color: var(--white);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.18);
}

.tab.active.day,
.tab.active.week {
  background: var(--gradient-day);
}

.sideinfo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 14px;
}

.shopbtn {
  position: relative;
  border: 1px solid var(--black);
  border-radius: 18px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1, #94a3b8);
  box-shadow: 0 18px 26px rgba(0, 0, 0, 0.18);
  transition: var(--transition-fast);
}

.shopbtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.22);
}

.shopbtn .new {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--black);
  color: var(--white);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.25);
}

/* ========== SECTIONS ========== */

.section {
  margin-top: 16px;
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.sectionhead {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.sectionhead h2 {
  margin: 0;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.sub {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px 0;
}

/* ========== PROMO CARDS ========== */

.promo {
  border: 1px solid var(--black);
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  height: 100%;
  cursor: pointer;
  transition: var(--transition-fast);
}

.promo:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.18);
}

.promo:focus-visible {
  outline: 2px solid #06b6d4;
  outline-offset: 2px;
}

.promo .imgwrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--white);
  overflow: hidden;
}

.promo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.badge-store {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.18);
}

.store-amz {
  background: #ff9900;
  color: var(--black);
}

.store-ml {
  background: #ffe600;
  color: var(--black);
}

.store-shopee {
  background: #ee4d2d;
  color: var(--white);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 12px 0 12px;
}

.badge {
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid var(--border-light);
}

.badge.outline {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
}

.badge.hot {
  background: var(--white);
  border: 1px solid var(--border-light);
}

.miniIcons {
  display: flex;
  gap: 4px;
  padding: 0 12px;
}

.miniIcon {
  display: inline-block;
  font-size: 14px;
  opacity: 0.7;
}

.pcontent {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ptitle {
  font-weight: 900;
  font-size: 15px;
  line-height: 1.2;
  margin: 0 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.priceRow {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.price {
  font-weight: 900;
  font-size: 16px;
}

.old {
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
  margin-top: 2px;
}

.meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.btn-offer {
  border: 1px solid var(--black);
  background: #e2e8f0;
  color: var(--black);
  border-radius: 14px;
  padding: 8px 10px;
  font-weight: 900;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 12px;
  white-space: nowrap;
}

.btn-offer:hover {
  background: #cbd5e1;
}

/* ========== MODAL ========== */

#modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

#modalBox {
  width: min(520px, 96vw);
  background: var(--white);
  border: 1px solid var(--black);
  border-radius: 18px;
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#modal-close {
  padding: 8px 12px;
  border-radius: 12px;
  min-width: auto;
}

/* ========== CONVERSOR ========== */

.conv-card {
  width: 100%;
  max-width: 720px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.12);
  padding: 18px;
  margin: 0 auto;
}

.conv-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 10px 0 6px;
  color: var(--muted);
}

.conv-input,
.conv-output {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  outline: none;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  transition: var(--transition-fast);
}

.conv-input:focus,
.conv-output:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.conv-btn {
  width: 100%;
  margin-top: 12px;
}

.conv-status {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  padding: 10px;
  border-radius: 12px;
  background: #f1f5f9;
}

.conv-status[data-type="error"] {
  background: #fee2e2;
  color: #991b1b;
  border-left: 3px solid #dc2626;
}

.conv-status[data-type="success"] {
  background: #dcfce7;
  color: #166534;
  border-left: 3px solid #16a34a;
}

.conv-status[data-type="info"] {
  background: #f1f5f9;
  color: var(--muted);
  border-left: 3px solid #06b6d4;
}

.conv-result {
  margin-top: 12px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.conv-copy {
  width: 100%;
  margin-top: 10px;
  border-radius: 14px;
  font-weight: 900;
}

/* ========== SHOP ========== */

.shophead {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 768px) {
  .shophead {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.shopTitle {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 900;
  font-size: 34px;
  letter-spacing: 0.06em;
  color: var(--white);
  text-shadow:
    -1px -1px 0 var(--black), 1px -1px 0 var(--black),
    -1px 1px 0 var(--black), 1px 1px 0 var(--black),
    0 2px 0 rgba(0, 0, 0, 0.35), 0 10px 18px rgba(0, 0, 0, 0.25);
}

/* ========== FOOTER ========== */

.footer {
  padding: 22px 0 46px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}

/* ========== LOADING STATE ========== */

.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.2);
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========== RESPONSIVE ========== */

@media (max-width: 640px) {
  .header {
    padding: 16px;
  }

  .container {
    padding: 16px;
  }

  .shopTitle {
    font-size: 24px;
  }

  .tabs {
    width: 100%;
  }

  .sideinfo {
    width: 100%;
    justify-content: center;
  }

  .shopbtn {
    width: 100%;
  }
}

/* ========== ACESSIBILIDADE ========== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}