:root {
      --green: #24483B;
      --green-dark: #18352A;
      --green-light: #EEF3F0;
      --cream: #F7F6F2;
      --white: #FFFFFF;
      --text: #1F2924;
      --muted: #77817C;
      --border: #E3E7E3;
      --danger: #A64B4B;
    }


    * {
      box-sizing: border-box;
    }


    html {
      scroll-behavior: smooth;
    }


    body {
      margin: 0;
      background: var(--cream);
      color: var(--text);
      font-family:
        Arial,
        Helvetica,
        sans-serif;
    }


    button,
    input,
    select {
      font: inherit;
    }


    button {
      -webkit-tap-highlight-color: transparent;
    }


    /* =====================
       HEADER
    ===================== */

    .header {
      padding: 32px 20px 28px;
      text-align: center;
      background: var(--cream);
    }


    .brand {
      color: var(--green);
      font-size: 28px;
      font-weight: 700;
      letter-spacing: 4px;
    }


    .tagline {
      margin-top: 10px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 2px;
      text-transform: uppercase;
    }


    /* =====================
       MAIN
    ===================== */

    .page {
      width: 100%;
      max-width: 760px;
      margin: 0 auto;
      padding: 0 16px 120px;
    }


    .section {
      margin-top: 20px;
      padding: 22px;
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 18px;
    }


    .section-heading {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      margin-bottom: 18px;
    }


    .section-heading h2 {
      margin: 0;
      color: var(--green);
      font-size: 13px;
      letter-spacing: 1.4px;
    }


    .section-note {
      margin-top: 7px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.5;
    }


    /* =====================
       CATEGORY FILTER
    ===================== */

    .category-filter {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 9px;
      width: 100%;
      margin-bottom: 20px;
      overflow: visible;
      padding-bottom: 0;
    }


    .category-btn {
      flex: 0 0 auto;
      min-height: 38px;
      padding: 0 16px;
      border: 1px solid var(--border);
      border-radius: 999px;
      background: var(--white);
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: .5px;
      cursor: pointer;
      transition: .2s ease;
    }


    .category-btn.active {
      background: var(--green);
      border-color: var(--green);
      color: var(--white);
    }


    /* =====================
       PRODUCTS
    ===================== */

    .products-container {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }


    .product-card {
      overflow: hidden;
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 16px;
    }


    .product-image-wrap {
      width: 100%;
      aspect-ratio: 1 / 1;
      overflow: hidden;
      background: var(--green-light);
    }


    .product-image {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }


    .image-placeholder {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      height: 100%;
      font-size: 38px;
      background: var(--green-light);
    }


    .product-content {
      padding: 14px;
    }


    .product-name {
      margin: 0 0 8px;
      min-height: 60px;
      line-height: 1.25;
      margin: 0;
      color: var(--text);
      font-size: 15px;
    }


    .product-category {
      min-height: 24px;
      margin-bottom: 16px;
      margin-top: 5px;
      color: var(--muted);
      font-size: 10px;
      text-transform: uppercase;
      letter-spacing: .8px;
    }

    .product-divider {
      margin: 0 0 18px;
    }


    .macro-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 3px;
      margin-top: 15px;
      padding-top: 12px;
      border-top: 1px solid var(--border);
    }


    .macro {
      text-align: center;
    }


    .macro-value {
      color: var(--green);
      font-size: 14px;
      font-weight: 700;
      white-space: nowrap;
    }


    .macro-label {
      margin-top: 4px;
      color: var(--muted);
      font-size: 9px;
      font-weight: 700;
      letter-spacing: .3px;
    }


    .product-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-top: 16px;
    }


    .price {
      color: var(--green);
      font-size: 15px;
      font-weight: 700;
    }


    /* =====================
       QUANTITY
    ===================== */

    .quantity-control {
      display: flex;
      align-items: center;
      gap: 8px;
    }


    .qty-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      padding: 0;
      border: 1px solid var(--border);
      border-radius: 50%;
      background: var(--white);
      color: var(--green);
      font-size: 17px;
      cursor: pointer;
    }


    .qty-number {
      min-width: 16px;
      text-align: center;
      color: var(--text);
      font-size: 13px;
      font-weight: 700;
    }


    /* =====================
       EMPTY / LOADING
    ===================== */

    .loading,
    .empty-state {
      grid-column: 1 / -1;
      padding: 50px 20px;
      text-align: center;
      color: var(--muted);
      font-size: 13px;
    }


    /* =====================
       ORDER SUMMARY
    ===================== */

    .summary-empty {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.6;
    }


    .order-item {
      display: flex;
      justify-content: space-between;
      gap: 15px;
      padding: 12px 0;
      border-bottom: 1px solid var(--border);
    }


    .order-item-name {
      font-size: 13px;
      font-weight: 600;
    }


    .order-item-detail {
      margin-top: 4px;
      color: var(--muted);
      font-size: 11px;
    }


    .order-item-price {
      white-space: nowrap;
      color: var(--green);
      font-size: 13px;
      font-weight: 700;
    }


    .total-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 18px;
      padding-top: 17px;
      border-top: 1px solid var(--border);
    }


    .total-label {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 1px;
    }


    .total-price {
      color: var(--green);
      font-size: 21px;
      font-weight: 700;
    }


    /* =====================
       FORM
    ===================== */

    .form-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }


    .form-group {
      margin-bottom: 15px;
    }


    .form-group.full {
      grid-column: 1 / -1;
    }


    .form-label {
      display: block;
      margin-bottom: 7px;
      color: var(--text);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: .5px;
    }


    .required {
      color: var(--danger);
    }


    .form-input,
    .form-select {
      width: 100%;
      height: 46px;
      padding: 0 13px;
      border: 1px solid var(--border);
      border-radius: 10px;
      outline: none;
      background: var(--white);
      color: var(--text);
      font-size: 13px;
    }


    .form-input:focus,
    .form-select:focus {
      border-color: var(--green);
    }


    /* =====================
       SUBMIT
    ===================== */

    .submit-btn {
      width: 100%;
      height: 54px;
      margin-top: 6px;
      border: none;
      border-radius: 12px;
      background: var(--green);
      color: var(--white);
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 1px;
      cursor: pointer;
    }


    .submit-btn:disabled {
      opacity: .55;
      cursor: not-allowed;
    }


    .error-message {
      display: none;
      margin-top: 12px;
      padding: 11px 13px;
      border-radius: 9px;
      background: #F9EEEE;
      color: var(--danger);
      font-size: 12px;
      line-height: 1.5;
    }


    .error-message.show {
      display: block;
    }


    /* =====================
       SUCCESS MODAL
    ===================== */

    .modal-overlay {
      position: fixed;
      z-index: 9999;
      inset: 0;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(20, 30, 25, .45);
    }


    .modal-overlay.show {
      display: flex;
    }


    .success-modal {
      width: 100%;
      max-width: 420px;
      padding: 34px 26px 25px;
      border-radius: 20px;
      background: var(--white);
      text-align: center;
      box-shadow: 0 20px 60px rgba(0, 0, 0, .15);
    }


    .success-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 54px;
      height: 54px;
      margin: 0 auto 18px;
      border-radius: 50%;
      background: var(--green-light);
      color: var(--green);
      font-size: 28px;
      font-weight: 700;
    }


    .success-modal h2 {
      margin: 0;
      color: var(--green);
      font-size: 18px;
      letter-spacing: 1px;
    }


    .success-step {
      margin-top: 16px;
      color: var(--green);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 1.5px;
    }


    .success-modal p {
      margin: 8px 0 0;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.65;
    }


    .order-number {
      margin-top: 20px;
      padding: 13px;
      border-radius: 10px;
      background: var(--green);
      color: var(--white);
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 1px;
    }


    .whatsapp-btn {
      width: 100%;
      height: 52px;
      margin-top: 18px;
      border: none;
      border-radius: 11px;
      background: var(--green);
      color: var(--white);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: .8px;
      cursor: pointer;
    }


    .done-btn {
      width: 100%;
      height: 48px;
      margin-top: 10px;
      border: 1px solid var(--border);
      border-radius: 11px;
      background: var(--white);
      color: var(--green);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: .8px;
      cursor: pointer;
    }


    /* =====================
      SHOP STATUS BANNER
    ===================== */

    .shop-status-banner {
      display: none;

      width: 100%;
      padding: 14px 20px;

      background: var(--green-dark);
      color: var(--white);

      text-align: center;
    }


    .shop-status-banner.show {
      display: block;
    }


    .shop-status-title {
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 1.5px;
    }


    .shop-status-text {
      margin-top: 5px;

      font-size: 12px;
      line-height: 1.5;

      opacity: .85;
    }


    @media (max-width: 520px) {

      .header {
        padding-top: 26px;
      }

      .brand {
        font-size: 24px;
      }

      .page {
        padding-left: 12px;
        padding-right: 12px;
      }

      .section {
        padding: 17px;
        border-radius: 15px;
      }

      /* =====================
         MOBILE PRODUCT CARD
         Image left / product information right
      ===================== */

      .products-container {
        grid-template-columns: 1fr;
        gap: 12px;
      }

      .product-card {
        display: grid;
        grid-template-columns: minmax(0, 42%) minmax(0, 58%);
        align-items: stretch;
        overflow: hidden;
        border-radius: 18px;
      }

      /* Fixed 4:5 product image ratio on mobile */
      .product-image-wrap {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 4 / 5;

        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;

        border-radius: 18px 0 0 18px;
      }

      .product-image-wrap img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        object-position: center center;
      }

      .product-content {
        min-width: 0;
        padding: 12px 11px;
        display: flex;
        flex-direction: column;
      }

      .product-name {
        min-height: auto;
        margin: 0;
        font-size: 14px;
        line-height: 1.3;
      }

      .product-category {
        min-height: auto;
        margin-top: 5px;
        margin-bottom: 8px;
        font-size: 8px;
        letter-spacing: .7px;
      }

      .product-divider {
        margin: 0 0 8px;
      }

      /* MOBILE MACRO LAYOUT
         Row 1: KCAL
         Row 2: PROTEIN | CARBS | FAT | FIBRE
      */
      .macro-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px 2px;
        margin-top: 7px;
        padding-top: 8px;
      }

      /* KCAL on its own first row */
      .macro:first-child {
        grid-column: 1 / -1;
      }

      .macro-value {
        font-size: 11px;
        letter-spacing: 0;
      }

      .macro-label {
        margin-top: 2px;
        font-size: 7px;
        letter-spacing: 0;
      }

      .product-bottom {
        margin-top: auto;
        padding-top: 10px;
      }

      .price {
        font-size: clamp(12px, 3.5vw, 16px);
        line-height: 1.1;
        white-space: nowrap;
        flex-shrink: 1;
        min-width: 0;
      }

      .quantity-control {
        gap: 5px;
      }

      .qty-btn {
        width: 26px;
        height: 26px;
      }

      .qty-number {
        font-size: 12px;
      }

      .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
      }

      .form-group.full {
        grid-column: auto;
      }

    }
/* =====================
       SLOT / DELIVERY
    ===================== */

    .service-note {
      display: none;
      margin-top: 6px;
      color: var(--muted);
      font-size: 10px;
      line-height: 1.4;
    }

    .service-note.show {
      display: block;
    }

    .delivery-address-group {
      display: none;
    }

    .delivery-address-group.show {
      display: block;
    }

    .delivery-fee-notice {
      margin-top: 8px;
      color: var(--danger);
      font-size: 11px;
      font-weight: 600;
      line-height: 1.45;
    }

    /* =====================
       PAYMENT TOTAL
    ===================== */

    .payment-total {
      display: none;
      margin: 0 auto 12px;
      color: var(--green);
      text-align: center;
    }

    .payment-total.show {
      display: block;
    }

    .payment-total-label {
      margin-bottom: 4px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 1.2px;
    }

    .payment-total-value {
      color: var(--green);
      font-size: 24px;
      font-weight: 700;
    }

      /* =====================
        PAYMENT DETAILS
      ===================== */

      .payment-qr-section {
        display: none;
        margin: 20px 0 14px;
        text-align: center;
      }

      .payment-qr-section.show {
        display: block;
      }

      .payment-qr-label {
        margin-bottom: 10px;
        color: var(--green);
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 1px;
      }

      .payment-qr-image {
        display: block;
        width: min(220px, 70vw);
        height: auto;
        margin: 0 auto;
        border-radius: 12px;
        background: #fff;
      }

      .payment-info {
        width: 100%;
        max-width: 380px;

        margin: 12px auto 0;
        padding: 10px 18px;

        box-sizing: border-box;

        border: 1px solid var(--border);
        border-radius: 18px;

        background: rgba(255, 255, 255, 0.65);

        color: var(--text);

        font-size: 12px;
        line-height: 1.8;

        white-space: pre-line;
        text-align: center;
      }


    /* =====================
       SLOT CALENDAR
    ===================== */

    .calendar-input-wrap {
      position: relative;
    }

    .calendar-input {
      cursor: pointer;
      background: var(--white);
    }

    .calendar-input:disabled {
      cursor: not-allowed;
    }

    .slot-calendar {
      display: none;
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      width: 320px;
      max-width: min(320px, calc(100vw - 64px));
      padding: 14px;
      background: var(--white);
      border: 1px solid var(--border);
      border-radius: 16px;
      box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
      z-index: 300;
    }

    .slot-calendar.show {
      display: block;
    }

    .slot-calendar-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 12px;
    }

    .slot-calendar-title {
      color: var(--green);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: .8px;
      text-align: center;
      flex: 1;
    }

    .slot-calendar-nav {
      width: 30px;
      height: 30px;
      border: 1px solid var(--border);
      border-radius: 50%;
      background: var(--white);
      color: var(--green);
      font-size: 18px;
      line-height: 1;
      cursor: pointer;
    }

    .slot-calendar-nav:disabled {
      opacity: .35;
      cursor: not-allowed;
    }

    .slot-calendar-weekdays,
    .slot-calendar-days {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      gap: 4px;
    }

    .slot-calendar-weekdays {
      margin-bottom: 5px;
    }

    .slot-calendar-weekday {
      padding: 3px 0;
      color: var(--muted);
      font-size: 9px;
      font-weight: 700;
      text-align: center;
    }

    .slot-calendar-day {
      width: 100%;
      height: 34px;
      border: 0;
      border-radius: 9px;
      background: transparent;
      color: var(--text);
      font-size: 11px;
      cursor: pointer;
    }

    .slot-calendar-day.available {
      background: var(--green-light);
      color: var(--green);
      font-weight: 700;
    }

    .slot-calendar-day.available:hover {
      background: var(--green);
      color: var(--white);
    }

    .slot-calendar-day.selected {
      background: var(--green);
      color: var(--white);
    }

    .slot-calendar-day.disabled {
      color: #C9CECB;
      background: transparent;
      cursor: not-allowed;
    }

    .slot-calendar-day.empty {
      pointer-events: none;
    }

    .payment-delivery-fee-notice {
      display: none;
      margin: -2px auto 14px;
      max-width: 320px;
      color: var(--danger);
      font-size: 15px;
      font-weight: 700;
      line-height: 1.45;
      text-align: center;
    }

    .payment-delivery-fee-notice.show {
      display: block;
    }

    @media (max-width: 520px) {
      .slot-calendar {
        width: 100%;
        max-width: none;
      }
    }


    /* =====================
       STICKY TOP AREA
       Header is always visible.
       Closed banner stays hidden unless JS adds .show.
    ===================== */

    .sticky-shop-top {
      position: sticky;
      top: 0;
      z-index: 2000;

      width: 100%;
      box-sizing: border-box;

      background: var(--cream);
      box-shadow: 0 4px 16px rgba(20, 30, 25, 0.05);
    }


    /* Keep existing header centering exactly as before */
    .sticky-shop-top .header {
      width: 100%;
      box-sizing: border-box;
    }


    /* =====================
       SUCCESS MODAL CLOSE BUTTON
    ===================== */

    .success-modal {
      position: relative;
    }


    .modal-close-btn {
      position: absolute;
      top: 12px;
      right: 12px;

      width: 32px;
      height: 32px;

      display: flex;
      align-items: center;
      justify-content: center;

      padding: 0;
      border: none;
      border-radius: 50%;

      background: transparent;
      color: var(--text);

      font-size: 26px;
      font-weight: 300;
      line-height: 1;

      cursor: pointer;
    }


    .modal-close-btn:hover {
      background: rgba(0, 0, 0, 0.05);
    }


    .modal-close-btn:active {
      transform: scale(0.92);
    }


    @media (max-width: 520px) {

      .modal-close-btn {
        top: 10px;
        right: 10px;

        width: 30px;
        height: 30px;

        font-size: 24px;
      }

    }



    /* =====================
       ORDER RECEIVED MODAL
       Responsive size + internal scrolling
    ===================== */
    .success-modal {
      width: min(100%, 520px);
      max-width: calc(100vw - 32px);
      max-height: calc(100vh - 32px);
      overflow-y: auto;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
      box-sizing: border-box;
    }

    @media (max-width: 520px) {
      .modal-overlay {
        padding: 12px;
      }

      .success-modal {
        width: 100%;
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        padding: 28px 18px 20px;
        border-radius: 18px;
      }
    }



    /* =====================
       PRODUCT DESCRIPTION
    ===================== */
    .product-description {
      width: 100%;
      max-width: 100%;
      min-height: 48px;
      margin-top: -8px;
      margin-bottom: 12px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.45;
      box-sizing: border-box;
      overflow-wrap: break-word;
      word-break: normal;
    }

    @media (max-width: 520px) {
      .product-description {
        width: 100%;
        max-width: 100%;
        min-height: 42px;
        margin-top: -4px;
        margin-bottom: 7px;
        font-size: 9px;
        line-height: 1.4;
      }
    }



    /* =====================
       PRODUCT IMAGE PREVIEW
    ===================== */
    .product-image-clickable {
      position: relative;
      cursor: zoom-in;
    }

    .image-zoom-hint {
      position: absolute;
      right: 10px;
      bottom: 10px;
      padding: 5px 8px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.82);
      color: var(--text);
      font-size: 8px;
      font-weight: 700;
      letter-spacing: .8px;
      opacity: 0;
      transition: opacity .2s ease;
      pointer-events: none;
    }

    .product-image-clickable:hover .image-zoom-hint {
      opacity: 1;
    }

    .image-preview-overlay {
      position: fixed;
      inset: 0;
      z-index: 3000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 16px;
      background: rgba(18, 30, 26, 0.82);
      box-sizing: border-box;
    }

    .image-preview-overlay.show {
      display: flex;
    }

    .image-preview-modal {
      position: relative;
      width: min(760px, 100%);
      max-width: calc(100vw - 32px);
      max-height: calc(100vh - 32px);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }

    .image-preview-img {
      display: block;
      width: auto;
      height: auto;
      max-width: 100%;
      max-height: calc(100vh - 90px);
      object-fit: contain;
      border-radius: 14px;
      background: var(--white);
    }

    .image-preview-close {
      position: absolute;
      top: -10px;
      right: -4px;
      z-index: 1;
      width: 36px;
      height: 36px;
      border: 0;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.95);
      color: var(--text);
      font-size: 26px;
      line-height: 1;
      cursor: pointer;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    }

    .image-preview-caption {
      width: 100%;
      margin-top: 10px;
      color: #fff;
      font-size: 13px;
      line-height: 1.4;
      text-align: center;
    }

    @media (max-width: 520px) {
      .image-zoom-hint {
        opacity: 1;
        right: 7px;
        bottom: 7px;
        padding: 4px 7px;
        font-size: 7px;
      }

      .image-preview-overlay {
        padding: 12px;
      }

      .image-preview-modal {
        width: 100%;
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
      }

      .image-preview-img {
        max-height: calc(100vh - 76px);
        border-radius: 12px;
      }

      .image-preview-close {
        top: -8px;
        right: -2px;
      }

      .image-preview-caption {
        margin-top: 8px;
        font-size: 12px;
      }
    }



    /* =====================
       SOLD OUT PRODUCTS
    ===================== */
    .quantity-area {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      min-width: 92px;
    }

    .qty-btn.disabled,
    .qty-btn:disabled {
      border-color: #e0e0e0;
      background: #f1f1f1;
      color: #a6a6a6;
      cursor: not-allowed;
      opacity: 1;
    }

    .sold-out-qty {
      color: #9a9a9a;
    }

    .sold-out-notice {
      color: var(--danger);
      font-size: 9px;
      font-weight: 700;
      letter-spacing: .7px;
      line-height: 1;
      text-align: center;
      white-space: nowrap;
    }

    @media (max-width: 520px) {
      .quantity-area {
        gap: 4px;
        min-width: 82px;
      }

      .sold-out-notice {
        font-size: 8px;
        letter-spacing: .5px;
      }
    }

