/* ═════════════════════════════════════════════════════════════════
 * BBF FOOD PRO 3.0 - OFFICIAL STYLESHEET
 * Designed for BabyFun Group Multi-Brand Food Ecosystem
 * ═════════════════════════════════════════════════════════════════ */

:root {
  --pink: #ee4385;
  --dark: #192137;
  --muted: #7b8494;
  --bg: #f7f8fc;
  --line: #e9eaf0;
  --bbf-pink: #ee4385;
  --bbf-pink-soft: #ffe4ee;
  --bbf-pink-text: #c91f63;
}

/* Flatsome & WordPress Theme Resets for seamless embedding */
.page:has(.bbf-food-app) .entry-header,
.page-id-51590 .entry-header {
  display: none !important;
}

.page:has(.bbf-food-app) #content.page-wrapper,
.page-id-51590 #content.page-wrapper {
  padding-top: 10px !important;
  padding-bottom: 30px !important;
  max-width: 100% !important;
  width: 100% !important;
}

.page:has(.bbf-food-app) .row.row-main,
.page-id-51590 .row.row-main {
  max-width: var(--flatsome-site-width, 1800px) !important;
  width: 100% !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.page:has(.bbf-food-app) .large-12.col,
.page-id-51590 .large-12.col,
.page:has(.bbf-food-app) .col-inner,
.page-id-51590 .col-inner {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Base Wrapper */
.bbf-food-app {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark);
  background: var(--bg);
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0 0 50px;
  width: 100% !important;
  max-width: 100% !important;
  line-height: 1.5;
}

.bbf-food-app * {
  box-sizing: border-box;
}

.bbf-food-app button,
.bbf-food-app input,
.bbf-food-app select {
  font: inherit;
}

.bbf-food-app button {
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Header */
.bbf-food-app header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.bbf-food-app .top {
  max-width: var(--flatsome-site-width, 1800px);
  margin: auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.bbf-food-app .logo {
  font-size: 24px;
  font-weight: 950;
  color: var(--pink);
  letter-spacing: -1.2px;
  cursor: pointer;
  line-height: 1.1;
  text-decoration: none;
}

.bbf-food-app .logo small {
  display: block;
  font-size: 9px;
  letter-spacing: 2px;
  color: #7a8091;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 2px;
}

.bbf-food-app .nav {
  display: flex;
  gap: 9px;
  margin-left: auto;
}

.bbf-food-app .nav button,
.bbf-food-app .pill {
  border: 0;
  border-radius: 30px;
  background: #f3f4f8;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 13.5px;
  color: #424a5a;
}

.bbf-food-app .nav button:hover,
.bbf-food-app .pill:hover {
  background: #e9ebf2;
}

.bbf-food-app .nav button.active,
.bbf-food-app .pill.active {
  background: #ffe4ee;
  color: #c91f63;
}

.bbf-food-app .cartBtn,
.bbf-food-app .primary {
  background: var(--pink);
  color: white;
  border: 0;
  border-radius: 13px;
  padding: 12px 18px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(238, 67, 133, 0.25);
}

.bbf-food-app .cartBtn:hover,
.bbf-food-app .primary:hover {
  background: #e02f74;
  transform: translateY(-1px);
}

/* Layout */
.bbf-food-app .layout {
  max-width: var(--flatsome-site-width, 1800px);
  margin: auto;
  padding: 24px;
}

/* Hero Section */
.bbf-food-app .hero {
  border-radius: 26px;
  min-height: 290px;
  background: radial-gradient(circle at 85% 20%, #ffbe76 0%, transparent 30%), linear-gradient(115deg, #e52f7c, #fa76a4 62%, #ffae91);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 48px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 30px rgba(229, 47, 124, 0.22);
}

.bbf-food-app .hero h1 {
  font-size: clamp(31px, 4vw, 56px);
  line-height: 1.08;
  margin: 12px 0;
  letter-spacing: -2px;
  max-width: 580px;
  font-weight: 900;
  color: #ffffff;
}

.bbf-food-app .hero p {
  max-width: 500px;
  opacity: 0.95;
  font-size: 15px;
  margin: 0;
  line-height: 1.6;
}

.bbf-food-app .hero .emoji {
  font-size: 130px;
  filter: drop-shadow(0 20px 20px rgba(139, 23, 76, 0.35));
  transform: rotate(-9deg);
  user-select: none;
  animation: bbfFloat 4s ease-in-out infinite alternate;
}

@keyframes bbfFloat {
  0% { transform: rotate(-9deg) translateY(0); }
  100% { transform: rotate(-6deg) translateY(-8px); }
}

.bbf-food-app .hero button {
  border: 0;
  background: #fff;
  color: #ce286d;
  padding: 13px 22px;
  border-radius: 12px;
  font-weight: 850;
  margin-top: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.bbf-food-app .hero button:hover {
  background: #fff0f5;
  transform: translateY(-1px);
}

.bbf-food-app .eyebrow {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Stats */
.bbf-food-app .stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 20px 0;
}

.bbf-food-app .stat {
  background: white;
  border: 1px solid var(--line);
  padding: 19px;
  border-radius: 17px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.bbf-food-app .stat b {
  display: block;
  font-size: 24px;
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 2px;
}

.bbf-food-app .stat span {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

/* Section Head */
.bbf-food-app .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 18px;
  gap: 16px;
}

.bbf-food-app .section-head h2 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.7px;
  font-weight: 900;
  color: var(--dark);
}

/* Brands Grid */
.bbf-food-app .brands {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px;
}

.bbf-food-app .brand {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  display: flex;
  align-items: center;
  padding: 22px;
  gap: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.bbf-food-app .brand:hover,
.bbf-food-app .product:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(23, 35, 68, 0.08);
  border-color: #fbcfe8;
}

.bbf-food-app .brand .visual {
  font-size: 54px;
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  border-radius: 19px;
  background: #fff0e5;
  flex-shrink: 0;
}

.bbf-food-app .brand:nth-child(2) .visual {
  background: #fff4d7;
}

.bbf-food-app .brand:nth-child(3) .visual {
  background: #e7f6ec;
}

.bbf-food-app .brand b {
  font-size: 18px;
  font-weight: 900;
  display: block;
  color: var(--dark);
}

.bbf-food-app .brand p {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 8px;
  line-height: 1.4;
}

/* Filters & Search */
.bbf-food-app .filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bbf-food-app .search {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 16px;
  background: white;
  min-width: 240px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bbf-food-app .search:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(238, 67, 133, 0.12);
}

/* Products Grid */
.bbf-food-app .products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
}

.bbf-food-app .product {
  background: white;
  border: 1px solid var(--line);
  border-radius: 21px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.bbf-food-app .product .photo {
  height: 155px;
  display: grid;
  place-items: center;
  font-size: 75px;
  background: linear-gradient(135deg, #fff0ed, #fff8eb);
  position: relative;
  user-select: none;
}

.bbf-food-app .product .tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  background: white;
  border-radius: 20px;
  padding: 5px 10px;
  font-weight: 850;
  color: #d42b6d;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.bbf-food-app .product .info {
  padding: 17px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.bbf-food-app .product .info small {
  color: var(--muted);
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bbf-food-app .product h3 {
  font-size: 16px;
  font-weight: 850;
  margin: 6px 0;
  color: var(--dark);
  line-height: 1.35;
}

.bbf-food-app .product p {
  font-size: 12.5px;
  color: var(--muted);
  min-height: 34px;
  margin: 0 0 14px;
  line-height: 1.45;
}

.bbf-food-app .price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.bbf-food-app .price strong {
  font-size: 17px;
  font-weight: 900;
  color: #d52d70;
}

.bbf-food-app .add {
  background: #ffe5ef;
  color: #d82e72;
  border: 0;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  font-size: 24px;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.bbf-food-app .add:hover {
  background: #fbcfe8;
  color: #be185d;
  transform: scale(1.06);
}

/* Panels */
.bbf-food-app .panel {
  display: none;
}

.bbf-food-app .panel.show {
  display: block;
  animation: bbfFadeIn 0.25s ease-out;
}

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

/* Two Columns (Cart / Order) */
.bbf-food-app .two {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

.bbf-food-app .surface {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.bbf-food-app .surface h2 {
  margin-top: 0;
  font-size: 20px;
  font-weight: 850;
  color: var(--dark);
  margin-bottom: 16px;
}

.bbf-food-app .order {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  gap: 12px;
}

.bbf-food-app .order:last-child {
  border-bottom: none;
}

.bbf-food-app .order small {
  color: var(--muted);
  font-size: 12.5px;
}

.bbf-food-app .row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.bbf-food-app .qty {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 5px 11px;
  font-weight: 800;
  font-size: 15px;
  color: var(--dark);
}

.bbf-food-app .qty:hover {
  background: #f1f5f9;
}

.bbf-food-app .summary {
  background: #fff0f5;
  border-radius: 16px;
  padding: 18px 20px;
  margin-top: 16px;
}

.bbf-food-app .summary div {
  display: flex;
  justify-content: space-between;
  margin: 9px 0;
  font-size: 14px;
}

.bbf-food-app .summary strong {
  font-size: 22px;
  font-weight: 900;
  color: #ce286d;
}

.bbf-food-app .muted {
  color: var(--muted);
}

.bbf-food-app .full {
  width: 100%;
  margin-top: 13px;
  font-size: 15px;
  padding: 14px 20px;
}

.bbf-food-app .secondary {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 12px 18px;
  font-weight: 750;
  color: #475569;
}

.bbf-food-app .secondary:hover {
  background: #f8fafc;
  color: var(--dark);
}

/* Toast */
.bbf-food-app .toast {
  position: fixed;
  right: 22px;
  bottom: 24px;
  background: #20283a;
  color: white;
  padding: 14px 22px;
  border-radius: 14px;
  display: none;
  z-index: 9999;
  font-weight: 650;
  font-size: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  animation: bbfToastUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Badges */
.bbf-food-app .badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 10px;
  background: #e7faef;
  color: #18894e;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Form Fields */
.bbf-food-app .fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bbf-food-app .fields label {
  font-size: 12.5px;
  font-weight: 750;
  color: #334155;
  display: flex;
  flex-direction: column;
}

.bbf-food-app .fields input,
.bbf-food-app .fields select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 13px;
  margin-top: 6px;
  font-size: 13.5px;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bbf-food-app .fields input:focus,
.bbf-food-app .fields select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(238, 67, 133, 0.12);
}

.bbf-food-app .notice {
  font-size: 12.5px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  padding: 13px 15px;
  border-radius: 12px;
  margin-top: 14px;
  line-height: 1.5;
}

/* Footer */
.bbf-food-app .footer {
  margin-top: 40px;
  padding: 30px;
  text-align: center;
  color: #9ba0ad;
  font-size: 12.5px;
  border-top: 1px solid var(--line);
}

/* VietQR Payment Modal */
.bbf-food-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.bbf-food-modal-backdrop.show {
  display: flex;
}

.bbf-food-modal-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 30px;
  width: 90%;
  max-width: 440px;
  text-align: center;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: bbfModalZoom 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bbfModalZoom {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.bbf-food-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: #f1f5f9;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  color: #64748b;
  display: grid;
  place-items: center;
}

.bbf-food-modal-close:hover {
  background: #e2e8f0;
  color: var(--dark);
}

.bbf-food-qr-image {
  max-width: 250px;
  width: 100%;
  margin: 12px auto;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Responsive Media Queries */
@media (max-width: 950px) {
  .bbf-food-app .products {
    grid-template-columns: repeat(2, 1fr);
  }
  .bbf-food-app .brands {
    grid-template-columns: 1fr 1fr;
  }
  .bbf-food-app .two {
    grid-template-columns: 1fr;
  }
  .bbf-food-app .nav {
    gap: 5px;
  }
  .bbf-food-app .nav button,
  .bbf-food-app .pill {
    padding: 9px 12px;
    font-size: 12.5px;
  }
  .bbf-food-app .hero .emoji {
    font-size: 85px;
  }
}

@media (max-width: 600px) {
  .bbf-food-app .top {
    padding: 12px 16px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .bbf-food-app .logo {
    font-size: 20px;
  }
  .bbf-food-app .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }
  .bbf-food-app .nav button {
    flex: 1;
    text-align: center;
    padding: 9px 6px;
    font-size: 12px;
  }
  .bbf-food-app .layout {
    padding: 14px;
  }
  .bbf-food-app .hero {
    padding: 26px 20px;
    min-height: 250px;
  }
  .bbf-food-app .hero .emoji {
    display: none;
  }
  .bbf-food-app .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .bbf-food-app .brands {
    grid-template-columns: 1fr;
  }
  .bbf-food-app .products {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .bbf-food-app .product .photo {
    height: 135px;
    font-size: 60px;
  }
  .bbf-food-app .product .info {
    padding: 14px;
  }
  .bbf-food-app .product h3 {
    font-size: 15px;
  }
  .bbf-food-app .section-head {
    flex-wrap: wrap;
    gap: 12px;
  }
  .bbf-food-app .search {
    width: 100%;
  }
  .bbf-food-app .fields {
    grid-template-columns: 1fr;
  }
}
