/* ===== Toto Pesca — estilos base ===== */

:root {
  --navy-900: #0a2e45;
  --navy-800: #0b3d5c;
  --navy-700: #124a6b;
  --navy-100: #eaf2f6;
  --orange-600: #ff7a1a;
  --orange-700: #d96409;
  --orange-100: #fff1e5;
  --gray-900: #202428;
  --gray-700: #4a5157;
  --gray-500: #767d84;
  --gray-200: #e4e7ea;
  --gray-100: #f4f6f7;
  --white: #ffffff;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 2px 10px rgba(10, 46, 69, 0.08);
  --shadow-card-hover: 0 8px 24px rgba(10, 46, 69, 0.15);
  --font-heading: "Poppins", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--gray-900);
  background: var(--gray-100);
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  margin: 0 0 0.5em;
  color: var(--navy-900);
}

p {
  margin: 0 0 1em;
}

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

img, svg {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ===== Header ===== */

#site-header {
  background: var(--navy-900);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  margin-right: auto;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--white);
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--orange-600);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.main-nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--navy-100);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--orange-600);
  border-bottom-color: var(--orange-600);
}

.pedido-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--orange-600);
  color: var(--white);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 9px 16px;
  border-radius: 999px;
  white-space: nowrap;
}

.pedido-link:hover {
  background: var(--orange-700);
}

.pedido-badge {
  background: var(--navy-900);
  color: var(--white);
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  font-size: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 22px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--orange-600);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--orange-700);
}

.btn-whatsapp {
  background: #25d366;
  color: var(--white);
}

.btn-whatsapp:hover {
  background: #1ebe5b;
}

.btn-outline {
  background: transparent;
  color: var(--navy-800);
  border: 2px solid var(--navy-800);
}

.btn-outline:hover {
  background: var(--navy-800);
  color: var(--white);
}

.btn-secondary {
  background: var(--navy-100);
  color: var(--navy-900);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn-danger {
  background: #fdecea;
  color: #c0392b;
}

.btn-danger:hover {
  background: #f9d3ce;
}

/* ===== Badges ===== */

.badge-encargo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange-100);
  color: var(--orange-700);
  border: 1.5px solid var(--orange-600);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.badge-encargo::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange-600);
}

/* ===== Hero banner con línea de pesca animada ===== */

.hero-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  padding: 56px 20px 64px;
  text-align: center;
}

.hero-banner h1 {
  color: var(--white);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 10px;
}

.hero-banner p {
  color: var(--navy-100);
  max-width: 560px;
  margin: 0 auto 22px;
  font-size: 1.02rem;
}

.hero-line-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  height: 40px;
  pointer-events: none;
}

.hero-line-track svg {
  width: 100%;
  height: 100%;
}

.fishing-line-path {
  fill: none;
  stroke: rgba(255, 122, 26, 0.55);
  stroke-width: 2;
  stroke-dasharray: 6 10;
  animation: totoLineFlow 3.5s linear infinite;
}

.fishing-hook {
  animation: totoHookDrift 6s ease-in-out infinite;
}

@keyframes totoLineFlow {
  to {
    stroke-dashoffset: -160;
  }
}

@keyframes totoHookDrift {
  0%, 100% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(14px) translateY(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fishing-line-path,
  .fishing-hook {
    animation: none;
  }
}

/* ===== Búsqueda / consulta ===== */

.search-section {
  background: var(--white);
  padding: 28px 20px;
  border-bottom: 1px solid var(--gray-200);
}

.search-section-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}

.search-copy strong {
  display: block;
  font-family: var(--font-heading);
  color: var(--navy-900);
  margin-bottom: 2px;
}

.search-copy span {
  color: var(--gray-700);
  font-size: 0.92rem;
}

.search-box {
  flex: 1;
  min-width: 220px;
  display: flex;
  gap: 10px;
}

.search-box input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

.search-box input:focus {
  outline: none;
  border-color: var(--orange-600);
}

/* ===== Catálogo ===== */

.catalog-section {
  padding: 32px 20px 60px;
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.filter-chip {
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
}

.filter-chip.active,
.filter-chip:hover {
  border-color: var(--orange-600);
  color: var(--orange-700);
  background: var(--orange-100);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

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

.product-thumb {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  background: var(--gray-200);
}

.product-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-marca {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  font-weight: 700;
}

.product-nombre {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--navy-900);
  font-weight: 600;
  margin: 0;
}

.product-precio {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-800);
}

.product-encargo-note {
  font-size: 0.82rem;
  color: var(--gray-700);
  margin: 0;
}

.product-encargo-aclaracion {
  font-size: 0.76rem;
  color: var(--gray-500);
  margin: 0;
}

.product-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
}

.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-control button {
  background: var(--gray-100);
  border: none;
  width: 30px;
  height: 36px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy-800);
}

.qty-control button:hover {
  background: var(--gray-200);
}

.qty-control input {
  width: 34px;
  border: none;
  text-align: center;
  font-size: 0.95rem;
  height: 36px;
}

.qty-control input:focus {
  outline: none;
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--gray-500);
}

/* ===== Pedir un producto no publicado ===== */

.pedir-producto-section {
  background: var(--navy-100);
  padding: 40px 20px;
}

.pedir-producto-card {
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.pedir-producto-card textarea {
  width: 100%;
  min-height: 90px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  margin-bottom: 14px;
}

.pedir-producto-card textarea:focus {
  outline: none;
  border-color: var(--orange-600);
}

/* ===== Mi Pedido (carrito) ===== */

.pedido-page-header {
  background: var(--navy-900);
  color: var(--white);
  padding: 34px 20px;
  text-align: center;
}

.pedido-page-header h1 {
  color: var(--white);
}

.pedido-page-header p {
  color: var(--navy-100);
  max-width: 520px;
  margin: 0 auto;
}

.pedido-content {
  padding: 34px 20px 70px;
}

.pedido-table-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 24px;
}

table.pedido-table {
  width: 100%;
  border-collapse: collapse;
}

.pedido-table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200);
}

.pedido-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

.pedido-table tr:last-child td {
  border-bottom: none;
}

.pedido-item-nombre {
  font-weight: 600;
  color: var(--navy-900);
}

.pedido-summary {
  max-width: 420px;
  margin-left: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
}

.pedido-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  padding: 6px 0;
}

.pedido-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-900);
  border-top: 1px solid var(--gray-200);
  margin-top: 10px;
  padding-top: 12px;
}

.pedido-disclaimer {
  font-size: 0.82rem;
  color: var(--gray-500);
  margin: 12px 0 18px;
}

.pedido-form {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pedido-form label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy-900);
}

.pedido-form input,
.pedido-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-family: inherit;
}

.pedido-form input:focus,
.pedido-form select:focus {
  outline: none;
  border-color: var(--orange-600);
}

/* ===== Preventa / Mystery Box hero ===== */

.section-hero {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  color: var(--white);
  padding: 40px 20px;
  text-align: center;
}

.section-hero h1 {
  color: var(--white);
}

.section-hero p {
  color: var(--navy-100);
  max-width: 560px;
  margin: 0 auto;
}

.mysterybox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  padding: 40px 0;
}

.mysterybox-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px 22px;
  text-align: center;
}

.mysterybox-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.mysterybox-valor {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 6px;
}

/* ===== TOTO CONTROL (admin) ===== */

.admin-shell {
  min-height: 100vh;
  background: var(--gray-100);
}

.admin-login {
  max-width: 380px;
  margin: 90px auto;
  background: var(--white);
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.admin-login input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin: 14px 0;
  font-size: 0.95rem;
}

.admin-header {
  background: var(--navy-900);
  color: var(--white);
  padding: 20px;
}

.admin-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-body {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 20px 60px;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
}

.admin-tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--gray-700);
}

.admin-tab.active {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--white);
}

.admin-table-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--gray-500);
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  font-size: 0.9rem;
}

.admin-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}

.admin-actions-cell {
  display: flex;
  gap: 6px;
}

.status-locked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange-100);
  color: var(--orange-700);
  border: 1px solid var(--orange-600);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 45, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px 26px 22px;
}

.modal-card h2 {
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.form-grid label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy-900);
  display: block;
  margin-bottom: 5px;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
}

.form-grid textarea {
  min-height: 70px;
  resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  outline: none;
  border-color: var(--orange-600);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.locked-note {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ===== Footer ===== */

#site-footer {
  background: var(--navy-900);
  color: var(--navy-100);
  margin-top: 40px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px;
  text-align: center;
}

.footer-tagline {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--orange-600);
}

.footer-note {
  font-size: 0.78rem;
  color: var(--gray-500);
  max-width: 520px;
  margin: 0 auto;
}

/* ===== Responsive ===== */

@media (max-width: 640px) {
  .header-inner {
    justify-content: center;
  }
  .brand {
    margin-right: 0;
  }
  .pedido-summary {
    margin-left: 0;
    max-width: none;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}
