/* =========================================================
   ROOSTERS PERI PERI - OFFERS STYLESHEET (THEME-READY)
========================================================= */

:root {
  --roosters-red: #D90429;
  --flame-yellow: #FFB800;
  --flame-orange: #FF5A00;
  
  /* Theme Fallback Variables (Dark Default) */
  --site-bg: #0f1117;
  --site-surface: #181d28;
  --site-card: #202736;
  --site-border: #283042;
  --site-text: #f1f5f9;
  --site-muted: #94a3b8;
}

body.light-theme {
  --site-bg: #f8fafc;
  --site-surface: #ffffff;
  --site-card: #ffffff;
  --site-border: #e2e8f0;
  --site-text: #0f172a;
  --site-muted: #64748b;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--site-bg);
  color: var(--site-text);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.5;
  transition: background-color 0.25s ease, color 0.25s ease;
}

main {
  flex: 1;
  padding: 3.5rem 6% 5rem;
}

/* Hero Headline */
.offers-hero {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 3.5rem;
}

.eyebrow {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--roosters-red);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.offers-hero h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 0.8rem;
  color: var(--site-text);
}

.offers-hero h1 span {
  background: linear-gradient(135deg, var(--flame-yellow), var(--flame-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.offers-hero p {
  color: var(--site-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* Grid of Deals */
.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.2rem;
  max-width: 1140px;
  margin: 0 auto;
}

.offer-card {
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.35s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.offer-card:hover {
  transform: translateY(-6px);
  border-color: rgba(217, 4, 41, 0.5);
  box-shadow: 0 15px 35px rgba(217, 4, 41, 0.18);
}

.offer-img-box {
  position: relative;
  height: 220px;
  background: var(--site-surface);
  overflow: hidden;
}

.offer-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.offer-card:hover .offer-img-box img {
  transform: scale(1.08);
}

.deal-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--roosters-red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 2;
}

.saving-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: var(--site-card);
  backdrop-filter: blur(6px);
  color: var(--flame-yellow);
  border: 1px solid rgba(255, 184, 0, 0.4);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 2;
}

.offer-details {
  padding: 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.offer-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--site-text);
  margin-bottom: 0.4rem;
}

.offer-desc {
  color: var(--site-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

/* =========================================================
   Flavours & Sides Trigger Controls on Offer Cards
========================================================= */
.flavour-selector {
  margin-top: 12px;
}

.selector-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--site-muted);
  text-transform: uppercase;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}

.menu-select {
  width: 100%;
  padding: 9px 12px;
  background: var(--site-surface);
  color: var(--site-text);
  border: 1px solid var(--site-border);
  border-radius: 7px;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.menu-select:focus {
  border-color: var(--flame-yellow);
}

.sides-trigger-wrap {
  margin-top: 12px;
}

.open-sides-btn {
  width: 100%;
  padding: 10px 14px;
  background: var(--site-surface);
  border: 1px dashed var(--site-border);
  border-radius: 7px;
  color: var(--site-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
}

.open-sides-btn:hover {
  background: var(--site-card);
  border-color: var(--flame-yellow);
}

.open-sides-btn.completed {
  border-color: #25D366;
  border-style: solid;
  color: #25D366;
  background: rgba(37, 211, 102, 0.08);
}

.sides-badge {
  background: var(--roosters-red);
  color: #fff;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 800;
}

.open-sides-btn.completed .sides-badge {
  background: #25D366;
}

/* Offer Bottom Bar */
.offer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.2rem;
  margin-top: 1.2rem;
  border-top: 1px solid var(--site-border);
}

.price-wrap {
  display: flex;
  flex-direction: column;
}

.old-price {
  color: var(--site-muted);
  text-decoration: line-through;
  font-size: 0.85rem;
  font-weight: 600;
}

.current-price {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--flame-yellow);
}

.btn-add-cart {
  background: linear-gradient(135deg, var(--roosters-red), #b0021e);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: 0.25s ease;
  box-shadow: 0 4px 15px rgba(217, 4, 41, 0.25);
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-add-cart:hover {
  background: #e60026;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(217, 4, 41, 0.4);
}

/* =========================================================
   Foodpanda-Style Sides Selection Popup Modal
========================================================= */
.sides-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.sides-modal.active,
.sides-modal.show {
  display: flex !important;
}

.sides-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.sides-modal-content {
  position: relative;
  background: var(--site-card);
  border: 1px solid var(--site-border);
  border-radius: 14px;
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.35);
  z-index: 2;
  overflow: hidden;
}

.sides-modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--site-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--site-surface);
}

.sides-modal-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--site-text);
  margin-bottom: 2px;
}

.modal-subtitle {
  font-size: 0.82rem;
  color: var(--flame-yellow);
  font-weight: 600;
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--site-muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal-btn:hover {
  color: var(--site-text);
}

.sides-modal-body {
  padding: 14px 22px;
  overflow-y: auto;
  flex: 1;
}

.sides-counter-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.side-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: 8px;
}

.side-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--site-text);
}

.pill-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.side-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--site-border);
  background: var(--site-card);
  color: var(--site-text);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.side-btn:hover:not(:disabled) {
  background: var(--roosters-red);
  border-color: var(--roosters-red);
  color: #fff;
}

.side-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.side-qty {
  font-size: 0.95rem;
  font-weight: 800;
  min-width: 18px;
  text-align: center;
  color: var(--site-text);
}

.sides-modal-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--site-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--site-surface);
}

.modal-status {
  font-size: 0.88rem;
  color: var(--site-muted);
}

.modal-status strong {
  color: var(--flame-yellow);
}

.confirm-sides-btn {
  background: var(--roosters-red);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.2s;
}

.confirm-sides-btn:hover {
  background: #b0021e;
}

/* Toast */
#toast {
  visibility: hidden;
  min-width: 260px;
  background-color: var(--site-card);
  color: var(--site-text);
  border: 1px solid var(--site-border);
  text-align: center;
  border-radius: 8px;
  padding: 14px 20px;
  position: fixed;
  z-index: 2000;
  right: 25px;
  bottom: 25px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  transform: translateY(20px);
  opacity: 0;
}

#toast.show {
  visibility: visible;
  transform: translateY(0);
  opacity: 1;
}

/* Floating WhatsApp */
.floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #25D366;
  color: #fff;
  padding: 12px 22px;
  border-radius: 50px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s ease;
}

.floating-whatsapp:hover {
  transform: scale(1.05);
}

/* Footer */
footer,
.offers-footer {
  background: var(--site-surface);
  border-top: 1px solid var(--site-border);
  padding: 3rem 6%;
  text-align: center;
  color: var(--site-muted);
  font-size: 0.85rem;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.footer-logo {
  height: 44px;
  margin: 0 auto 1rem;
  display: block;
}

.hotline-text { 
  margin-top: 0.6rem; 
  color: var(--site-text); 
}

.hotline-text a { 
  color: var(--site-text); 
  text-decoration: none; 
  font-weight: 700; 
}

.copyright { 
  margin-top: 1rem; 
  font-size: 0.75rem; 
  opacity: 0.7; 
}

/* Responsive */
@media (max-width: 480px) {
  .offers-hero h1 { font-size: 2rem; }
  .offers-grid { grid-template-columns: 1fr; }
  .sides-modal-content { max-height: 92vh; }
  .floating-whatsapp {
    bottom: 16px;
    right: 16px;
    padding: 10px 16px;
    font-size: 0.78rem;
  }
}