/* =========================
   WEEKLY EDITOR (ADMIN)
   ========================= */
.w-editor .weekly-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.w-editor .weekly-day-box {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  background: #fafafa;
}

.w-editor .weekly-day-box h4 {
  margin-top: 0;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.w-editor .weekly-day-box p {
  margin: 6px 0;
}

.w-editor .weekly-day-box .preview img {
  max-width: 150px;
  height: auto;
  border: 1px solid #ccc;
  padding: 3px;
  border-radius: 6px;
  margin-top: 6px;
}

/* Item menu */
.w-editor .menu-item {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 6px;
}
#poststuff .meta-box-sortables select {
  max-width: 20%;
}

.w-editor .menu-item input {
  flex: 1;
}

/* Mobile tetap 1 kolom */
@media (max-width: 768px) {
  .w-editor .weekly-grid {
    grid-template-columns: 1fr;
  }
}



/* =========================
   WEEKLY FRONT
   ========================= */
.w-package {
  max-width: 1100px;
  margin: 40px auto;
  background: #e9fdd1;
  padding: 22px;
  border-radius: 15px;
}

/* Atas flexbox */
.w-top-section {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}
.w-thumb { flex: 1; }
.w-info { flex: 1; }

.w-featured-img {
  border-radius: 12px;
  width: 100%;
  height: auto;
}
.w-title {
  margin-top: 0;
  font-size: 36px;
}
.w-info p {
  margin: 8px 0;
  font-size: 22px;
}

.w-base-price {
  font-size: 22px;
  font-weight: bold;
  color: #e67e22;
  margin: 10px 0;
}

.w-order-btn { margin-top: 20px; }
.w-button-order {
  background: #e74c3c;
  padding: 10px 20px;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  transition: 0.3s;
}
.w-button-order:hover { background: #c0392b; }

.w-section-title {
  margin: 40px 0 20px;
  font-size: 24px;
  font-weight: bold;
}

/* Menu Harian */
.w-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.wday-box {
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 10px;
  background: #fafafa;
  transition: all 0.3s ease;
}
.wday-box h3 {
  margin-top: 0;
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
}
.wday-box:hover {
  background: #fff;
  border-color: #e67e22;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-5px);
}
.wday-box ul li {
  font-size: 22px;
  line-height: 1.6;
  margin-bottom: 6px;
}
.wday-image img {
  max-width: 100%;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* Konten Tambahan */
.w-content {
  margin-top: 30px;
  font-size: 18px;
  line-height: 1.6;
}

/* Responsive */
@media(max-width:768px){
  .w-top-section { flex-direction: column; }
  .w-menu { grid-template-columns: 1fr; }
  .wday-box { flex: 1 1 100%; }
}

/* =========================
   MONTLY EDITOR (ADMIN)
   ========================= */
.m-editor .day-block-wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.m-editor .day-block {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  background: #fafafa;
}

.m-editor .day-block h4 {
  margin-top: 0;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.m-editor .day-block p {
  margin: 6px 0;
}

.m-editor .cb-day-image-preview img {
  max-width: 100%;
  border-radius: 6px;
  margin-top: 6px;
}

/* Mobile tetap 1 kolom */
@media (max-width: 768px) {
  .m-editor .day-block-wrap {
    grid-template-columns: 1fr;
  }
}


/* =========================
   MONTLY FRONT
   ========================= */
.m-package {
  max-width: 1100px;
  margin: 40px auto;
  background: #e9fdd1;
  padding: 22px;
  border-radius: 15px;
}

/* Atas flexbox */
.m-top-section {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}
.m-thumb { flex: 1; }
.m-info { flex: 1; }

.m-featured-img {
  border-radius: 12px;
  width: 100%;
  height: auto;
}
.m-title {
  margin-top: 0;
  font-size: 36px;
}
.m-info p {
  margin: 8px 0;
  font-size: 22px;
}

.m-base-price {
  font-size: 22px;
  font-weight: bold;
  color: #e67e22;
  margin: 10px 0;
}

.m-order-btn { margin-top: 20px; }
.m-button-order {
  background: #e74c3c;
  padding: 10px 20px;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  transition: 0.3s;
}
.m-button-order:hover { background: #c0392b; }

.m-section-title {
  margin: 40px 0 20px;
  font-size: 24px;
  font-weight: bold;
}

/* Menu Harian Front */
.m-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.mday-box {
  border: 1px solid #ddd;
  padding: 15px;
  border-radius: 10px;
  background: #fafafa;
  transition: all 0.3s ease;
}
.mday-box h3 {
  margin-top: 0;
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
}
.mday-box:hover {
  background: #fff;
  border-color: #e67e22;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-5px);
}
.mday-box ul li {
  font-size: 22px;
  line-height: 1.6;
  margin-bottom: 6px;
}
.mday-image img {
  max-width: 100%;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* Konten Tambahan */
.m-content {
  margin-top: 30px;
  font-size: 18px;
  line-height: 1.6;
}

/* Responsive */
@media(max-width:768px){
  .m-top-section { flex-direction: column; }
  .m-menu { grid-template-columns: 1fr; }
  .mday-box { flex: 1 1 100%; }
}



/* =========================
   CATERING GRID (Shortcode)
   ========================= */
.cb-grid-wrap {
  display: grid;
  grid-gap: 20px;
  margin: 0;             /* hilangkan margin luar */
  padding: 0;            /* hilangkan padding luar */
}

/* Default 4 kolom */
.cb-grid-wrap.cols-4 { grid-template-columns: repeat(4, 1fr); }
/* 3 kolom */
.cb-grid-wrap.cols-3 { grid-template-columns: repeat(3, 1fr); }
/* 2 kolom */
.cb-grid-wrap.cols-2 { grid-template-columns: repeat(2, 1fr); }
/* 1 kolom */
.cb-grid-wrap.cols-1 { grid-template-columns: 1fr; }

.cb-card {
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow .2s;
  display: flex;
  flex-direction: column; padding: 22px; background: #fff;
}

.cb-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.cb-card-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.cb-card-body {
  padding: 12px;        /* lebih kecil (dulu 15px) */
}

.cb-card-title {
  font-size: 20px;
  margin: 4px 0;
  font-weight: 600;
}

.cb-card-price {
  font-weight: bold;
  margin: 0 0 10px;
  color: #28a745;
}

.cb-card .button {
  background: #e63946;
  color: #fff;
  padding: 8px 14px;    /* lebih rapat */
  border-radius: 6px;
  font-weight: bold;
  text-align: center;
  display: inline-block;
  transition: 0.3s;
  text-decoration: none;
}
.cb-card .button:hover {
  background: #c92f3f;
}

/* Responsive */
@media(max-width: 992px){
  .cb-grid-wrap.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cb-grid-wrap.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width: 600px){
  .cb-grid-wrap.cols-4,
  .cb-grid-wrap.cols-3,
  .cb-grid-wrap.cols-2 {
    grid-template-columns: 1fr;
  }
}

/* Wrapper builder: 2 kolom */
.cb-builder-form {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* kiri thumb, kanan info */
  gap: 30px;
  padding: 20px;
  box-sizing: border-box;
  align-items: flex-start;
}

/* Kolom kiri (thumb) */
.cb-left {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #eee;
  box-sizing: border-box;
}

/* Kolom kanan (info/varian/summary) */
.cb-right {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #eee;
  box-sizing: border-box;
}

/* Block isi */
.cb-block {
  margin-bottom: 20px;
  padding: 15px;
  border-radius: 8px;
  background: #fafafa;
  border: 1px solid #eee;
}

/* Responsive → 1 kolom */
@media(max-width:768px){
  .cb-builder-form {
    grid-template-columns: 1fr;   /* stack */
    padding: 10px;
  }
  .cb-left,
  .cb-right {
    padding: 12px;
    margin: 0;
  }
}
/* Reset block di dalam kanan jadi vertikal */
.cb-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Pastikan cb-block full width */
.cb-right .cb-block {
  display: block !important;
  width: 100% !important;
  margin: 0 0 20px 0;
  box-sizing: border-box;
}


/* Varian pilihan tetap 1 kolom */
.cb-right .cb-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cb-right .cb-option {
  width: 100%;
}


/* Wrapper varian = label */
.cb-option {
  display: flex;
  align-items: center;
  gap: 10px;              /* jarak antar elemen */
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

/* Radio button */
.cb-option input[type="radio"],
.cb-option input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
}

/* Ikon */
.cb-option .cb-opt-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;           /* biar rata antar icon */
  text-align: center;
  flex-shrink: 0;
}

.cb-option .cb-opt-icon i {
  font-size: 18px;
  color: #333;
}

/* Nama varian */
.cb-option .cb-opt-name {
  font-size: 22px;
  line-height: 1.4;
}

/* Harga tambahan */
.cb-option .cb-opt-price {
  margin-left: auto;     /* dorong ke kanan */
  font-size: 22px;
  color: #777;
}

/* Hover effect */
.cb-option:hover {
  background: #f9f9f9;
}



/* =========================
   EVENT EDITOR (ADMIN)
   ========================= */
#cb-custom-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* dua kolom di desktop */
  gap: 20px;
}

/* Setiap kategori (card) */
#cb-custom-cats .cb-custom-cat {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
  background: #fafafa;
}

/* Input dan select biar full */
#cb-custom-cats .cb-custom-cat input[type="text"],
#cb-custom-cats .cb-custom-cat input[type="number"],
#cb-custom-cats .cb-custom-cat select {
  width: 100%;
  max-width: 100%;
  margin-bottom: 8px;
}

/* Daftar varian */
#cb-custom-cats .cb-variants {
  margin-top: 10px;
  border-top: 1px dashed #ccc;
  padding-top: 10px;
}

/* Tiap baris varian */
#cb-custom-cats .cb-variant-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
#cb-custom-cats .cb-variant-row input[type="text"],
#cb-custom-cats .cb-variant-row input[type="number"],
#cb-custom-cats .cb-variant-row select {
  flex: 1;
  min-width: 120px;
}

/* Mobile tetap 1 kolom */
@media (max-width: 768px) {
  #cb-custom-cats {
    grid-template-columns: 1fr;
  }
}

/* Pakai grid untuk form builder */
.cb-builder-form {
  display: grid !important;
  grid-template-columns: 1fr 1fr; /* 2 kolom varian */
  gap: 1rem; /* jarak antar kolom */
}

/* Block varian tetap 1 kolom */
.cb-builder-form .cb-block {
  grid-column: span 1;
}

/* Summary ambil full width (2 kolom) */
.cb-builder-form .cb-summary {
  grid-column: 1 / -1; /* dari kolom 1 sampai terakhir */
  width: 100% !important;
  margin-top: 1rem;
}

.cb-summary {
  background-color: #fffce6;
  padding: 1rem;
  border-radius: 15px;
  margin-top: 1rem;
}

.m-short-desc, .w-short-desc {
    font-size: 16px;
    font-style: italic;
    color: #555;
    margin: 8px 0;
}

/* =========================
   EVENT FRONT RESPONSIVE
   ========================= */
@media (max-width: 768px) {
  /* grid custom category tetap 1 kolom */
  #cb-custom-cats {
    grid-template-columns: 1fr !important;
  }

  /* tiap variant row stack */
  #cb-custom-cats .cb-variant-row {
    flex-direction: column;
    align-items: stretch;
  }

  /* form builder stack */
  .cb-builder-form {
    grid-template-columns: 1fr !important;
  }

  .cb-builder-form .cb-block {
    grid-column: 1 !important;
    width: 100% !important;
  }

  /* summary full width */
  .cb-builder-form .cb-summary {
    grid-column: 1 !important;
    margin-top: 1rem;
  }
}


/* =========================
   CHECKOUT SUMMARY
   ========================= */
.cb-summary table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.cb-summary table th,
.cb-summary table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
  font-size: 16px;
}

.cb-summary table th {
  background: #f7f7f7;
  font-weight: bold;
}

/* Mobile friendly */
@media (max-width: 768px) {
  .cb-summary table,
  .cb-summary thead,
  .cb-summary tbody,
  .cb-summary th,
  .cb-summary td,
  .cb-summary tr {
    display: block;
    width: 100%;
  }

  .cb-summary thead {
    display: none; /* sembunyikan header di mobile */
  }

  .cb-summary tr {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
  }

  .cb-summary td {
    border: none;
    padding: 6px 10px;
    font-size: 15px;
    text-align: left;
  }

  .cb-summary td:before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
    color: #555;
  }
}

/* =========================
   FIX: EVENT VARIANT MOBILE
   ========================= */
@media (max-width: 768px) {
  .cb-option {
    flex-wrap: wrap;              /* biar bisa turun ke bawah */
    justify-content: flex-start;  /* jangan dipaksa kanan */
    align-items: flex-start;
  }

  .cb-option .cb-opt-name {
    flex: 1 1 100%;     /* nama menu full width */
    font-size: 22px;    /* agak kecil biar muat */
    line-height: 1.4;
  }

  .cb-option .cb-opt-price {
    flex: 1 1 100%;     /* harga pindah ke bawah */
    margin-left: 0;
    font-size: 16px;
    color: #555;
  }
}

