/* =============================
   THEME + ADAPTACION AL CSS EXISTENTE
   Alva Seminuevos - theme + responsive
   ============================= */

/* --- Variables de tema --- */
:root {
  --primary-start: rgb(69, 127, 138); /* brand teal */
  --primary-end: #315f68; /* deep teal */
  --primary-accent: #f5b53f; /* golden accent */
  --dark: #1a1a1a; /* text color */
  --muted: #6c757d; /* secondary text */
  --bg: #f9fbfc; /* main background */
  --white: #ffffff;
  --card-bg: #ffffff;
  --border: #e0e6e8;
  --shadow: 0 6px 14px rgba(69, 127, 138, 0.15);
  --radius: 10px;
  --container-max: 1200px;
}

/* --- Reset / base --- */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg);
  color: var(--dark);
  line-height: 1.5;
  font-size: 16px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* code */
code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* --- Typography fluid (keeps your clamps) --- */
h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
}
h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}
h3 {
  font-size: clamp(1.375rem, 3.5vw, 2rem);
}
h4 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}
h5 {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}
h6 {
  font-size: clamp(1rem, 2vw, 1.25rem);
}
p,
.text,
span,
label,
button {
  font-size: clamp(0.875rem, 1.5vw, 1rem);
}

/* --- Header / Navbar --- */
.navbar {
  width: 100%;
  background: linear-gradient(90deg, var(--primary-start), var(--primary-end));
  color: var(--white);
  z-index: 999;
  height: 64px;
  display: block;
}
.navbar-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

/* logo / header area */
.navbar-logo {
  font-size: 1.25rem;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
}

/* header inner layout */
.navbar-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
}

/* --- Hamburger --- */
.nav-toggle {
  display: none;
}

/* If you decide to place the <input id="nav-toggle"> BEFORE the <label>,
   the selectors below will animate the label into an X when checked.
   Recommended DOM order (working with CSS only):
     <input id="nav-toggle" class="nav-toggle" />
     <label for="nav-toggle" class="nav-toggle-label"><span></span></label>
*/
/* hamburger visual */
.nav-toggle-label {
  display: block;
  width: 34px;
  height: 24px;
  cursor: pointer;
  position: relative;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  content: '';
  display: block;
  background: var(--white);
  height: 4px;
  width: 100%;
  border-radius: 3px;
  position: absolute;
  left: 0;
  transition:
    transform 0.28s ease,
    top 0.28s ease,
    opacity 0.2s ease;
}
.nav-toggle-label span {
  top: 10px;
}
.nav-toggle-label span::before {
  top: -8px;
}
.nav-toggle-label span::after {
  top: 8px;
}

/* If input comes BEFORE label: transform into X when checked */
.nav-toggle:checked + .nav-toggle-label span {
  background-color: transparent;
}
.nav-toggle:checked + .nav-toggle-label span::before {
  transform: rotate(45deg);
  top: 0;
}
.nav-toggle:checked + .nav-toggle-label span::after {
  transform: rotate(-45deg);
  top: 0;
}

/* ALTERNATIVA: If you CANNOT move the input before the label and don't want JS,
   the label cannot be targeted by :checked (CSS limitation). You'd need JS to toggle
   a class on the label or move the input in the DOM. */

/* --- Navbar menu (mobile collapsed) --- */
.navbar-menu {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.85);
  width: 100%;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.36s ease;
  margin-top: 6px;
  border-radius: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition:
    background 0.25s ease,
    transform 0.2s ease;
  border-radius: 10px;
}

.nav-link i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

/* Hover minimalista */
.nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.nav-link:hover i {
  color: var(--primary-accent);
  transform: translateX(2px) rotate(10deg);
}

/* Desktop: menú horizontal */
@media (min-width: 768px) {
  .navbar-menu {
    flex-direction: row;
    background: transparent;
    border-radius: 0;
  }
  .nav-link {
    padding: 0.5rem 1rem;
  }
}
/* Show menu when checkbox checked (works with current DOM because input is after header and before nav) */
.nav-toggle:checked ~ .navbar-menu {
  max-height: 700px; /* large enough to show items */
  z-index: 10;
}

/* --- Search form inside header --- */
.navbar-search-form {
  margin: auto;
  display: flex;
  gap: 6px;
  align-items: center;
}

.search-wrapper {
  position: relative;
  width: 100%;
}

.search-wrapper input {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  border: 1px solid var(--muted);
  border-radius: 20px;
  background: var(--white);
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-wrapper input:focus {
  border-color: var(--primary-start);
  box-shadow: 0 0 0 3px rgba(69, 127, 138, 0.2);
}

.search-wrapper button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--primary-start);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
}

.search-wrapper button:hover {
  color: var(--primary-accent);
}

/* Responsive tweak */
@media (max-width: 768px) {
  .navbar-search-form {
    max-width: 20vw;
  }
}

@media (max-width: 385px) {
  .navbar-search-form {
    display: none;
  }
}

/* --- Main / Footer --- */
main {
  min-height: calc(100vh - 64px - 25px);
  /* padding: 1rem 0; */
}

footer {
  background: linear-gradient(90deg, var(--primary-start), var(--primary-end));
  color: var(--white);
  text-align: center;
  padding: 2rem 0;
  /* margin-top: 3rem; */
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  flex-direction: column;
}

.footer-section {
  flex: 1 1 auto;
  margin-bottom: 1rem;
}

.footer-section img {
  max-width: 400px;
  margin: auto;
  width: 100%;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 0.75rem;
  color: #fff;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: #fff;
  text-decoration: none;
}

.footer-section ul li a:hover {
  text-decoration: underline;
}

.footer-section a {
  color: #fff;
}

.footer-section a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
  }
}

/* --- Card --- */
.card {
  border-radius: var(--radius);
  width: 100%;
  margin: 12px 0;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  max-width: 340px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  max-width: 100%;
  position: relative;
}
.card a {
  color: inherit;
  text-decoration: none;
  display: block;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 32px rgba(23, 43, 77, 0.12);
  text-decoration: none;
}

.card:hover a {
  text-decoration: none;
  color: inherit;
}

.card--img {
  height: 240px;
  background: #eee;
  overflow: hidden;
}
.card--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__text--container {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-title {
  font-weight: 700;
  margin: 0;
}
.card-price {
  color: #007b00;
  font-weight: 700;
  margin: 0;
}
.card__features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.feature-tag {
  background: transparent;
  border-radius: 5px;
  padding: 4px 6px;
  color: var(--muted);
  font-size: 0.9rem;

  max-width: 115px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__phill {
  background: var(--dark);
  color: var(--white);
  padding: 4px 6px;
  border-radius: 5px;
  font-weight: 600;
}

/* --- grid for other areas if used --- */
.cards-grid {
  display: grid;
  gap: 1rem;
  /* responsive columns: try to keep card width around 280-340 */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
  width: 100%;
  margin: 0 auto;
  /* padding: 1rem; */
}

.cards-grid .card {
  margin: 0;
  height: 400px;
}

/* --- Responsive breakpoints --- */
/* Desktop-ish tablet: fix navbar to top and layout row-wise */
@media (min-width: 768px) {
  .navbar {
    position: fixed;
    top: 0;
    /* height: 56px; */
    left: 0;
    right: 0;
  }
  .navbar-header {
    width: 68%;
  }
  .navbar-container {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.25rem;
  }
  .nav-toggle-label {
    display: none;
  } /* hide hamburger on desktop */
  .navbar-menu {
    max-height: none !important;
    display: flex !important;
    flex-direction: row;
    width: auto;
    background: transparent;
    border-radius: 0;
  }

  main {
    margin-top: 64px;
    margin-bottom: 25px;
  }

  .cards-grid .card {
    max-width: 400px;
  }
}

/* Medium screens: two-column grid for lists */
@media (min-width: 992px) {
  .navbar-container {
    max-width: 960px;
    padding: 0.5rem 2rem;
  }
  .card--img {
    height: 300px;
  }
  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    padding: 0;
  }
  .navbar-search-form input {
    width: 220px;
  }

  .cards-grid .card {
    height: 457px;
  }
}

/* Large screens: 3 columns */
@media (min-width: 1200px) {
  .card--img {
    height: 320px;
  }
  .cards-grid {
    gap: 1.5rem;
  }
  .navbar-container {
    max-width: var(--container-max);
    padding: 0.5rem 0;
  }
  .cards-grid .card {
    height: 481px;
  }
}

/* --- Forms, buttons, links (theme) --- */
a {
  color: var(--primary-start);
  transition: color 0.22s ease;
}
a:hover {
  color: var(--primary-accent);
  text-decoration: underline;
}

button,
input[type='submit'],
input[type='button'] {
  background: linear-gradient(90deg, var(--primary-start), var(--primary-end));
  color: var(--white);
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}
button.secondary {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--dark);
}
button:active {
  transform: translateY(1px);
}

/* Inputs */
input[type='text'],
input[type='number'],
textarea,
select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--muted);
  background: var(--white);
  color: var(--dark);
  font-size: 1rem;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-start);
  box-shadow: 0 0 0 4px rgba(26, 43, 253, 0.06);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}
th,
td {
  padding: 0.75rem;
  border: 1px solid #e8eef9;
  text-align: left;
}
th {
  background: var(--primary-start);
  color: var(--white);
}

/* Utilities */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.small {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Lightbox & gallery keep your settings (thumbs 150x100) */
.gallery-carousel {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
}
.gallery-carousel .thumb {
  flex: 0 0 auto;
  width: 150px;
  height: 100px;
  border-radius: 4px;
  overflow: hidden;
  scroll-snap-align: start;
}
.gallery-carousel .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}
.gallery-carousel .thumb:hover img {
  transform: scale(1.08);
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 3000;
  padding: 1rem;
}
.lightbox:target {
  display: flex;
}
.lightbox img {
  max-width: 92%;
  max-height: 92%;
  border-radius: 6px;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 2rem;
  color: var(--white);
  text-decoration: none;
}

.container {
  width: 100%;
  padding: 0.75rem 1rem;
}

@media (min-width: 768px) {
  .container {
    width: 100%;
    padding: 0.6rem 1.25rem;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
    margin: auto;
    padding: 0.5rem 2rem;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: var(--container-max);
    margin: auto;
    padding: 0.5rem 0;
  }
}

.results-container {
  margin: 0 auto;
  max-width: var(--container-max);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
  color: var(--white);
}

.btn-home-outline {
  border: 1px solid var(--primary-start);
}

.btn-outline {
  background: transparent;
  border: 1px solid #e6eef9;
  color: var(--dark);
}

.filters-form .btn-secondary,
.btn.secondary,
button.secondary {
  background: transparent;
  color: var(--dark);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
}

.promotion-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: red;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: bold;
}

.presale-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: orange;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: bold;
}

nav.breadcrumb {
  visibility: hidden;
}
/* End of file */
