/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-family: var(--font); font-size: .9rem; font-weight: 500; line-height: 1.2;
  cursor: pointer; transition: all .2s ease; white-space: nowrap; text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--green); border-color: var(--green); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(30, 96, 37, .22); }
.btn-outline { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green); color: #fff; }
.btn-ghost-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.55); backdrop-filter: blur(4px); }
.btn-ghost-light:hover { background: #fff; color: var(--green); }
.btn-whatsapp { background: var(--whatsapp); color: #073b1c; border-color: var(--whatsapp); }
.btn-whatsapp:hover { background: #1ebe5b; color: #073b1c; }
.btn-sm { padding: 9px 18px; font-size: .8rem; }
.btn-lg { padding: 16px 34px; font-size: .98rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.link-button, .link-danger { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; text-decoration: none; }
.link-danger { color: #b42318; font-weight: 500; }
.link-danger:hover { text-decoration: underline; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 16px; }
.form.grid-2, .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 7px; font-size: .82rem; font-weight: 600; color: var(--ink); }
.form input, .form select, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); font-size: .92rem; font-weight: 400; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(216, 136, 64, .16);
}
.form textarea { resize: vertical; }
.form .span-2 { grid-column: span 2; }
.form-note { font-size: .78rem; color: var(--muted); margin: 8px 0 0; }
.form-errors { background: #fef3f2; border: 1px solid #fecdca; color: #b42318; border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; }
.form-errors ul { margin: 0; padding-left: 18px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.price-range { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: .9rem; }
.alert-success { background: var(--green-soft); border: 1px solid #c7e6c9; color: #1a5b20; }
.alert-error { background: #fef3f2; border: 1px solid #fecdca; color: #b42318; }

/* ---------- Cards ---------- */
.tours-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.tours-grid.is-list { grid-template-columns: 1fr; }
.tour-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease;
}
.tour-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tour-card-media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.tour-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tour-card:hover .tour-card-media img { transform: scale(1.05); }
.tour-badge { position: absolute; top: 14px; left: 14px; background: var(--accent); color: #3a2c00; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 5px 10px; border-radius: 100px; }
.tour-price { position: absolute; right: 14px; bottom: 14px; background: rgba(255,255,255,.96); color: var(--green); font-weight: 700; font-size: .95rem; padding: 7px 12px; border-radius: 8px; box-shadow: var(--shadow-sm); display: inline-flex; align-items: baseline; gap: 4px; }
.tour-price small { font-size: .62rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tour-card-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.tour-card-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: .76rem; color: var(--muted); margin-bottom: 10px; }
.tour-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.tour-card-title { font-size: 1.08rem; line-height: 1.35; margin: 0 0 8px; }
.tour-card-title a:hover { color: var(--brand); }
.tour-card-summary { font-size: .86rem; color: var(--muted); margin-bottom: 16px; }
.tour-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.tour-card-whatsapp { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--green-soft); color: var(--whatsapp); }
.tour-card-whatsapp:hover { background: var(--whatsapp); color: #05371a; }
.tours-grid.is-list .tour-card { flex-direction: row; }
.tours-grid.is-list .tour-card-media { width: 38%; aspect-ratio: auto; min-height: 240px; }
.tours-grid.is-list .tour-card-body { padding: 24px 28px; }
.tours-grid.is-list .tour-card-title { font-size: 1.4rem; }
.tour-badge { z-index: 1; }

/* ---------- Filter / toolbar ---------- */
.tour-layout { display: grid; grid-template-columns: 280px 1fr; gap: 34px; align-items: start; }
.filter-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: calc(var(--header-height) + 16px); }
.filter-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.filter-head h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; margin: 0; }
.filter-close { display: none; background: none; border: 0; color: var(--ink); }
.filter-group { border-top: 1px solid var(--line); padding: 16px 0; }
.filter-group h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink); margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 9px; font-size: .85rem; color: var(--text); padding: 5px 0; cursor: pointer; font-weight: 400; }
.check input { width: 16px; height: 16px; accent-color: var(--green); flex: none; }
.check span { flex: 1; }
.check em { font-style: normal; font-size: .72rem; color: var(--muted); background: var(--surface-2); padding: 2px 7px; border-radius: 100px; }
.filter-panel input[type="number"],
.filter-panel input[type="text"],
.filter-panel select {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 7px;
  background: #fff; font-size: .82rem; color: var(--text);
}
.filter-panel input:focus, .filter-panel select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(216,136,64,.14); }
.filter-hint { font-size: .75rem; color: var(--muted); margin: 8px 0 0; }
.filter-clear { display: block; text-align: center; font-size: .8rem; color: var(--brand); margin-top: 12px; font-weight: 600; }
.filter-open { display: none; }

.tour-toolbar { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 22px; position: sticky; top: calc(var(--header-height) + 8px); z-index: 60; box-shadow: var(--shadow-sm); }
.tour-count { margin: 0; font-size: .85rem; color: var(--muted); }
.tour-count strong { color: var(--ink); }
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.sort-select { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.sort-select select { border: 1px solid var(--line-strong); border-radius: 7px; padding: 7px 9px; background: #fff; font-size: .8rem; color: var(--ink); }
.view-toggle { display: flex; border: 1px solid var(--line-strong); border-radius: 7px; overflow: hidden; }
.view-toggle a { padding: 7px 10px; color: var(--muted); display: inline-flex; }
.view-toggle a.is-active { background: var(--green); color: #fff; }
.active-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--green-soft); color: var(--green); border: 1px solid #cfe8d0; padding: 5px 10px; border-radius: 100px; font-size: .76rem; font-weight: 600; text-transform: capitalize; }
.chip .icon { width: .8em; height: .8em; }

.tours-load-more { text-align: center; padding: 34px 0 0; }
.tours-end { color: var(--muted); font-size: .85rem; }

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 42px; }
.page-link { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 8px; font-size: .85rem; color: var(--ink); }
.page-link:hover { border-color: var(--brand); color: var(--brand); }
.page-link.is-current { background: var(--green); border-color: var(--green); color: #fff; }
.page-gap { align-self: center; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { background: var(--surface-2); font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.status { display: inline-block; padding: 3px 9px; border-radius: 100px; font-size: .7rem; font-weight: 700; text-transform: capitalize; background: var(--surface-3); color: var(--text); }
.status-new, .status-open { background: #e8f1ff; color: #1a4fa0; }
.status-confirmed, .status-paid, .status-published { background: var(--green-soft); color: var(--green); }
.status-cancelled, .status-closed { background: #fef3f2; color: #b42318; }
.status-draft { background: #fff7e6; color: #8a5a00; }
.status-full { background: #fff0e6; color: #b45309; }

/* ---------- Accordion ---------- */
.accordion { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.accordion-item { border-bottom: 1px solid var(--line); background: #fff; }
.accordion-item:last-child { border-bottom: 0; }
.accordion-item summary { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; }
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary .icon { margin-left: auto; transition: transform .2s ease; }
.accordion-item[open] summary .icon { transform: rotate(180deg); }
.accordion-body { padding: 0 18px 18px; font-size: .92rem; color: var(--text); }
.day-pill { background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; padding: 4px 9px; border-radius: 100px; flex: none; }
.day-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: 10px; }

/* ---------- Lists ---------- */
.check-list, .x-list { list-style: none; display: grid; gap: 10px; }
.check-list li, .x-list li { display: flex; gap: 9px; align-items: flex-start; font-size: .9rem; }
.check-list .icon { color: var(--green-mid); margin-top: .2em; }
.x-list .icon { color: #c0392b; margin-top: .2em; }

/* ---------- Misc ---------- */
.empty-state { text-align: center; padding: 50px 20px; background: var(--surface-2); border-radius: var(--radius); grid-column: 1 / -1; }
.empty-state h3 { margin-bottom: 8px; }
.reference { background: var(--green-soft); display: inline-block; padding: 8px 16px; border-radius: 100px; }
.status-pill { display: inline-block; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; font-size: .78rem; color: rgba(255,255,255,.8); margin-bottom: 14px; }
.breadcrumb a:hover { color: var(--accent); }

@media (max-width: 1024px) {
  .tours-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tour-layout { grid-template-columns: 1fr; }
  .filter-panel { position: fixed; top: 0; left: 0; bottom: 0; width: min(340px, 88vw); z-index: 320; overflow-y: auto; border-radius: 0; transform: translateX(-105%); transition: transform .28s ease; }
  .filter-panel.is-open { transform: translateX(0); }
  .filter-close, .filter-open { display: inline-flex; }
  .tour-toolbar { top: 72px; flex-wrap: wrap; }
  .tours-grid.is-list .tour-card { flex-direction: column; }
  .tours-grid.is-list .tour-card-media { width: 100%; aspect-ratio: 3/2; min-height: 0; }
}
@media (max-width: 640px) {
  .tours-grid { grid-template-columns: 1fr; }
  .form.grid-2, .grid-2 { grid-template-columns: 1fr; }
  .form .span-2 { grid-column: span 1; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  .tour-toolbar { position: static; }
}
