/*
 * UYLALA COMPLETE FIX
 * Apple-level premium design - guaranteed to work
 * This overrides EVERYTHING and fixes all issues
 */

/* ===== FORCE APPLE FOUNDATION ===== */
* {
  box-sizing: border-box !important;
  -webkit-font-smoothing: antialiased !important;
}

html, body {
  margin: 0 !important;
  padding: 0 !important;
  background: #FFFFFF !important;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif !important;
}

body {
  font-size: 17px !important;
  line-height: 1.5 !important;
  color: #1D1D1F !important;
}

#root {
  background: #FFFFFF !important;
}

/* ===== FIX HEADER - APPLE STYLE ===== */
/* Top announcement bar */
body > div:nth-child(1),
header > div:first-child {
  background: #1D1D1F !important;
  color: #F5F5F7 !important;
  padding: 11px 0 !important;
  font-size: 14px !important;
  text-align: center !important;
  font-weight: 400 !important;
}

/* Main header */
header {
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: saturate(180%) blur(20px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  padding: 0 22px !important;
  height: 48px !important;
}

/* Header layout - force flexbox */
header > div,
header nav {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  max-width: 1024px !important;
  margin: 0 auto !important;
  height: 48px !important;
}

/* Logo container */
header h1,
header a[href="/"] {
  font-size: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* FORCE logo image to show */
header h1::before,
header a[href="/"]::before {
  content: '' !important;
  display: block !important;
  width: 100px !important;
  height: 42px !important;
  background: url('/logos/logo-400.png') no-repeat center !important;
  background-size: contain !important;
}

/* Navigation links */
header nav a,
header a:not([href="/"]) {
  color: #1D1D1F !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  opacity: 0.8 !important;
  transition: opacity 0.2s !important;
  text-decoration: none !important;
  padding: 0 8px !important;
}

header nav a:hover {
  opacity: 1 !important;
}

/* FIX ICON LAYOUT - Force horizontal */
header > div > div:last-child {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 20px !important;
}

/* Icons - make them inline */
header svg,
header [class*="icon"] {
  width: 20px !important;
  height: 20px !important;
  display: inline-block !important;
}

/* Bag button - make it inline */
header button,
header [class*="bag"] {
  background: #1D1D1F !important;
  color: #FFFFFF !important;
  border: none !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

/* ===== FIX MAIN CONTENT - SPACIOUS LIKE APPLE ===== */
main {
  background: #FFFFFF !important;
  padding: 0 !important;
}

/* Hero section - FULL WIDTH, SPACIOUS */
main > div:first-child,
main section:first-of-type {
  background: #FBFBFD !important;
  padding: 100px 40px !important;
  margin: 0 !important;
  min-height: 600px !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 60px !important;
  align-items: center !important;
  max-width: none !important;
  width: 100% !important;
}

/* Hero text side */
main > div:first-child > div:first-child {
  max-width: 580px !important;
  margin: 0 !important;
  padding: 0 40px !important;
}

/* Hero headings - LARGE like Apple */
main h1,
main h2:first-of-type {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif !important;
  font-size: 56px !important;
  line-height: 1.07 !important;
  font-weight: 600 !important;
  color: #1D1D1F !important;
  margin: 0 0 10px 0 !important;
  letter-spacing: -0.5px !important;
}

/* Subheading */
main p:first-of-type,
main div p {
  font-size: 21px !important;
  line-height: 1.4 !important;
  color: #6E6E73 !important;
  margin: 0 0 30px 0 !important;
}

/* Small label text */
main small,
main > div:first-child small {
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  color: #86868B !important;
  display: block !important;
  margin-bottom: 10px !important;
}

/* Buttons - Apple style */
main button,
main a[class*="button"] {
  background: #0071E3 !important;
  color: #FFFFFF !important;
  border: none !important;
  padding: 12px 22px !important;
  border-radius: 980px !important;
  font-size: 17px !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  margin: 8px 8px 8px 0 !important;
  display: inline-block !important;
  text-decoration: none !important;
  transition: background 0.2s !important;
}

main button:hover {
  background: #0077ED !important;
}

/* Secondary button */
main button:nth-of-type(2),
main a:nth-of-type(2) {
  background: transparent !important;
  color: #0071E3 !important;
  border: 1px solid #0071E3 !important;
}

/* Hero images side - Fix layout */
main > div:first-child > div:last-child {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
  height: 100% !important;
}

/* Images - clean and simple */
img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
}

/* ===== SECTIONS - SPACIOUS ===== */
section {
  padding: 80px 40px !important;
  max-width: 1024px !important;
  margin: 0 auto !important;
}

/* ===== PRODUCT GRID ===== */
[class*="grid"],
[class*="product"] {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 24px !important;
  margin: 40px 0 !important;
}

/* Product cards */
[class*="card"] {
  background: #FFFFFF !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  transition: transform 0.3s !important;
}

[class*="card"]:hover {
  transform: scale(1.02) !important;
}

/* ===== FOOTER - APPLE STYLE ===== */
footer {
  background: #F5F5F7 !important;
  padding: 40px !important;
  margin-top: 80px !important;
  color: #6E6E73 !important;
  font-size: 12px !important;
  text-align: center !important;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
  header {
    padding: 0 16px !important;
  }
  
  header h1::before {
    width: 80px !important;
    height: 35px !important;
  }
  
  main > div:first-child {
    grid-template-columns: 1fr !important;
    padding: 60px 20px !important;
    min-height: auto !important;
  }
  
  main h1,
  main h2:first-of-type {
    font-size: 40px !important;
  }
  
  main p:first-of-type {
    font-size: 19px !important;
  }
  
  section {
    padding: 60px 20px !important;
  }
}

/* ===== REMOVE ALL OLD STYLES ===== */
[style*="background: #fafaf8"],
[style*="background:#fafaf8"],
[style*="background: beige"] {
  background: #FFFFFF !important;
}

/* Force clean backgrounds */
main > *,
section,
div {
  background-color: transparent !important;
}

main > div:first-child {
  background: #FBFBFD !important;
}

/* ===== FINAL OVERRIDES ===== */
/* Kill any weird positioning */
header > div > div:last-child > * {
  position: static !important;
  float: none !important;
}

/* Ensure proper z-index */
header {
  z-index: 9999 !important;
}

/* Clean text rendering */
h1, h2, h3, h4, h5, h6, p, span, a, button {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', sans-serif !important;
}
