/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Google Sans",
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  color: #1e293b;
  background: linear-gradient(180deg, #e0f2fe 0%, #f0f9ff 30%, #f8fafc 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0077b6 0%, #00b4d8 50%, #48cae4 100%);
  color: white;
  text-align: center;
  padding: 2rem 1.5rem 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.08) 0%,
    transparent 60%
  );
  animation: heroShimmer 8s ease-in-out infinite alternate;
}

@keyframes heroShimmer {
  from {
    transform: translateX(-20%) translateY(-10%);
  }
  to {
    transform: translateX(20%) translateY(10%);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.hero h1 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 0.95rem;
  opacity: 0.92;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Sections */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.section-highlight {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  margin: 0 auto;
  box-shadow:
    0 4px 24px rgba(0, 119, 182, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: #0077b6;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 0.82rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.section-subtitle::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #00b4d8;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.product-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  border: 2px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.product-card.selected {
  border-color: #0077b6;
  box-shadow: 0 4px 16px rgba(0, 119, 182, 0.1);
}

.product-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

.product-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: #0f172a;
}

.product-desc {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 600;
  color: #0077b6;
  margin-bottom: 0.75rem;
}

.price-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* Quantity Selector */
.quantity-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 0.3rem;
  margin-top: auto;
}

.qty-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: white;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.qty-btn:hover {
  background: #0077b6;
  color: white;
  box-shadow: 0 2px 8px rgba(0, 119, 182, 0.3);
}

.qty-btn:active {
  transform: scale(0.92);
}

.qty-input {
  width: 42px;
  text-align: center;
  border: none;
  border-radius: 6px;
  padding: 0.3rem;
  font-size: 0.95rem;
  font-weight: 400;
  font-family: "Google Sans Code", monospace;
  background: transparent;
  color: #0f172a;
}

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

.min-warning {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  color: #92400e;
  font-weight: 400;
  background: #fffbeb;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
  border: 1px solid #fde68a;
}

/* Order Summary */
.order-summary {
  padding: 0.25rem 0;
}

#order-items {
  margin-bottom: 0.75rem;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.88rem;
  color: #334155;
}

.order-item:last-child {
  border-bottom: none;
}

.order-total {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.88rem;
  color: #64748b;
}

.order-total-final {
  border-top: 1px solid #e0f2fe;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0077b6;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.span-2 {
  grid-column: span 2;
}

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

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

input[type="text"],
input[type="tel"],
input[type="date"],
select {
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.92rem;
  font-family: inherit;
  transition: all 0.2s;
  background: white;
  color: #0f172a;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

select option[value=""] {
  color: #94a3b8;
}

input[type="text"]::placeholder,
input[type="tel"]::placeholder {
  color: #cbd5e1;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus {
  outline: none;
  border-color: #00b4d8;
  box-shadow:
    0 0 0 3px rgba(0, 180, 216, 0.12),
    0 2px 8px rgba(0, 119, 182, 0.06);
}

.error-text {
  margin-top: 0.5rem;
  padding: 0.8rem 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 3px solid #dc2626;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #991b1b;
  line-height: 1.6;
}

.error-text a {
  color: #0077b6;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.info-text {
  margin-top: 0.5rem;
  padding: 0.8rem 1rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 3px solid #3b82f6;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #1e40af;
  line-height: 1.6;
}

.modulo-banner {
  margin-top: 0.75rem;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #bae6fd;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.modulo-banner p {
  font-size: 0.82rem;
  color: #0369a1;
  font-weight: 600;
}

.btn-modulo-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 1rem;
  background: #0077b6;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-modulo-inline:hover {
  background: #005f8a;
}

/* Facturación */
.facturacion-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem;
  margin-top: 0.5rem;
}

.facturacion-section .form-grid {
  grid-template-columns: repeat(2, 1fr);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: #334155;
  padding: 0.7rem 1rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.2s;
}

.checkbox-label:hover {
  border-color: #0077b6;
  background: #f0f9ff;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0077b6;
  cursor: pointer;
}

/* Payment */
.payment-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin-top: 0.35rem;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
  background: white;
  color: #475569;
}

.payment-option:hover {
  border-color: #93c5fd;
  background: #f0f9ff;
}

.payment-option:has(input:checked) {
  border-color: #0077b6;
  background: #f0f9ff;
  color: #0077b6;
}

.payment-option input[type="radio"] {
  accent-color: #0077b6;
  cursor: pointer;
}

.transfer-info {
  margin-top: 0.75rem;
  padding: 1rem 1.1rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 3px solid #22c55e;
  border-radius: 10px;
  font-size: 0.85rem;
  line-height: 1.9;
  color: #166534;
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.3rem 0;
}

.copy-row span {
  font-family: "Google Sans Code", monospace;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid #86efac;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  color: #16a34a;
  transition: all 0.2s;
  flex-shrink: 0;
}

.copy-btn:hover {
  background: #16a34a;
  color: white;
  border-color: #16a34a;
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

.copy-btn:active {
  transform: scale(0.95);
}

.copy-btn.copied {
  background: #16a34a;
  color: white;
  border-color: #16a34a;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 0.85rem;
  background: #25d366;
  color: white;
  border: none;
  border-bottom: 3px solid #1da851;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow:
    0 4px 14px rgba(37, 211, 102, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-submit:hover {
  background: #22c95e;
  transform: translateY(-1px);
  box-shadow:
    0 6px 20px rgba(37, 211, 102, 0.4),
    0 3px 6px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-submit:active {
  transform: translateY(2px);
  border-bottom-width: 1px;
  box-shadow:
    0 2px 8px rgba(37, 211, 102, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Footer */
.footer {
  text-align: center;
  padding: 2.5rem 1.5rem 2rem;
  font-size: 0.85rem;
  color: #64748b;
  max-width: 720px;
  margin: 0 auto;
}

.footer a:not(.btn-modulo) {
  color: #0077b6;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.footer a:not(.btn-modulo):hover {
  color: #005f8a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-modulo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.6rem;
  background: #0077b6;
  color: white !important;
  border-radius: 10px;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  margin-bottom: 1.25rem;
  box-shadow: 0 3px 10px rgba(0, 119, 182, 0.2);
}

.btn-modulo:hover {
  background: #005f8a;
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(0, 119, 182, 0.3);
}

.btn-modulo:active {
  transform: translateY(0) scale(0.98);
}

.btn-modulo::after {
  content: "→";
  font-size: 1rem;
  transition: transform 0.2s;
}

.btn-modulo:hover::after {
  transform: translateX(3px);
}

.footer-note {
  margin-top: 0.75rem;
  font-size: 0.72rem;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: white;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.modal-icon.error {
  background: #fef2f2;
  color: #dc2626;
  border: 2px solid #fecaca;
}

.modal-icon.warning {
  background: #fffbeb;
  color: #d97706;
  border: 2px solid #fde68a;
}

.modal-icon.info {
  background: #eff6ff;
  color: #2563eb;
  border: 2px solid #bfdbfe;
}

.modal-text {
  font-size: 0.92rem;
  color: #334155;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.modal-btn {
  padding: 0.6rem 2rem;
  background: #0077b6;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.modal-btn:hover {
  background: #005f8a;
}

/* Utilities */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
  .hero {
    padding: 2.5rem 1rem 3rem;
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .hero p {
    font-size: 0.88rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem 1rem 1rem;
  }

  .product-card .product-img {
    width: 80px;
    height: 80px;
    margin-bottom: 0.5rem;
  }

  .product-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
  }

  .product-card .product-desc {
    margin-bottom: 0.5rem;
  }

  .product-card .product-price {
    margin-bottom: 0.5rem;
  }

  .price-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
  }

  .quantity-selector {
    justify-content: center;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: span 1;
  }

  .facturacion-section .form-grid {
    grid-template-columns: 1fr;
  }

  .payment-options {
    grid-template-columns: 1fr;
  }

  .copy-row {
    flex-wrap: wrap;
  }

  .copy-row span {
    font-size: 0.82rem;
    word-break: break-all;
  }

  .section {
    padding: 1.5rem 1rem;
  }

  .section-highlight {
    border-radius: 14px;
    margin: 0 0.5rem;
  }

  select {
    font-size: 0.88rem;
  }
}

.btn-modulo {
  padding: 0.65rem 1.4rem;
  font-size: 0.85rem;
}
