/* Menu Grid */
.pdp-menu {
  margin: 20px 0;
}
.pdp-menu-head {
  font-size: 1.4em;
  margin-bottom: 10px;
  font-weight: bold;
}
.pdp-menu-grid {
  display: grid;
  /*grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));*/
  /*grid-template-columns: repeat(2, 1fr);*/
  gap: 15px;
}
.pdp-menu-grid {
    display: grid;
    gap: 20px;
}

.pdp-cols-1 .pdp-menu-grid {
    grid-template-columns: 1fr;
}

.pdp-cols-2 .pdp-menu-grid {
    grid-template-columns: repeat(2, 1fr);
}

.pdp-cols-3 .pdp-menu-grid {
    grid-template-columns: repeat(3, 1fr);
}

.pdp-cols-4 .pdp-menu-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* responsive fallback */
@media (max-width: 768px) {
    .pdp-menu-grid {
        grid-template-columns: 1fr !important;
    }
}



.pdp-card {
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pdp-thumb {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 10px;
}
.pdp-title {
  font-weight: bold;
  margin-bottom: 4px;
}
.pdp-desc {
  font-size: 0.9em;
  color: #555;
  margin-bottom: 8px;
}
.pdp-meta {
  font-size: 0.85em;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}
.pdp-add {
  background: #008c45;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 5px;
  cursor: pointer;
}
.pdp-add:disabled {
  background: #aaa;
  cursor: not-allowed;
}

/* Cart */
.pdp-cart-wrap {
  margin: 20px 0;
}
.pdp-cart-head {
  font-size: 1.3em;
  margin-bottom: 10px;
  font-weight: bold;
}
.pdp-cart-table {
  width: 100%;
  border-collapse: collapse;
}
.pdp-cart-table th, .pdp-cart-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}
.pdp-cart-table th {
  background: #f5f5f5;
}
.pdp-cart-table td button {
  background: #d9534f;
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}
.pdp-cart-table td button:hover {
  background: #c9302c;
}
.pdp-total-label {
  text-align: right;
  font-weight: bold;
}
.pdp-total-val {
  font-weight: bold;
}

/* Form */
.pdp-form {
  margin: 20px 0;
}
.pdp-form label {
  display: block;
  margin-bottom: 10px;
}
.pdp-form input {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 5px;
}
.pdp-form button {
  background: #0069d9;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
}
.pdp-form button:hover {
  background: #0056b3;
}
.pdp-msg {
  margin-top: 10px;
  font-size: 0.9em;
}

/* Thumbnail in cart */
.pdp-cart-thumb {
  width: 40px;
  height: auto;
  margin-right: 6px;
  vertical-align: middle;
  border-radius: 6px;
}

/*****************/
/* Fix mobile overlap and row wrapping */
.pdp-menu {
  width: 100%;
  clear: both;
}

.pdp-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
  align-items: start;       /* prevent overlap */
  grid-auto-rows: auto;     /* allow flexible height */
}

.pdp-card {
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Force spacing on mobile */
@media (max-width: 768px) {
  .pdp-menu {
    margin-bottom: 40px !important;
  }

  .pdp-menu-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .pdp-card {
    margin-bottom: 20px;
  }
}
