/* ==========================================================================
   Oiyaa Loyalty - Custom Styles
   Modern design system with myPos styling
   ========================================================================== */

/* ---------- Root Variables & Design Tokens ---------- */
:root {
  /* Color Palette */
  --navy: #103F69;
  --navy-deep: #0A2C4A;
  --sky: #D2E2F5;
  --sky-soft: #F3F7FC;
  --white: #FFFFFF;
  --ink: #10202E;
  --grey: #6B7B8C;
  --line: #E7ECF2;
  
  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 14px;
  --font-size-sm: 12px;
  --font-size-lg: 16px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  
  /* Layout */
  --container-lg: 1500px;
  --container-md: 1200px;
  --padding-container: 16px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-full: 999px;
  
  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(16, 63, 105, 0.08);
  --shadow-md: 0 18px 36px rgba(16, 63, 105, 0.12);
  --shadow-lg: 0 40px 70px rgba(10, 44, 74, 0.35);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
}

/* ---------- Base & Reset ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin: 0;
  color: var(--navy-deep);
}

h1 { font-size: clamp(28px, 5vw, 56px); }
h2 { font-size: clamp(26px, 3.2vw, 36px); }
h3 { font-size: clamp(18px, 2vw, 24px); }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
  margin: 0;
  color: var(--grey);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--navy);
}

img {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

/* ---------- Layout Containers ---------- */
.container-lg {
  max-width: var(--container-lg);
  margin: 0 auto;
  width: 100%;
}

.container {
  max-width: var(--container-md);
  margin: 0 auto;
  width: 100%;
}

.wrap {
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: 0 var(--padding-container);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: var(--font-weight-bold);
  font-size: 14.5px;
  padding: 14px 26px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 2px solid var(--navy);
  transition: transform var(--transition-fast), background var(--transition-fast);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--navy-deep);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
}

.btn-ghost:hover {
  background: var(--sky-soft);
}

.btn-secondary {
  background: var(--sky);
  color: var(--navy-deep);
  border-color: var(--sky);
}

.btn-secondary:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ---------- Header Navigation ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand img {
  height: 75px;
  width: auto;
  transition: height var(--transition-base);
}

nav.primary ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}

nav.primary a {
  font-weight: var(--font-weight-semibold);
  font-size: 16.5px;
  transition: color var(--transition-base);
}

nav.primary a:hover {
  color: var(--navy);
}

nav.primary a.active {
  color: var(--navy);
  font-weight: var(--font-weight-bold);
}

.nav-cta {
  display: flex;
  gap: 10px;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 80;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: all var(--transition-slow);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.nav-buttons {
  display: none;
}

/* ---------- Search Components ---------- */
.search-pill {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-full);
  padding: 7px 7px 7px 20px;
  box-shadow: var(--shadow-md);
  max-width: 480px;
  width: 100%;
}

.search-pill input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15.5px;
  padding: 11px 0;
  background: transparent;
  color: var(--ink);
  min-width: 0;
}

.search-pill input::placeholder {
  color: #98A6B4;
}

.search-pill button {
  border: none;
  background: var(--navy);
  color: var(--white);
  font-weight: var(--font-weight-bold);
  font-size: 14px;
  padding: 13px 22px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-base);
}

.search-pill button:hover {
  background: var(--navy-deep);
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  padding: 70px 0 90px;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  z-index: 0;
}

.blob-1 {
  width: 520px;
  height: 520px;
  background: var(--sky-soft);
  top: -220px;
  right: -160px;
}

.blob-2 {
  width: 200px;
  height: 200px;
  background: var(--sky);
  bottom: -60px;
  right: 22%;
  opacity: 0.7;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  align-items: center;
}

.hero .eyebrow {
  display: inline-block;
  font-weight: var(--font-weight-bold);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--sky-soft);
  border-radius: var(--radius-full);
  padding: 7px 16px;
}

.hero h1 {
  margin-top: 20px;
}

.hero p.sub {
  font-size: clamp(14px, 2vw, 16.5px);
  margin-top: 16px;
  max-width: 440px;
  line-height: 1.6;
}

.hero-mini-stats {
  display: flex;
  gap: 26px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.hero-mini-stats div {
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  color: var(--navy-deep);
}

.hero-mini-stats strong {
  display: block;
  font-size: 22px;
  font-weight: var(--font-weight-extrabold);
  color: var(--navy);
}

/* ---------- Phone Mock ---------- */
.phone-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone {
  width: 270px;
  background: var(--navy-deep);
  border-radius: 36px;
  padding: 14px;
  box-shadow: var(--shadow-lg);
}

.phone-screen {
  background: var(--white);
  border-radius: 24px;
  padding: 18px;
  height: 520px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.phone-screen .ps-search {
  background: var(--sky-soft);
  border-radius: var(--radius-full);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: var(--font-weight-semibold);
  color: var(--navy);
}

.deal-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.deal-card .avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: 0 0 auto;
}

.deal-card .meta {
  display: block;
  min-width: 0;
}

.deal-card .meta strong {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-card .meta span {
  font-size: 11px;
  color: var(--grey);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.deal-card .pct {
  margin-left: auto;
  font-size: 12px;
  font-weight: var(--font-weight-extrabold);
  color: var(--navy);
}

.float-tag {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: var(--font-weight-bold);
  color: var(--navy-deep);
  box-shadow: 0 14px 28px rgba(16, 63, 105, 0.14);
}

.float-tag.t1 {
  top: 8%;
  left: 0%;
}

.float-tag.t2 {
  bottom: 10%;
  right: 0%;
}

/* ---------- Bento Categories ---------- */
.bento {
  padding: 20px 0 80px;
}

.section-head {
  max-width: 560px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head p {
  margin-top: 12px;
  font-size: 15.5px;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 140px);
  gap: 16px;
}

.bento-tile {
  border-radius: 20px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
}

.bento-tile.big {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-tile h3 {
  font-size: 17px;
  color: var(--white);
}

.bento-tile.light h3 {
  color: var(--navy-deep);
}

.bento-tile p {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.8);
}

.bento-tile.light p {
  color: var(--grey);
}

.bento-tile svg {
  position: absolute;
  opacity: 0.16;
  width: 120px;
  height: 120px;
  right: -16px;
  bottom: -16px;
}

.bento-tile.light svg {
  opacity: 0.5;
}

.t-navy {
  background: var(--navy);
}

.t-navydeep {
  background: var(--navy-deep);
}

.t-sky {
  background: var(--sky);
}

.t-white {
  background: var(--white);
}

/* ---------- Timeline ---------- */
.timeline {
  background: var(--sky-soft);
  padding: 80px 0;
}

.tl-row {
  display: flex;
  gap: 0;
  position: relative;
}

.tl-item {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 14px;
}

.tl-item::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}

.tl-item:last-child::before {
  display: none;
}

.tl-dot {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-extrabold);
  margin: 0 auto 18px;
  position: relative;
  z-index: 1;
}

.tl-item h3 {
  font-size: 16px;
}

.tl-item p {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- App Section ---------- */
.app-section {
  padding: 80px 0;
}

.app-card {
  background: var(--navy);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  color: var(--white);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.app-card::after {
  content: '';
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  top: -140px;
  right: -100px;
}

.app-card h2 {
  color: var(--white);
}

.app-card p {
  color: #C9DBEE;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  max-width: 400px;
}

.store-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.store-row img {
  height: 44px;
  border-radius: var(--radius-sm);
}

.qr-block {
  background: var(--white);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.qr-grid {
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-grid img {
  width: 100% !important;
  height: 100% !important;
  border-radius: var(--radius-sm);
}

.qr-block span {
  font-size: 11.5px;
  font-weight: var(--font-weight-bold);
  color: var(--navy-deep);
}

/* ---------- Footer ---------- */
footer {
  padding: 56px 0 30px;
  font-size: 14px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.foot-brand img {
  height: 75px;
  width: auto;
  margin-bottom: 14px;
}

.foot-brand p {
  max-width: 260px;
  line-height: 1.6;
}

footer h4 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 16px;
  font-weight: var(--font-weight-bold);
}

footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

footer a {
  color: var(--grey);
}

footer a:hover {
  color: var(--navy);
}

.social-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.social-row a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  color: var(--navy);
  transition: all var(--transition-base);
}

.social-row a:hover {
  background: var(--sky-soft);
  border-color: var(--navy);
}

.newsletter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.newsletter-row input {
  flex: 1;
  min-width: 180px;
}

.foot-bottom {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--grey);
}

.foot-bottom .links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

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

/* ---------- Utility Classes ---------- */
.text-center {
  text-align: center;
}

.text-navy {
  color: var(--navy);
}

.text-grey {
  color: var(--grey);
}

.bg-sky-soft {
  background: var(--sky-soft);
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

/* ---------- Search Page Styles ---------- */
.search-row {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  position: sticky;
  top: 91px;
  z-index: 50;
}

.search-row .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.search-field {
  flex: 1;
  max-width: 600px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-full);
  padding: 7px 7px 7px 20px;
}

.search-field input {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  padding: 11px 0;
  background: transparent;
  color: var(--ink);
  min-width: 0;
}

.search-field input::placeholder {
  color: #98A6B4;
}

.search-field button {
  border: none;
  background: var(--navy);
  color: var(--white);
  font-weight: var(--font-weight-bold);
  font-size: 14px;
  padding: 13px 22px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-base);
}

.search-field button:hover {
  background: var(--navy-deep);
}

.results-count {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--grey);
}

/* Filter Chips */
.chips-row {
  padding: 16px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.chips-row::-webkit-scrollbar {
  height: 4px;
}

.chips-row::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 2px;
}

.chips-container {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-base);
}

.chip:hover {
  border-color: var(--navy);
  background: var(--sky-soft);
  color: var(--navy);
}

.chip.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* Search Results Grid */
.results {
  padding: 32px 0 70px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.saved-amount-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sky-soft);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-bold);
  color: var(--navy);
  font-size: 14px;
  margin-bottom: 20px;
}

/* Modern Card Design */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-media {
  height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discount-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--white);
  color: var(--navy-deep);
  font-size: 12px;
  font-weight: var(--font-weight-extrabold);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 14px rgba(16, 63, 105, 0.14);
  z-index: 2;
}

.fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: background var(--transition-base);
  border: none;
  z-index: 2;
}

.fav-btn:hover {
  background: var(--white);
}

.fav-btn i {
  color: var(--navy);
}

.card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.card-body h3 {
  font-size: 16px;
  margin: 0;
  cursor: pointer;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: -0.02em;
}

.card-body h3:hover {
  color: var(--navy);
}

.rating {
  font-size: 12.5px;
  font-weight: var(--font-weight-bold);
  color: var(--navy-deep);
  white-space: nowrap;
}

.rating span {
  color: var(--grey);
  font-weight: var(--font-weight-medium);
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.tag {
  font-size: 11.5px;
  font-weight: var(--font-weight-semibold);
  color: var(--grey);
  background: var(--sky-soft);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  font-size: 12.5px;
  color: var(--grey);
}

.card-foot strong {
  color: var(--navy-deep);
  cursor: pointer;
  font-weight: var(--font-weight-bold);
}

.card-foot strong:hover {
  text-decoration: underline;
}


label.error {
    color: #b94343 !important;
}
