/* ==========================================================================
   Epson Printer Setup - Official-Style Layout & Theming
   Matching Official Epson Setup Portal (ij.start / epson.com)
   ========================================================================== */

:root {
  --epson-blue: #003399;
  --epson-blue-dark: #002266;
  --epson-blue-bar: #073874;
  --epson-blue-light: #edf2fa;
  --text-dark: #1e293b;
  --text-muted: #526477;
  --border-color: #cbd5e1;
  --border-light: #e2e8f0;
  --white: #ffffff;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.14);
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Roboto Slab', Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  color: var(--text-dark);
  background-color: #ffffff;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--epson-blue);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

button, input, select {
  font: inherit;
}

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

/* ==========================================================================
   Top Header Bar
   ========================================================================== */
.epson-header {
  background: var(--white);
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 99;
}

.epson-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.epson-nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.epson-logo-link {
  display: flex;
  align-items: center;
}

.epson-logo-img {
  max-height: 30px;
  width: auto;
  object-fit: contain;
}

.epson-menu-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.epson-menu-item {
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.epson-menu-item:hover,
.epson-menu-item.active {
  color: var(--epson-blue);
  border-bottom-color: var(--epson-blue);
  text-decoration: none;
}

.epson-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.epson-return-link {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.epson-return-link:hover {
  color: var(--epson-blue);
  text-decoration: none;
}

.epson-live-support-btn {
  background: var(--epson-blue-light);
  color: var(--epson-blue);
  border: 1px solid #c7d8f5;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.epson-live-support-btn:hover {
  background: var(--epson-blue);
  color: var(--white);
  border-color: var(--epson-blue);
}

/* ==========================================================================
   Breadcrumb Bar
   ========================================================================== */
.epson-breadcrumb-bar {
  background: #f8fafc;
  border-bottom: 1px solid #eef2f6;
  padding: 8px 0;
}

.epson-breadcrumb {
  font-size: 12.5px;
  color: #64748b;
}

.epson-breadcrumb a {
  color: #475569;
}

.epson-breadcrumb .sep {
  margin: 0 6px;
  color: #94a3b8;
}

/* ==========================================================================
   Hero & Search Section
   ========================================================================== */
.epson-hero-area {
  padding: 40px 0 30px;
  text-align: center;
}

.epson-main-title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.epson-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 30px;
}

.epson-search-box-card {
  max-width: 680px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.epson-search-label {
  display: block;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #334155;
  margin-bottom: 10px;
}

.epson-search-form {
  position: relative;
}

.epson-input-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  gap: 10px;
}

.epson-search-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
}

.epson-input-wrapper input {
  flex: 1;
  height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 16px 0 42px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.epson-input-wrapper input:focus {
  border-color: var(--epson-blue);
  box-shadow: 0 0 0 3px rgba(0, 51, 153, 0.12);
}

.epson-btn-search {
  height: 48px;
  padding: 0 28px;
  background: var(--epson-blue);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.epson-btn-search:hover {
  background: var(--epson-blue-dark);
}

.epson-search-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 10px;
}

.epson-suggestions-dropdown {
  position: absolute;
  top: 54px;
  left: 0;
  right: 110px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  z-index: 10;
  max-height: 200px;
  overflow-y: auto;
}

.epson-sugg-item {
  padding: 10px 14px;
  font-size: 13.5px;
  color: #334155;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}

.epson-sugg-item:hover {
  background: var(--epson-blue-light);
  color: var(--epson-blue);
}

/* ==========================================================================
   Accordion Header Bars
   ========================================================================== */
.epson-section-block {
  margin-top: 30px;
}

.epson-accordion-header {
  background: var(--epson-blue-bar);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.epson-accordion-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  margin: 0;
}

.accordion-arrow {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.epson-accordion-header.collapsed .accordion-arrow {
  transform: rotate(-90deg);
}

.epson-accordion-body {
  padding: 24px 0;
}

.epson-accordion-body.collapsed {
  display: none;
}

/* ==========================================================================
   Printer Types Grid (Matching Screenshot)
   ========================================================================== */
.epson-types-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.epson-type-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.epson-type-card:hover {
  border-color: var(--epson-blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.epson-type-img-box {
  width: 90px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.epson-type-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.card-icon {
  font-size: 38px;
  color: var(--epson-blue);
}

.epson-type-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
  line-height: 1.3;
}

.epson-type-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   Cloud Solutions Grid
   ========================================================================== */
.epson-cloud-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: #f8fafc;
  padding: 24px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

.cloud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.cloud-item i {
  font-size: 28px;
  color: var(--epson-blue);
  margin-bottom: 4px;
}

.cloud-item strong {
  font-size: 14px;
  color: #1e293b;
}

.cloud-item p {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   Recommended Promo Cards (Bottom Grid)
   ========================================================================== */
.epson-promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin: 40px 0 60px;
}

.epson-promo-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.promo-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #1e293b;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.promo-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.promo-links-list li a {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--epson-blue);
}

.highlight-card {
  background: linear-gradient(180deg, #f8fbff 0%, #edf4fc 100%);
  border-color: #c7d8f5;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.promo-card-content {
  flex: 1;
}

.promo-card-image {
  flex-shrink: 0;
  width: 125px;
  height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid #dbe6f5;
  box-shadow: var(--shadow-sm);
}

.promo-thumb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.promo-card-content p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.btn-epson-action {
  background: var(--epson-blue);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
  width: fit-content;
}

.btn-epson-action:hover {
  background: var(--epson-blue-dark);
}

/* ==========================================================================
   Multi-Column Footer
   ========================================================================== */
.epson-footer {
  background: #0f1e36;
  color: #94a3b8;
  padding: 50px 0 30px;
  margin-top: auto;
}

.epson-footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.3fr;
  gap: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 40px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  color: #94a3b8;
  font-size: 13px;
}

.footer-col ul li a:hover {
  color: #ffffff;
}

.newsletter-col p {
  font-size: 13px;
  margin-bottom: 12px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.newsletter-form input {
  flex: 1;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 0 10px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  outline: none;
}

.newsletter-form button {
  height: 38px;
  padding: 0 16px;
  background: var(--epson-blue);
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.footer-socials {
  display: flex;
  gap: 14px;
  font-size: 16px;
  color: #94a3b8;
}

.footer-socials i:hover {
  color: #ffffff;
  cursor: pointer;
}

.epson-footer-bottom {
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
}

.epson-bottom-disclaimer {
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
}

/* ==========================================================================
   Setup & Diagnostic Modal
   ========================================================================== */
.epson-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.epson-modal-backdrop.open {
  display: flex;
}

.epson-modal-card {
  background: var(--white);
  border-radius: 14px;
  max-width: 580px;
  width: 100%;
  padding: 30px;
  box-shadow: var(--shadow-lg);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.epson-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 24px;
  color: #94a3b8;
  cursor: pointer;
  line-height: 1;
}

.epson-modal-close:hover {
  color: #1e293b;
}

.epson-step-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--epson-blue);
  background: var(--epson-blue-light);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.epson-modal-card h2 {
  font-size: 23px;
  color: #1e293b;
  margin-bottom: 6px;
}

.epson-step-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.epson-selected-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 13.5px;
}

.epson-selected-pill strong {
  color: var(--epson-blue);
}

.epson-selection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.epson-card-btn {
  padding: 18px 14px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  color: #1e293b;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.epson-card-btn i {
  font-size: 26px;
  color: var(--epson-blue);
}

.epson-card-btn:hover {
  border-color: var(--epson-blue);
  background: var(--epson-blue-light);
  transform: translateY(-2px);
}

.epson-wizard-step {
  display: none;
}

.epson-wizard-step.active {
  display: block;
}

/* Scanning Box */
.epson-scan-spinner-wrap {
  text-align: center;
  padding: 20px 0;
}

.epson-scan-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid #dbeafe;
  border-top-color: var(--epson-blue);
  border-radius: 50%;
  animation: epsonSpin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes epsonSpin {
  to { transform: rotate(360deg); }
}

.epson-scan-percent {
  font-size: 28px;
  font-weight: 800;
  color: var(--epson-blue);
  margin-bottom: 12px;
}

.epson-scan-bar-track {
  max-width: 420px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto 14px;
}

.epson-scan-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--epson-blue);
  transition: width 0.2s linear;
}

.epson-scan-status-text {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

/* Error Banner */
.epson-error-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin-bottom: 14px;
}

.epson-error-banner i {
  font-size: 28px;
  color: #dc2626;
  flex-shrink: 0;
}

.epson-err-badge {
  font-size: 11px;
  font-weight: 800;
  color: #dc2626;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 4px;
}

.epson-error-banner h3 {
  font-size: 16px;
  color: #991b1b;
  margin-top: 4px;
}

.epson-warning-callout {
  background: #fff5f5;
  border-left: 3px solid #dc2626;
  padding: 12px 14px;
  border-radius: 0 6px 6px 0;
  font-size: 13.5px;
  color: #7f1d1d;
  margin-bottom: 18px;
}

.epson-report-table {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  font-size: 13.5px;
  margin-bottom: 24px;
}

.epson-report-table span {
  color: #64748b;
}

.epson-report-table strong {
  color: #0f172a;
}

.epson-actions-row {
  display: flex;
  gap: 12px;
}

.epson-btn-live-chat {
  flex: 2;
  background: var(--epson-blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.epson-btn-live-chat:hover {
  background: var(--epson-blue-dark);
}

.epson-btn-restart {
  flex: 1;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.epson-btn-restart:hover {
  background: #e2e8f0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .epson-types-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .epson-cloud-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .epson-promo-grid {
    grid-template-columns: 1fr;
  }
  .epson-footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .epson-types-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .epson-menu-nav {
    display: none;
  }
  .epson-main-title {
    font-size: 26px;
  }
  .epson-input-wrapper {
    flex-direction: column;
  }
  .epson-btn-search {
    width: 100%;
  }
  .epson-selection-grid {
    grid-template-columns: 1fr;
  }
  .epson-actions-row {
    flex-direction: column;
  }
  .epson-footer-cols {
    grid-template-columns: 1fr;
  }
}
