:root {
  --tt-red: #ff0050;
  --tt-black: #121212;
  --tt-gray-bg: #f1f1f2;
  --tt-border: #f1f1f2;
  --tt-text-main: #161823;
  --tt-text-sub: #757575;
  --tt-blue: #007aff;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f1f1f2;
  color: var(--tt-text-main);
  line-height: 1.5;
}

.tt-page {
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  position: relative;
}

/* GALLERY */
.tt-gallery {
  position: relative;
  background: #fff;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.tt-slider {
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tt-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tt-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tt-top-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  z-index: 10;
}

.tt-circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.tt-img-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
}

/* FLASH SALE */
.tt-flash {
  background: linear-gradient(90deg, #ff0050 0%, #ff4d00 100%);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tt-flash-tag {
  background: #fff;
  color: var(--tt-red);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 2px;
}

.tt-flash span {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.tt-timer-container {
  text-align: right;
}

.tt-timer-label {
  font-size: 11px;
  font-weight: 500;
  display: block;
}

.tt-timer {
  font-weight: 800;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

/* CARDS */
.tt-card {
  background: #fff;
  margin-bottom: 8px;
  padding: 16px;
  border-bottom: 1px solid #f5f5f5;
}

.tt-main-info {
  padding-top: 16px;
}

.tt-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tt-price-box {
  display: flex;
  align-items: baseline;
}

.tt-currency {
  font-size: 14px;
  font-weight: 800;
  color: var(--tt-red);
  margin-right: 4px;
}

.tt-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--tt-red);
}

.tt-old-price {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
  margin-left: 8px;
}

.tt-discount {
  background: #fff0f3;
  color: var(--tt-red);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.tt-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 10px;
  color: #111;
}

.tt-meta {
  display: flex;
  align-items: center;
}

.tt-rating {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--tt-text-sub);
}

.tt-star-icon {
  color: #ffab00;
  margin-right: 4px;
  font-size: 14px;
}

.tt-rating strong {
  color: #111;
  margin-right: 4px;
}

.tt-separator {
  margin: 0 6px;
  color: #ccc;
}

/* STORE CARD */
.tt-store-card {
  padding: 16px;
}

.tt-store-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.tt-store-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.tt-store-logo, .tt-store-logo-fallback {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.tt-store-logo-fallback {
  background: #121212;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
}

.tt-store-name strong {
  font-size: 14px;
  font-weight: 700;
}

.tt-verified-badge {
  background: #20d5ec;
  color: #fff;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  vertical-align: middle;
}

.tt-store-tags {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.tt-tag-blue {
  font-size: 10px;
  color: var(--tt-blue);
  font-weight: 600;
}

.tt-tag-gray {
  font-size: 10px;
  color: var(--tt-text-sub);
}

.tt-follow-btn {
  border: 1px solid #eee;
  background: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.tt-store-stats {
  display: flex;
  justify-content: space-around;
  padding-top: 12px;
}

.tt-stat-item {
  text-align: center;
}

.tt-stat-item strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.tt-stat-item span {
  font-size: 11px;
  color: var(--tt-text-sub);
}

/* SHIPPING */
.tt-shipping-row {
  display: flex;
  align-items: center;
  padding: 4px 0;
}

.tt-shipping-icon {
  margin-right: 12px;
  display: flex;
  align-items: center;
}

.tt-shipping-content {
  flex: 1;
}

.tt-shipping-title {
  font-size: 13px;
  font-weight: 600;
}

.tt-shipping-desc {
  font-size: 11px;
  color: var(--tt-text-sub);
}

.tt-chevron {
  color: #ddd;
  font-size: 18px;
}

/* DESCRIPTION */
.tt-section-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
}

.tt-description {
  font-size: 13px;
  color: #444;
  line-height: 1.6;
  white-space: pre-line;
}

.tt-show-more {
  background: none;
  border: none;
  color: var(--tt-blue);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 0 0;
  cursor: pointer;
}

/* REVIEWS */
.tt-review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.tt-view-all {
  font-size: 12px;
  color: var(--tt-text-sub);
}

.tt-review {
  margin-bottom: 16px;
}

.tt-review-user {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.tt-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f1f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
}

.tt-user-name {
  font-size: 12px;
  font-weight: 600;
}

.tt-stars {
  color: #ffab00;
  font-size: 9px;
}

.tt-review-text {
  font-size: 12px;
  color: #111;
  margin: 0;
}

/* FOOTER */
.tt-bottom-space {
  height: 70px;
}

.tt-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  gap: 12px;
  border-top: 1px solid #f5f5f5;
  z-index: 100;
}

.tt-footer-icons {
  display: flex;
  gap: 16px;
}

.tt-footer-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  color: #111;
  gap: 2px;
}

.tt-footer-actions {
  flex: 1;
  display: flex;
  gap: 8px;
}

.tt-cart-btn {
  flex: 1;
  background: #121212;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  height: 42px;
}

.tt-buy-btn {
  flex: 1.2;
  background: var(--tt-red);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ZOOM */
.zoom-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.zoom-modal img {
  max-width: 100%;
  max-height: 100%;
}

/* ADMIN STYLES */
.admin-body {
  background: #0a0a0c;
  color: #fff;
  padding: 20px;
}

.admin-wrap {
  max-width: 1000px;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.admin-panel {
  background: #16161a;
  padding: 25px;
  border-radius: 15px;
  margin-bottom: 30px;
  border: 1px solid #222;
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #aaa;
}

.admin-form input, .admin-form textarea {
  background: #101014;
  border: 1px solid #333;
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
}

.admin-full {
  grid-column: span 2;
}

.admin-btn {
  grid-column: span 2;
  background: var(--tt-red);
  color: #fff;
  border: none;
  padding: 15px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th, .admin-table td {
  text-align: left;
  padding: 15px;
  border-bottom: 1px solid #222;
}

.admin-table img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.admin-actions a {
  font-size: 12px;
  color: var(--tt-blue);
}

.admin-actions a.danger {
  color: #ff4d4d;
}

/* ESTADO SEGUINDO */
.tt-follow-btn.following {
  background: #f1f1f2;
  color: var(--tt-text-sub);
  border-color: #eee;
}

/* AJUSTE IMAGENS ADMIN */
.admin-current-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.admin-current-images img {
  width: 100px !important;
  height: 100px !important;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #333;
}

.admin-table img {
  width: 60px !important;
  height: 60px !important;
  object-fit: cover;
}

/* ESTILOS PARA AVALIAÇÕES COM MÍDIA */
.tt-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.tt-review-media {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.tt-review-media img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  cursor: zoom-in;
}

/* FIX VERIFIED BADGE ALIGNMENT */
.tt-store-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tt-verified-badge {
  order: -1; /* Coloca antes do texto */
  margin-right: 2px;
}

/* MODAL CHECKOUT TIKTOK SHOP */
.tt-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: flex-end; /* Abre de baixo para cima no mobile */
}

.tt-modal-content {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  max-height: 90vh;
  overflow-y: auto;
  margin: 0 auto;
  animation: slideUp 0.3s ease-out;
  /* Melhora o scroll suave interno */
  scroll-behavior: smooth;
  position: relative;
  display: flex;
  flex-direction: column;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.tt-modal-header {
  padding: 16px;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
  flex-shrink: 0;
}

.tt-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.tt-close-modal {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
}

.tt-modal-body {
  padding: 16px;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 100px; /* Espaço para o botão fixo */
}

.tt-checkout-product {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  background: #fafafa;
  padding: 12px;
  border-radius: 12px;
}

.tt-checkout-product img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

.tt-checkout-price {
  color: var(--tt-red);
  font-weight: 800;
  font-size: 18px;
}

.tt-checkout-title {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tt-form-group {
  margin-bottom: 16px;
}

.tt-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
}

.tt-form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  font-size: 14px;
  background: #f9f9f9;
}

.tt-form-group input:focus {
  border-color: var(--tt-red);
  outline: none;
  background: #fff;
}

.tt-form-row {
  display: flex;
  gap: 12px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-3 { flex: 3; }

/* BOTÃO FIXO NO RODAPÉ DO MODAL */
.tt-modal-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px;
  background: #fff;
  border-top: 1px solid #f5f5f5;
  box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
  z-index: 20;
}

.tt-submit-checkout {
  width: 100%;
  background: var(--tt-red);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 0, 80, 0.2);
}

.tt-submit-checkout:active {
  transform: scale(0.98);
}

/* CHECKOUT PAYMENT & SUGGESTIONS */
.tt-suggested-wrap {
  margin-top: 24px;
  border-top: 1px solid #f5f5f5;
  padding-top: 16px;
}

.tt-suggested-wrap h4 {
  font-size: 14px;
  margin: 0 0 12px;
  color: #111;
}

.tt-suggested-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tt-suggested-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f9f9f9;
  padding: 8px;
  border-radius: 10px;
}

.tt-suggested-item img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
}

.tt-suggested-info {
  flex: 1;
}

.tt-suggested-title {
  font-size: 12px;
  display: block;
  color: #333;
  font-weight: 500;
}

.tt-suggested-price {
  font-size: 12px;
  font-weight: 700;
  color: var(--tt-red);
}

.tt-add-suggested {
  background: #fff;
  border: 1px solid #ddd;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.tt-payment-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tt-payment-option {
  cursor: pointer;
}

.tt-payment-option input {
  display: none;
}

.tt-payment-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid #eee;
  border-radius: 12px;
  transition: all 0.2s;
}

.tt-payment-option input:checked + .tt-payment-box {
  border-color: var(--tt-red);
  background: rgba(255, 0, 80, 0.02);
}

.tt-payment-icon {
  font-size: 24px;
}

.tt-payment-text strong {
  display: block;
  font-size: 14px;
}

.tt-payment-text span {
  font-size: 11px;
  color: #999;
}

.tt-order-summary {
  margin-top: 24px;
  background: #fafafa;
  padding: 16px;
  border-radius: 12px;
}

.tt-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
  color: #666;
}

.tt-summary-row.total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #ddd;
  font-size: 16px;
  font-weight: 800;
  color: #111;
}

.tt-back-btn {
  width: 100%;
  background: none;
  border: none;
  color: #999;
  font-size: 13px;
  margin-top: 12px;
  cursor: pointer;
}

/* PAYMENT SIMULATION STYLES */
.tt-payment-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.tt-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--tt-red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#cardPassword:focus {
  border-color: var(--tt-red);
  outline: none;
}

/* ESTILOS ADICIONAIS CHECKOUT */
.tt-select {
  width: 100%;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 8px;
  font-size: 14px;
  background: #f9f9f9;
  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' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

#cardPassword {
  background: #f1f1f2;
  border: 2px solid #ddd;
  transition: all 0.2s;
}

#cardPassword:focus {
  border-color: var(--tt-red);
  background: #fff;
}

/* STOCK WARNING */
.tt-stock-warning {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff0f3;
  color: var(--tt-red);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 0, 80, 0.1);
}

.tt-stock-warning strong {
  font-weight: 800;
  margin: 0 2px;
}

/* SOCIAL PROOF */
.tt-social-proof {
  margin-bottom: 12px;
}

.tt-viewers {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--tt-text-sub);
  margin-bottom: 6px;
}

.tt-pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  position: relative;
}

.tt-pulse-dot::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #22c55e;
  border-radius: 50%;
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(3); opacity: 0; }
}

@keyframes pulseRed {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); background: #ffe4e8; }
  100% { transform: scale(1); }
}


/* STOCK PROGRESS BAR */
.tt-stock-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.tt-stock-warning {
  margin-bottom: 0 !important;
}

.tt-stock-bar-bg {
  width: 100%;
  height: 6px;
  background: #f1f1f2;
  border-radius: 10px;
  overflow: hidden;
}

.tt-stock-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff0050 0%, #ff4d00 100%);
  border-radius: 10px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* TRUST BADGES */
.tt-trust-badges-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border-top: 1px solid #f5f5f5;
  margin-top: -8px;
  margin-bottom: 8px;
}

.tt-trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #757575;
  text-align: center;
}

.tt-trust-badge svg {
  color: #22c55e;
}

.tt-trust-badge span {
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
}
