/* style.css - Clean, Minimal, Responsive, Premium Upgrades */

:root{
  --primary:#0b4d8f;
  --muted:#666;
  --card:#fff;
  --bg:#f6f8fb;
  --accent:#e6f0fb;
  --max-width:980px;
}

*{box-sizing:border-box;}
body{
  font-family: 'Inter', "Segoe UI", Roboto, Arial, sans-serif;
  margin:0;
  color:#222;
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.45;
}

/* Container */
.container{
  width:92%;
  max-width:var(--max-width);
  margin:0 auto;
  padding:20px 0;
}

/* NAVIGATION */
.header{
  background:#fff;
  border-bottom:1px solid #e6e9ef;
  position:sticky;
  top:0;
  z-index:50;
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 0;
  width:92%;
  max-width:var(--max-width);
  margin:0 auto;
}
.brand{
  display:flex;
  gap:12px;
  align-items:center;
  text-decoration:none;
  color:var(--primary);
}
.brand .logo{
  width:44px;
  height:44px;
  background:var(--accent);
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--primary);
  font-weight:700;
  font-size:1.2rem;
}
.nav{
  display:flex;
  gap:14px;
  align-items:center;
}
.nav a{
  color:#333;
  text-decoration:none;
  padding:8px 10px;
  border-radius:6px;
  font-weight:600;
}
.nav a:hover{ background:#f2f6fb; color:var(--primary); }
.nav a.active{ background:var(--primary); color:#fff; }

/* HERO */
.hero{
  background: linear-gradient(180deg, #fff, #fbfdff);
  border-radius:10px;
  box-shadow:0 6px 18px rgba(14,30,60,0.04);
  padding:28px;
  margin-top:18px;
}
.hero h1{ margin:0 0 6px 0; font-size:1.6rem; color:#0b3e6b; }
.hero p{ margin:0 0 14px 0; color:var(--muted); }

/* SEARCHBAR */
.searchbar{
  display:flex;
  gap:8px;
  align-items:center;
}
.searchbar input{
  flex:1;
  padding:10px 12px;
  border:1px solid #e1e6f0;
  border-radius:8px;
  font-size:15px;
}
.searchbar button{
  padding:10px 14px;
  background:var(--primary);
  color:#fff;
  border:none;
  border-radius:8px;
  cursor:pointer;
  font-weight:700;
}

/* CATEGORIES GRID */
.categories{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:18px;
}
.category-card{
  background:#fff;
  padding:16px;
  border-radius:12px;
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:#222;
  box-shadow:0 4px 12px rgba(15,30,60,0.03);
  transition:all 0.2s ease;
}
.category-card:hover{ transform:translateY(-3px); }
.cat-icon{
  width:46px;height:46px;border-radius:8px;background:var(--accent);display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--primary)
}

/* FEATURED & CARDS */
.section-title{ margin:24px 0 8px 0; font-size:1.05rem; color:#0b3e6b; }
.cards{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}
.card{
  background:var(--card);
  padding:12px;
  border-radius:10px;
  box-shadow:0 4px 14px rgba(12,24,48,0.03);
  transition:all 0.2s ease;
}
.card:hover{ transform:translateY(-2px); }
.card h3{ margin:0 0 6px 0; font-size:1rem;}
.card p{ margin:0; color:var(--muted); font-size:0.95rem; }

/* LISTING ROWS */
.listing{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.list-row{
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  border:1px solid #f0f3f8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition:all 0.2s ease;
}
.list-row:hover{
  transform:translateY(-2px);
}
.list-left{ max-width:70%; }
.list-left h4{ margin:0 0 6px 0; font-size:1rem; color:#133a63; }
.meta{ color:var(--muted); font-size:0.92rem; }

/* CTA */
.cta{
  background:linear-gradient(90deg,#e8f3ff,#fff);
  border:1px solid #d7eefe;
  padding:14px;
  border-radius:10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-top:18px;
  flex-wrap:wrap;
}
.cta a.button{
  padding:10px 16px;
  background:var(--primary);
  color:#fff;
  border-radius:8px;
  font-weight:700;
  text-decoration:none;
  transition:0.2s;
}
.cta a.button:hover{ background:#0052d1; }

/* FOOTER */
.footer{
  margin-top:28px;
  padding:20px 0;
  color:var(--muted);
  text-align:center;
  font-size:0.95rem;
}

/* RESPONSIVE */
@media (max-width:800px){
  .categories{ grid-template-columns:repeat(2,1fr); }
  .cards{ grid-template-columns:1fr; }
  .header-inner{ padding:10px; gap:8px; }
}
@media (max-width:520px){
  .categories{ grid-template-columns:repeat(1,1fr); }
  .nav{ display:none; } /* minimal nav on mobile */
  .brand{ gap:8px; }
  .hero h1{ font-size:1.2rem; }
  .searchbar input{ width:100%; }
}

/* AUTOCOMPLETE / SUGGESTIONS */
.suggestions-box {
  margin-top: 5px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-height: 180px;
  overflow-y: auto;
  display: none;
  position: absolute;
  width: 100%;
  z-index: 50;
}
.suggestion-item {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}
.suggestion-item:hover {
  background: #f7f7f7;
}

.verified-badge {
  display:inline-block;
  background:#0b4d8f;
  color:#fff;
  font-size:0.75rem;
  font-weight:600;
  padding:2px 6px;
  border-radius:6px;
  text-transform:uppercase;
  margin-left:6px;
}

/* =========================================
   FIX FOR NATURAL TEXT FLOW IN LISTINGS
   ========================================= */
.list-left {
  min-width: 0; /* allows flex children to shrink properly */
}

.list-left h4,
.list-left .meta {
  white-space: normal; /* allow wrapping naturally */
  word-break: break-word; /* prevents long words from overflowing */
}
/* Fix listing text flow */
.list-row {
  flex-wrap: wrap; /* allow children to wrap instead of shrinking */
  align-items: flex-start; /* let text take natural height */
}

.list-left {
  max-width: 100%; /* allow full width for text */
  flex: 1 1 auto; /* allow it to grow and shrink */
}

.list-left h4,
.list-left .meta {
  white-space: normal;
  word-break: break-word;
}
/* stylin for featured*/
.offer-card {
    position: relative;
    overflow: hidden;
}

.featured-ribbon {
    position: absolute;
    top: 15px;
    left: -40px;
    background: #ff9800;
    color: white;
    padding: 6px 45px;
    font-size: 12px;
    font-weight: bold;
    transform: rotate(-45deg);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

/* The main area where the wheel lives */
.wheel-area {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0; /* Gives the wheel some breathing room */
    background: #ffffff; /* Matches card background */
}

#wheel-canvas {
    width: 280px !important; /* Fixed professional size */
    height: 280px !important;
    border-radius: 50%;
    border: 8px solid #2c3e50;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1), inset 0 0 15px rgba(0,0,0,0.2);
    transition: transform 5s cubic-bezier(0.15, 0, 0.2, 1);
    cursor: pointer;
}

.wheel-pointer {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0; 
    height: 0; 
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid #e74c3c;
    z-index: 10;
    filter: drop-shadow(0 3px 2px rgba(0,0,0,0.2));
}

#spin-btn {
    position: absolute;
    z-index: 11;
    background: #2c3e50;
    color: white;
    border: 4px solid #fff;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

#spin-btn:hover {
    transform: translate(0, 0) scale(1.1); /* Keeps it centered while growing */
    background: #34495e;
}

/* Ensure the card looks cohesive */
.offer-card {
    overflow: hidden;
    border-radius: 15px;
    border: 1px solid #eee;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); /* Darken background */
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px); /* Modern blur effect */
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.confetti-icon { font-size: 50px; margin-bottom: 10px; }
.modal-content h2 { margin: 0; color: #2c3e50; }

#winner-text {
    font-size: 22px;
    font-weight: bold;
    color: #e74c3c;
    margin: 20px 0;
    text-transform: uppercase;
}

.claim-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.claim-btn:hover { background: #219150; transform: scale(1.05); }