/* The two primary actions share one row; ordering spans the full card below. */
.theme-gallery .card-meta { padding-top: 14px; }
.theme-gallery .card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.theme-gallery .card-heading h3 { flex: 1; min-width: 0; margin: 5px 0 10px; font-size: 28px; }
.theme-gallery .card-heading .save-theme { flex: 0 0 36px; width: 36px; height: 36px; font-size: 23px; }
.theme-gallery .card-meta > .card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 10px 12px;
  width: 100%;
  margin-top: 0;
  padding-top: 2px;
}
.theme-gallery .card-actions > .card-action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 12px;
  border: 1px solid #98704845;
  border-radius: 999px;
  background: #fffbf4cc;
  color: var(--espresso, #492b1d);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: .01em;
  text-align: center;
  box-shadow: inset 0 1px 0 #ffffffa6, 0 2px 5px #492b1d05;
  transition: background .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.theme-gallery .card-action-button > span:first-child { min-width: 0; white-space: nowrap; }
.theme-gallery .card-action-icon { display: inline-flex; align-items: center; flex: 0 0 15px; opacity: .8; }
.theme-gallery .card-action-icon svg { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.theme-gallery .card-actions > .card-personalise {
  background: linear-gradient(135deg, #f4e9d9b3, #ecddc76b);
  border-color: #a07a5140;
  color: #674b35;
  box-shadow: inset 0 1px 0 #ffffffa6, 0 2px 5px #492b1d05;
}
.theme-gallery .card-actions > .card-order {
  grid-column: 1 / -1;
  min-height: 46px;
  background: linear-gradient(135deg, #593622, #362015);
  border-color: #492b1d;
  color: var(--off-white, #fffaf1);
  box-shadow: inset 0 1px 0 #ffffff20, 0 3px 8px #492b1d16;
  font-size: 13px;
}
.theme-gallery .card-order > span:first-child { white-space: normal; text-wrap: balance; }
.theme-gallery .card-action-button:focus-visible { outline: 2px solid #977449; outline-offset: 3px; }
.theme-gallery .card-description {
  margin-top: 10px;
  border: 1px solid #98704829;
  border-radius: 16px;
  background: #fffbf44d;
  color: #795c43;
}
.theme-gallery .card-description > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  padding: 8px 14px;
  list-style: none;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .02em;
  border-radius: inherit;
}
.theme-gallery .card-description > summary::-webkit-details-marker { display: none; }
.theme-gallery .card-description > summary::marker { content: ''; }
.theme-gallery .card-description > summary svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s;
}
.theme-gallery .card-description[open] > summary svg { transform: rotate(180deg); }
.theme-gallery .card-description[open] > summary { color: #492b1d; }
.theme-gallery .card-description > summary:focus-visible { outline: 2px solid #977449; outline-offset: 3px; }
.theme-gallery .card-description-body { padding: 0 14px 13px; }
.theme-gallery .card-description-body p { margin: 0; padding-top: 10px; border-top: 1px solid #98704821; color: #725d4c; font-size: 14px; line-height: 1.65; }
@media (hover: hover) and (pointer: fine) {
  .theme-gallery .card-actions > .card-action-button:hover { transform: translateY(-1px); background: #fffaf1; border-color: #98704880; box-shadow: 0 4px 12px #492b1d0d; }
  .theme-gallery .card-actions > .card-personalise:hover { background: #ecddc7a6; }
  .theme-gallery .card-actions > .card-order:hover { background: linear-gradient(135deg, #6b442d, #492b1d); border-color: #593622; box-shadow: 0 5px 12px #492b1d21; }
  .theme-gallery .card-description > summary:hover { background: #f1e6d666; color: #492b1d; }
}
@media (max-width: 380px) {
  .theme-gallery .card-meta > .card-actions { column-gap: 8px; }
  .theme-gallery .card-actions > .card-action-button { gap: 6px; padding-inline: 10px; font-size: 13px; }
  .theme-gallery .card-actions > .card-order { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-gallery .card-actions > .card-action-button { transition: none; }
  .theme-gallery .card-actions > .card-action-button:hover { transform: none; }
  .theme-gallery .card-description > summary svg { transition: none; }
}
