/* ==========================================================================
   kids.routy.vip — Custom styles (Tailwind via CDN + overrides)
   ========================================================================== */

/* Base reset and typography */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background-color: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: #111827;
}

/* Links */
a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #1d4ed8;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #2563eb;
  color: #fff;
  padding: 8px 16px;
  z-index: 10000;
  text-decoration: none;
  border-radius: 4px;
}

.skip-link:focus {
  top: 0;
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e5e7eb;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo .accent {
  color: #2563eb;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: #374151;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: #2563eb;
}

.lang-switch {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
}

.lang-switch a {
  padding: 4px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #374151;
}

.lang-switch a.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.4rem;
  cursor: pointer;
}

.mobile-menu-btn svg {
  width: 20px;
  height: 20px;
  color: #374151;
}

/* Breadcrumb */
nav[aria-label="breadcrumb"] {
  margin-bottom: 1.75rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

nav[aria-label="breadcrumb"] ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.4;
}

nav[aria-label="breadcrumb"] li {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

nav[aria-label="breadcrumb"] li[aria-hidden="true"] {
  color: #cbd5e1;
}

nav[aria-label="breadcrumb"] li:last-child {
  color: #111827;
  font-weight: 600;
}

nav[aria-label="breadcrumb"] a {
  color: #2563eb;
  text-decoration: none;
}

nav[aria-label="breadcrumb"] a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Hero section */
.hero {
  position: relative;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  overflow: hidden;
}

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

.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: #4b5563;
  max-width: 600px;
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #fff;
  color: #2563eb;
  border: 2px solid #2563eb;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-secondary:hover {
  background: #eff6ff;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #25d366;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

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

/* Section */
.section {
  padding: 4rem 1.5rem;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: #4b5563;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Grid utilities */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.5rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.card-text {
  color: #4b5563;
  margin: 0;
}

/* Product grid */
.product-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.1);
}

.product-image {
  height: 240px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 0.9rem;
  border-bottom: 1px solid #e5e7eb;
}

.product-info {
  padding: 1rem;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.product-meta {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0 0 0.75rem;
}

.product-meta strong {
  color: #374151;
}

/* Stats */
.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: #2563eb;
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  color: #4b5563;
}

/* Buttons */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: transparent;
  color: #2563eb;
  border: 2px solid #2563eb;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background: #2563eb;
  color: #fff;
}

/* Form */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  ring-color: #2563eb;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.form-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
}

.form-message.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.form-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Table */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th, td {
  border: 1px solid #e5e7eb;
  padding: 0.75rem;
  text-align: left;
  font-size: 0.95rem;
}

th {
  background: #f3f4f6;
  font-weight: 600;
  color: #374151;
}

tr:nth-child(even) {
  background: #f9fafb;
}

/* Footer */
.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 3rem 1.5rem 1.5rem;
  border-top: 1px solid #1f2937;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
}

.footer-title {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #9ca3af;
}

.footer-links a:hover {
  color: #fff;
}

.footer-contact p {
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
  max-width: 1200px;
  margin: 0 auto;
}

/* Utility classes */
.text-center { text-align: center; }
.text-primary { color: #2563eb; }
.font-bold { font-weight: 700; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-wholesale {
  background: #dcfce7;
  color: #166534;
}

.badge-custom {
  background: #dbeafe;
  color: #1e40af;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Product gallery */
.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.gallery-count {
  font-size: 0.9rem;
  color: #6b7280;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}

.gallery-item {
  margin: 0;
}

.gallery-trigger {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f4f6;
  cursor: zoom-in;
}

.gallery-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-trigger:hover img,
.gallery-trigger:focus-visible img {
  transform: scale(1.06);
}

.gallery-trigger:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

.gallery-num {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.7);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.gallery-trigger:hover .gallery-num,
.gallery-trigger:focus-visible .gallery-num {
  opacity: 1;
}

.gallery-cta {
  margin-top: 3rem;
  padding: 2rem;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  text-align: center;
}

.gallery-cta h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

.gallery-cta p {
  max-width: 640px;
  margin: 0 auto 1.25rem;
  color: #4b5563;
}

.gallery-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.88);
  backdrop-filter: blur(2px);
}

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

.lightbox-img {
  display: block;
  width: min(620px, 90vw, 82vh);
  height: min(620px, 90vw, 82vh);
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1.25rem;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2937;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1f2937;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev { left: -56px; }
.lightbox-next { right: -56px; }

.lightbox-close:hover,
.lightbox-nav:hover {
  background: #fff;
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

.lightbox-caption {
  position: absolute;
  left: 50%;
  bottom: -2.25rem;
  transform: translateX(-50%);
  color: #e5e7eb;
  font-size: 0.85rem;
  white-space: nowrap;
}

.lightbox-open {
  overflow: hidden;
}

/* Mobile */
@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.5rem;
  }

  .lightbox-img {
    width: min(620px, 92vw, 72vh);
    height: min(620px, 92vw, 72vh);
  }

  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }

  .lightbox-caption { bottom: -1.75rem; }
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary,
  .hero-buttons .btn-whatsapp {
    width: 100%;
    justify-content: center;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2.5rem 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
