/* =========================
   GLOBAL RESET & TYPOGRAPHY
========================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; background: linear-gradient(180deg,#ffe6cc,#fff); color: #2c2c2c; line-height: 1.5; }
a { text-decoration: none; }

.app-container {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto; /* ✅ enables scroll */
  overflow-x: hidden; /* ✅ prevents sideways scroll only */
  padding-bottom: 80px; /* space for bottom nav */
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
html, body {
  height: 100%;
  overflow: hidden;
}
/* =========================
   HEADER
========================= */
header {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 24px;
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border: none;
  border-radius: 0;
}

header img.floating-logo {
    height: 92px;
    object-fit: contain;
}

header .header-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

header .header-icons a {
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

header .header-icons .btn-warning {
    background-color: #e66c00;
    color: #fff;
}
header .header-icons .btn-warning:hover {
    background-color: #ff9f1c;
    color: #fff;
}

header .header-icons .scheme-btn {
    background: #ff0000ff;
    color: #fff;
}
header .header-icons .scheme-btn:hover {
    background: #f12c2cff;
}

/* =========================
   DASHBOARD CARDS
========================= */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 16px;
}

.card {
  flex: 1 1 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 16px 20px;
  border-radius: 16px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  flex-direction: row;
  text-align: left;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card.active {
  border-left: 6px solid #ff7a00;
  box-shadow: 0 8px 20px rgba(255,122,0,0.3);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  flex-shrink: 0;
}

.card1 .card-icon { background: #ff7a00; }
.card2 .card-icon { background: #8e44ad; }
.card3 .card-icon { background: #2980b9; }

.card-content {
  text-align: right;
}
.card-title {
  font-size: 14px;
  color: #777;
  font-weight: 500;
}
.card-value {
  font-size: 20px;
  font-weight: 700;
  color: #222;
}

/* =========================
   SCHEME CARD
========================= */
.scheme-card {
    max-width: 440px; margin: 30px auto;
    background: linear-gradient(135deg, #ff7a00, #ffd27f);
    color: #fff; text-align: center;
    border-radius: 24px; padding: 28px 24px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.scheme-card:hover {
  transform: translateY(-6px); box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}
.scheme-title {
  font-size: 22px; font-weight: 700; margin-bottom: 8px;
}
.scheme-subtext {
  font-size: 15px; opacity: 0.9; margin-bottom: 20px;
}
.scheme-btn {
    display: inline-block;
    font-weight: 600; font-size: 15px;
    color: #ff7a00; background: #fff;
    padding: 12px 28px; border-radius: 30px;
    box-shadow: 0 4px 10px rgba(255,255,255,0.25);
    transition: all 0.3s ease;
}
.scheme-btn:hover {
  background: #ffe3c2; color: #ff6a00;
}

/* =========================
   SECTIONS
========================= */
.section-title {
    display: flex; justify-content: space-between; align-items: center;
    margin: 28px 16px 12px; font-size: 16px; font-weight: 600;
}
.section-title a { font-size: 14px; color: #ff5722; }
.horizontal-scroll {
    display: flex; overflow-x: auto; gap: 14px; padding-bottom: 12px; margin: 0 16px;
}
.horizontal-scroll::-webkit-scrollbar { display: none; }
.circle-item {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  min-width: 80px; font-size: 14px; color: #2c2c2c;
}
.circle-item img {
  width: 64px; height: 64px; border-radius: 50%; margin-bottom: 6px; object-fit: cover;
}

/* =========================
   PRODUCT GRID
========================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px; margin: 12px 16px 28px;
}
.product-card {
  background: #fff; border-radius: 16px; padding: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.05); transition: all 0.3s ease;
}
.product-card:hover {
  transform: translateY(-4px); box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}
.product-card img {
  width: 100%; border-radius: 12px; margin-bottom: 8px;
}
.price-row {
  display: flex; justify-content: space-between; font-size: 14px;
}
.old-price {
  text-decoration: line-through; color: #888;
}
.discount {
  color: #ffffff; font-weight: 600;
}

/* =========================
   SPECIAL LIST
========================= */
.special-list {
  display: flex; flex-direction: column; gap: 14px; margin: 12px 0px 28px;
}
.product-row {
  display: flex; align-items: center; background: #fff; border-radius: 16px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.05); padding: 12px; gap: 12px;
  transition: all 0.3s ease;
}
.product-row:hover {
  transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,0.08);
}
.product-row img {
  width: 70px; height: 70px; border-radius: 12px; object-fit: cover;
}
.product-info {
  flex-grow: 1;
}
.product-name a {
  font-weight: 600; color: #222; text-decoration: none;
}
.product-pkt {
  font-size: 13px; color: #777;
}
.qty-box {
  display: flex; align-items: center; gap: 6px;
}
.qty-btn {
  padding: 6px 12px; border: none; border-radius: 6px;
  background: #ff7a00; color: #fff; font-weight: 600; cursor: pointer;
  transition: all 0.2s ease;
}
.qty-btn:hover {
  background: #ff9500;
}

/* =========================
   MODAL
========================= */
.modal-content {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
  width: auto;
  max-width: 90%;
  margin: 0 auto;
}
.modal-body {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  padding-bottom: 60px; /* space for button outside image */
}
.modal-body img {
  max-height: 90vh;
  border-radius: 14px;
  display: block;
  margin: 0 auto;
}
.festive-border {
  position: relative;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffae00, #ff4d00, #ff6f00);
  padding: 4px;
  animation: borderGlow 2s infinite alternate;
  box-shadow: 0 0 25px rgba(255, 94, 0, 0.3);
}
@keyframes borderGlow {
  0% { box-shadow: 0 0 10px #ffae00, 0 0 25px #ff4d00; }
  100% { box-shadow: 0 0 20px #ff9100, 0 0 40px #ff3d00; }
}
.btn-close {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #000;
  color: #fff;
  font-size: 20px;
  padding: 8px 12px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index: 1056;
  transition: all 0.3s ease;
}
.btn-close:hover {
  background: #222;
  transform: translateX(-50%) translateY(10px) scale(1.1);
}

/* =========================
   BOTTOM NAV
========================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 0;
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  z-index: 100;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  color: #555;
  text-decoration: none;
}
.bottom-nav a i {
  font-size: 20px;
  margin-bottom: 2px;
}
.bottom-nav a.active {
  color: #ff8c00;
  font-weight: 600;
}

/* =========================
   MOBILE RESPONSIVE DESIGN
========================= */
@media (max-width: 768px) {
  body { font-size: 14px; padding-bottom: 80px; }
  header { padding: 16px 16px; }
  header img.floating-logo { height: 90px; }
  header .header-icons a { font-size: 13px; padding: 6px 12px; }
  .cards { flex-direction: column; gap: 12px; margin: 14px 12px; }
  .card { padding: 12px; border-radius: 12px; flex-direction: column; text-align: center; align-items: center; }
  .card-content { text-align: center; margin-top: 8px; }
  .card-title { font-size: 13px; }
  .card-value { font-size: 18px; }
  .card-icon { width: 50px; height: 50px; font-size: 24px; }
  .scheme-card { margin: 20px 12px; padding: 20px 16px; border-radius: 20px; }
  .scheme-title { font-size: 18px; }
  .scheme-subtext { font-size: 13px; }
  .scheme-btn { font-size: 14px; padding: 10px 20px; }
  .section-title { margin: 20px 12px 10px; font-size: 15px; }
  .section-title a { font-size: 13px; }
  .horizontal-scroll { margin: 0 10px; gap: 10px; }
  .circle-item { min-width: 70px; font-size: 12px; }
  .circle-item img { width: 54px; height: 54px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 10px 12px 20px; }
  .product-card { padding: 10px; border-radius: 12px; }
  .product-card img { border-radius: 10px; }
  .product-card .fw-bold { font-size: 13px; }
  .price-row { font-size: 12px; flex-wrap: wrap; }
  .special-list { margin: 8px -25px 0px; gap: 10px; }
  .product-row { flex-direction: row; align-items: center; padding: 10px; border-radius: 12px; }
  .product-row img { width: 58px; height: 58px; }
  .product-info .product-name a { font-size: 13px; }
  .product-pkt { font-size: 12px; }
  .qty-box { flex-direction: row; gap: 4px; }
  .qty-btn { font-size: 13px; padding: 5px 10px; border-radius: 6px; }
  .modal-body img { max-height: 90vh; border-radius: 12px; }
  .btn-close { font-size: 18px; padding: 6px 10px; }
  .btn-close:hover { background: #222; transform: translateX(-50%) scale(1.1); }
  .bottom-nav { padding: 8px 0; border-radius: 16px 16px 0 0; box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.08); }
  .bottom-nav a { font-size: 12px; }
  .bottom-nav i { font-size: 18px; margin-bottom: 2px; }
  .horizontal-scroll { scrollbar-width: none; }
  .horizontal-scroll::-webkit-scrollbar { display: none; }
}

@media (max-width: 480px) {
  header img.floating-logo { height: 75px; }
  .scheme-card { padding: 16px 12px; }
  .scheme-title { font-size: 16px; }
  .scheme-subtext { font-size: 12px; }
  .scheme-btn { padding: 8px 16px; font-size: 13px; }
  .card { flex-direction: row; text-align: left; }
  .card-content { text-align: right; }
  .product-card .fw-bold { font-size: 12px; }
  .bottom-nav a i { font-size: 20px; padding: 6px; }
  .bottom-nav a span { font-size: 10px; }
}

/* =========================
   PROFILE HEADER ADDITION
========================= */
.top-header {
  display: flex;
  padding: 16px 24px;
  align-items: center;
  gap: 16px;
  background-color: #fff3e0;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 4px 16px rgba(255, 122, 0, 0.35);
  margin-bottom: 16px;
}
.top-header .profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.top-header .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 8px rgba(255,111,0,0.6);
}
.top-header .welcome-text {
  display: flex;
  flex-direction: column;
  padding-top: 10px; 
}
.top-header .hi {
  font-weight: 600;
  font-size: 14px;
  color: #663300;
  margin-bottom: 0;
}
.top-header .name {
  font-weight: 700;
  font-size: 16px;
  color: #ff6f00;
}

/* Success Toast */
#success-toast {
  max-width: 480px;
  margin: 0 auto 16px;
  padding: 12px 20px;
  background: #4caf5080;
  color: #fff;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#success-toast.show {
  opacity: 1;
  pointer-events: auto;
}

#scrollArea {
    position: absolute;
    top: 80px;     /* header height */
    bottom: 70px;  /* footer height */
    left: 0;
    right: 0;
    overflow-y: auto;
    padding: 10px 0;
}

/* Footer Cart Box */
.cart-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%); /* Center align */
    width: 100%;
    max-width: 450px;   /* match your app container width */
    background: #ffffff;
    padding: 20px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.15);
    border-radius: 16px 16px 0 0;
    transition: transform .35s ease, opacity .35s ease;
    z-index: 9999;
}

/* Hidden State */
.cart-footer.hidden {
    transform: translate(-50%, 110%); /* slide down while centered */
    opacity: 0;
}


/* Normal button — NOT FIXED */
.cart-toggle-btn {
    background: #ff7300;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    margin: 20px 0; 
}

/* Details inside card */
.row-line {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
    color: #555;
    font-size: 15px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    margin: 12px 0;
    font-size: 17px;
}

.total-amount {
    color: #ff6b00;
}

/* Buttons */
.place-order-btn {
    width: 100%;
    background: linear-gradient(90deg, #ff8b1f, #ff7300);
    border: none;
    padding: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 15px;
}

.close-cart-btn {
     background: #ff4d4d;
    border: none;
    color: #fff;
    font-size: 16px;
    padding: 5px 12px;
    border-radius: 50px;
    float: right;
    cursor: pointer;
    margin-bottom: 57px;
    margin: -30px -17px;
}


/* PLAN CARD */
.plan-card {
  background: #fff7ef;
  margin: 25px 16px;
  padding: 24px 20px;
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(255,122,0,0.15);
  transition: all 0.3s ease;
}
.plan-card:hover {
  transform: scale(1.01);
}
.plan-title {
  font-size: 22px;
  font-weight: 700;
  color: #ff6f00;
  text-align: center;
  margin-bottom: 15px;
}
.plan-info {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed #ffd8a8;
  font-size: 15px;
  color: #555;
}
.plan-info:last-child {
  border-bottom: none;
}

.see-all {
    text-align: center;
    margin-top: 8px;
}

.see-all a {
    color: #007bff;
    font-weight: 500;
    display: inline-block;
}

