/* ═══════════════════════════════════════════════════════════
   SUNCONNECT — Global Stylesheet
   Shared by all blade views
   ═══════════════════════════════════════════════════════════ */

/* ── FONTS ── */
@font-face {
  font-family: 'Muller';
  src: url('../muller-font/muller-light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: 'Muller';
  src: url('../muller-font/muller-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Muller';
  src: url('../muller-font/muller-medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'Muller';
  src: url('../muller-font/muller-bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

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

/* ── VARIABLES ── */
:root {
  --blue: #3bbdaf;
  --blue-dark: #2da090;
  --blue-light: #e5f7f5;
  --orange: #f26522;
  --orange-dark: #d9541a;
  --gray-bg: #f0f1f7;
  --gray-card: #f5f6fa;
  --text-primary: #3c4146;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --white: #ffffff;
  --border: #e5e7eb;
  --radius: 14px;
  --bottom-nav-height: 64px;
}

/* ── BASE ── */
body {
  font-family: 'Muller', 'Inter', sans-serif;
  background: var(--white);
  color: var(--text-primary);
  line-height: 1.5;
  padding-bottom: var(--bottom-nav-height);
  -webkit-font-smoothing: antialiased;
}

/* ── APP HEADER ── */
.header-nav {
  display: none;
}
.app-header {
  background: var(--white);
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.app-header.scrolled {
  border-bottom-color: var(--border);
}
.app-header.hero-transparent { background: transparent; }
.app-header.hero-transparent .logo { color: #fff; }
.app-header.hero-transparent .logo img { filter: brightness(0) invert(1); }
.app-header.hero-transparent .header-nav a { color: rgba(255,255,255,0.88); }
.app-header.hero-transparent .header-nav a:hover { color: #fff; }
.app-header.hero-transparent .header-signin,
.app-header.hero-transparent .header-account,
.app-header.hero-transparent .icon-btn { color: #fff; }
.app-header.hero-transparent.scrolled { background: var(--white); border-bottom-color: var(--border); }
.app-header.hero-transparent.scrolled .logo { color: var(--text-primary); }
.app-header.hero-transparent.scrolled .logo img { filter: none; }
.app-header.hero-transparent.scrolled .header-nav a { color: var(--text-primary); }
.app-header.hero-transparent.scrolled .header-signin,
.app-header.hero-transparent.scrolled .header-account,
.app-header.hero-transparent.scrolled .icon-btn { color: var(--text-primary); }
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 17px;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo img { height: 32px; width: auto; display: block; }
.header-actions { display: flex; gap: 4px; align-items: center; }

.header-signin { display: none; }
.header-account { display: none; }
@media (min-width: 640px) {
  .header-signin {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: 50px;
    border: 1.5px solid var(--border);
    background: var(--white);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s;
    text-decoration: none;
  }
  .header-signin:hover { border-color: var(--blue); color: var(--blue); }
  .header-signin i { font-size: 14px; }
  .header-account {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
    transition: color 0.15s;
  }
  .header-account:hover { color: var(--blue-dark); }
  .header-account i { font-size: 16px; }
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.icon-btn:hover { background: none; color: var(--blue); }

.cart-badge,
.wishlist-badge,
.notification-badge {
  position: absolute;
  top: 6px; right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--orange);
  color: var(--white);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wishlist-badge:empty,
.notification-badge:empty { display: none; }
.header-icon-wrap { position: relative; display: inline-flex; }

/* ── BREADCRUMB ── */
.breadcrumb {
  padding: 12px 16px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-secondary); text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { font-size: 10px; color: var(--text-muted); }
.breadcrumb .current { color: var(--blue); font-weight: 600; }

/* ── SITE FOOTER ── */
.site-footer {
  background: #1e2428;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}
.footer-top {
  padding: 48px 16px 36px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand { max-width: 280px; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 17px;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.footer-logo img { height: 30px; width: auto; }
.footer-brand p {
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(255,255,255,0.5);
  margin-bottom: 18px;
}
.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.social-btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.footer-links-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 16px;
}
.footer-col h5 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-col ul li a:hover { color: var(--blue); }
.footer-col ul li a i { font-size: 11px; color: var(--blue); flex-shrink: 0; }
.footer-newsletter h5 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 8px;
}
.footer-newsletter p {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 12px;
  line-height: 1.55;
}
.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.15s;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.3); }
.newsletter-form input:focus { outline: none; border-color: var(--blue); }
.newsletter-form button {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: var(--blue);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.newsletter-form button:hover { background: var(--orange); }
.footer-bottom {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}
.footer-bottom-copy { font-size: 12px; color: rgba(255,255,255,0.35); }
.footer-bottom-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.footer-bottom-links a { font-size: 12px; color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.15s; }
.footer-bottom-links a:hover { color: var(--blue); }

/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 200;
  padding: 0 4px;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 10px;
  transition: color 0.15s;
  min-width: 48px;
}
.bottom-nav a i { font-size: 19px; }
.bottom-nav a.active { color: var(--blue); }
.bottom-nav a:hover { color: var(--orange); }

/* ── PAGE LOADER ── */
#page-loader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 1;
  pointer-events: all;
  transition: opacity 0.3s ease;
}
#page-loader.hidden { opacity: 0; pointer-events: none; }
.loader-logo { height: 48px; width: auto; }
.loader-spinner {
  width: 32px; height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #f26522;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── ANIMATIONS ── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-fade-in { animation: fadeIn 0.25s ease both; }

/* ── TOAST ── */
.toast { position: fixed; bottom: calc(var(--bottom-nav-height) + 80px); left: 50%; transform: translateX(-50%) translateY(20px); background: #1a2e2c; color: var(--white); padding: 10px 20px; border-radius: 50px; font-size: 13px; font-weight: 600; opacity: 0; transition: opacity 0.2s, transform 0.2s; z-index: 300; white-space: nowrap; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── DESKTOP SHARED ── */
@media (min-width: 640px) {
  body { padding-bottom: 0; }
  .app-header { padding: 0 32px; }
  .bottom-nav { display: none; }
  .header-nav { display: flex; align-items: center; gap: 4px; }
  .header-nav a { font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; padding: 6px 12px; border-radius: 8px; transition: color 0.15s, background 0.15s; }
  .header-nav a:hover { color: var(--blue); background: none; }
  .header-nav a.active { color: var(--blue); }
  .footer-top { padding: 56px 32px 44px; flex-direction: row; flex-wrap: wrap; gap: 40px 48px; }
  .footer-brand { flex: 0 0 220px; }
  .footer-links-grid { grid-template-columns: repeat(3, auto); flex: 1; }
  .footer-newsletter { flex: 1; min-width: 220px; }
  .footer-bottom { flex-direction: row; justify-content: space-between; padding: 18px 32px; text-align: left; }
}
@media (min-width: 1024px) {
  .app-header { padding: 0 48px; }
  .footer-top { padding: 64px 48px 52px; }
  .footer-bottom { padding: 18px 48px; }
}

/* ── GLOBAL SEARCH OVERLAY ── */
.search-overlay {
  position: fixed; inset: 0; z-index: 1100;
  display: flex; align-items: flex-start; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-overlay-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
}
.search-overlay-panel {
  position: relative; z-index: 1;
  width: calc(100% - 32px); max-width: 640px;
  margin-top: 72px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
  transform: translateY(-10px);
  transition: transform 0.2s ease;
}
.search-overlay.open .search-overlay-panel { transform: translateY(0); }

.search-overlay-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.search-overlay-input-wrap > .fa-magnifying-glass { color: var(--text-muted); font-size: 15px; flex-shrink: 0; }
.search-overlay-input-wrap input {
  flex: 1; border: none; outline: none;
  font-size: 15px; font-family: inherit;
  color: var(--text-primary); background: transparent;
}
.search-overlay-input-wrap input::placeholder { color: var(--text-muted); }
.search-overlay-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 17px; padding: 4px;
  display: flex; align-items: center; transition: color 0.15s;
}
.search-overlay-close:hover { color: var(--text-primary); }

.search-suggestions { max-height: 400px; overflow-y: auto; }
.search-hint {
  padding: 16px 20px; font-size: 12.5px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.search-loading { padding: 20px; text-align: center; font-size: 13px; color: var(--text-muted); }
.search-no-results { padding: 20px; text-align: center; font-size: 13px; color: var(--text-muted); }

.search-suggestion-item {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 18px; text-decoration: none; color: inherit;
  transition: background 0.1s; border-bottom: 1px solid var(--border);
}
.search-suggestion-item:last-of-type { border-bottom: none; }
.search-suggestion-item:hover { background: var(--gray-bg); }
.search-item-img {
  width: 46px; height: 46px; border-radius: 8px; flex-shrink: 0;
  overflow: hidden; background: var(--gray-card);
  display: flex; align-items: center; justify-content: center;
}
.search-item-img img { width: 100%; height: 100%; object-fit: cover; }
.search-img-placeholder { color: var(--text-muted); font-size: 18px; }
.search-item-info { flex: 1; min-width: 0; }
.search-item-name {
  font-size: 13.5px; font-weight: 600; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-item-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.search-item-price { font-size: 13px; font-weight: 700; color: var(--blue); flex-shrink: 0; }

.search-see-all {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; font-size: 13px; font-weight: 600; color: var(--blue);
  text-decoration: none; background: var(--blue-light); transition: background 0.15s;
}
.search-see-all:hover { background: #d0f0ec; }

@media (max-width: 640px) {
  .search-overlay-panel { width: 100%; margin-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
}
