/* ==========================================
   1. VARIABLES GLOBALES Y RESET
   ========================================== */
:root {
  --bg-header: #21130d;
  --bg-body: #f7f3ee;
  --bg-card: #ffffff;
  --bg-card-secondary: #f3ece4;
  --text-dark: #2b1a10;
  --text-muted: #726257;
  --accent-brown: #5a3825;
  --accent-orange: #c86831;
  --btn-green: #3d7037;
  --btn-green-hover: #325c2d;
  --price-red: #c83827;
  --border-color: #ebdcd0;
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  --card-bg: #f5efe6;
  --btn-accent: #a05c37;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: var(--bg-body);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================
   2. ENCABEZADO Y NAVEGACIÓN (HEADER)
   ========================================== */
.header {
  background-color: var(--bg-header);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 60px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
}

.logo-taza-icon {
  width: 44px;
  height: 44px;
  stroke: #ffffff;
  flex-shrink: 0;
}

.logo-texto {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}

.logo-texto .subtitulo {
  font-family: 'Dancing Script', cursive;
  font-size: 1.1rem;
  color: #ffffff;
}

.logo-texto .titulo {
  font-family: 'Dancing Script', cursive;
  font-size: 1.7rem;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-links a {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 400;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  opacity: 0.8;
}

.btn-mi-pedido,
.btn-pedido {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  background-color: var(--accent-orange) !important;
  color: #ffffff !important;
  padding: 8px 18px !important;
  font-size: 0.88rem !important;
  font-weight: 500 !important;
  border-radius: 20px !important;
  transition: background-color 0.2s ease !important;
  margin-left: 20px !important;
}

.btn-mi-pedido:hover,
.btn-pedido:hover {
  background-color: #b35926 !important;
}

.badge-count {
  background-color: #ffffff;
  color: var(--accent-orange);
  font-size: 0.75rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================
   3. HERO BANNER
   ========================================== */
.hero, .page-title-banner, .cart-hero {
  background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), 
              url('https://images.unsplash.com/photo-1495474472287-4d71bcdd2085?q=80&w=1200') center/cover no-repeat;
  padding: 42px 20px;
  text-align: center;
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-text, .banner-content, .hero-content {
  color: #ffffff;
  text-align: center;
}

.hero-text h1, .banner-content h1, .hero-content h1 {
  font-size: 2.3rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.hero-divider {
  font-size: 0.95rem;
  margin: 2px 0 6px;
  opacity: 0.9;
}

.hero-text p, .banner-content p, .hero-content p {
  font-size: 0.92rem;
  opacity: 0.9;
}

/* ==========================================
   4. CATÁLOGO CON TÍTULO CENTRADO Y MENÚ BIEN A LA ESQUINA DERECHA
   ========================================== */
.products-section {
  max-width: 100%;
  margin: 30px 0;
  padding: 0 15px;
}

/* CABECERA: POSICIÓN RELATIVA TOTAL */
.catalog-header {
  position: relative;
  display: flex;
  justify-content: center; /* Titulo perfectamente centrado en pantalla */
  align-items: center;
  min-height: 60px;
  margin-bottom: 15px;
  width: 100%;
}

/* TÍTULO Y SUBTÍTULO CENTRADOS */
.title-container {
  text-align: center;
}

.section-title {
  font-size: 1.8rem;
  color: var(--bg-header);
  font-weight: 700;
  margin: 0;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

/* BARRA DESPLEGABLE PEGADA A LA EXTREMA DERECHA */
.custom-dropdown {
  position: absolute;
  top: 50%;
  right: 5px; /* Pegado bien a la esquina derecha de la pantalla */
  transform: translateY(-50%);
  width: 200px;
  z-index: 10;
}

.styled-select {
  width: 100%;
  padding: 10px 36px 10px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-md);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.styled-select:hover,
.styled-select:focus {
  border-color: var(--accent-orange);
  box-shadow: 0 3px 10px rgba(200, 104, 49, 0.15);
}

/* FLECHA DEL MENÚ DESPLEGABLE */
.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-brown);
  font-size: 0.8rem;
  pointer-events: none;
  transition: color 0.2s ease;
}

.styled-select:focus + .select-arrow {
  color: var(--accent-orange);
}

.styled-select option {
  background-color: #ffffff;
  color: var(--text-dark);
  padding: 10px;
  font-size: 0.88rem;
}

/* GRILLA DE PRODUCTOS LIMITADA A ANCHO CÓMODO */
.product-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
}

.product-card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.product-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.product-card-title {
  padding: 12px 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

/* ==========================================
   5. VISTA DETALLE DE PRODUCTO
   ========================================== */
.container-detail {
  max-width: 900px;
  margin: 30px auto;
  padding: 0 20px;
}

.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 25px;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs span,
.breadcrumbs .active {
  color: var(--accent-orange);
  font-weight: 600;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  align-items: start;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-image-container {
  width: 100%;
  height: 360px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.detail-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-add-cart {
  background-color: #53311c;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.btn-add-cart:hover {
  background-color: #3d2313;
}

.btn-add-cart svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
}

.product-detail-title {
  font-size: 2.1rem;
  font-weight: 700;
  color: #2c1a11;
  text-align: center;
  margin-bottom: 6px;
}

.title-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.title-divider .line {
  height: 1px;
  width: 120px;
  background-color: #d8c7b8;
}

.grano-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.product-description {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #4a382c;
  text-align: center;
  margin-bottom: 30px;
}

.info-layout,
.info-content {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.ingredients-section {
  flex: 1;
}

.ingredients-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.ingredients-title,
.ingredients-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2c1a11;
}

.ingredients-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ingredients-list li {
  font-size: 0.83rem;
  color: #4a382c;
  position: relative;
  padding-left: 14px;
}

.ingredients-list li::before {
  content: "•";
  color: #53311c;
  font-size: 1rem;
  position: absolute;
  left: 0;
  top: -2px;
}

.cards-column,
.cards-section {
  width: 190px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
}

.info-card,
.card-box {
  background-color: #f3ece4;
  border-radius: 12px;
  padding: 16px 14px;
}

.price-card {
  text-align: center;
}

.price-header,
.price-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.price-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #8c4217;
}

.price-subtitle,
.price-label {
  font-size: 0.72rem;
  color: #7d6b5d;
  margin-top: 2px;
}

.badges-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-icon,
.badge-icon-bg {
  width: 28px;
  height: 28px;
  background-color: #e5d8cb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.badge-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #2c1a11;
  line-height: 1.2;
}

/* ==========================================
   6. CARRITO
   ========================================== */
.cart-container {
  max-width: 1180px;
  margin: 30px auto;
  padding: 0 20px;
}

.user-data-card {
  background-color: #fcf8f3;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 25px;
}

.user-icon {
  background-color: var(--accent-orange);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.user-info-text h3, .user-inputs h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
}

.user-info-text p, .user-inputs p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.user-input-group {
  margin-left: auto;
}

.input-name {
  padding: 9px 14px;
  border: 1px solid #dcd0c5;
  border-radius: var(--border-radius-sm);
  width: 300px;
  outline: none;
  font-size: 0.85rem;
  background-color: #ffffff;
  color: var(--text-dark);
}

.input-name::placeholder {
  color: #b0a398;
}

.cart-layout, .cart-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 25px;
  align-items: start;
}

.cart-table-card, .cart-items-section {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
}

.cart-table-header h3, .summary-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid #f0e8e0;
  padding-bottom: 12px;
}

.cart-table th:nth-child(2),
.cart-table th:nth-child(3),
.cart-table th:nth-child(4),
.cart-table th:nth-child(5) {
  text-align: center;
}

.cart-table td {
  padding: 16px 0;
  border-bottom: 1px solid #f0e8e0;
  font-size: 0.88rem;
  vertical-align: middle;
}

.product-col, .product-info-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.product-col img, .product-info-cell img {
  width: 65px;
  height: 65px;
  border-radius: 8px;
  object-fit: cover;
}

.product-col strong, .product-info-cell strong {
  font-size: 0.88rem;
  color: var(--text-dark);
  display: block;
  font-weight: 600;
}

.product-col p, .product-info-cell p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.25;
}

.unit-price, .subtotal-price {
  text-align: center;
  font-weight: 500;
  color: var(--text-dark);
}

.quantity-control, .qty-selector {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dfd5cb;
  border-radius: 4px;
  overflow: hidden;
  margin: 0 auto;
}

.quantity-control button, .qty-selector button {
  background: transparent;
  border: none;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-dark);
  transition: background 0.15s;
}

.quantity-control button:hover, .qty-selector button:hover {
  background-color: #f2e9e1;
}

.quantity-control span, .qty-selector span {
  padding: 0 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.btn-delete {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.05rem;
  display: block;
  margin: 0 auto;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.btn-delete:hover {
  opacity: 1;
}

.cart-actions {
  display: flex;
  gap: 20px;
  margin-top: 25px;
}

.action-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.btn-secondary {
  width: 100%;
  text-align: center;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #b89882;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.88rem;
  background-color: transparent;
  transition: background-color 0.2s ease;
}

.btn-secondary:hover {
  background-color: #f7f0e9;
}

.btn-confirm, .btn-confirmar-pedido {
  width: 100%;
  background-color: var(--btn-green);
  color: #ffffff;
  border: none;
  padding: 11px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: block;
  text-align: center;
}

.btn-confirm:hover, .btn-confirmar-pedido:hover {
  background-color: var(--btn-green-hover);
}

.action-caption {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
}

.summary-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
}

.summary-card h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
}

.summary-divider {
  border-top: 1px solid #f0e8e0;
  margin: 12px 0;
}

.summary-divider.dashed {
  border-top: 1px dashed #dcd0c5;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--text-dark);
}

.total-row, .summary-total {
  font-weight: 700;
  font-size: 0.95rem;
  align-items: center;
  margin-top: 14px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
}

.total-price {
  color: var(--price-red);
  font-size: 1.35rem;
  font-weight: 700;
}

.thank-you-box {
  background-color: #f8f3ed;
  border-radius: var(--border-radius-sm);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.thank-you-icon, .cup-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.thank-you-box p {
  font-size: 0.78rem;
  color: var(--text-dark);
  line-height: 1.35;
}

.thank-you-box p.sub {
  color: var(--text-muted);
  margin-top: 3px;
}

/* ==========================================
   7. ACERCA DE NOSOTROS & CONTACTO
   ========================================== */
.page-container {
  max-width: 1050px;
  margin: 30px auto;
  padding: 0 20px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 35px;
  align-items: center;
}

.about-image-wrapper {
  width: 100%;
  height: 100%;
}

.about-image {
  width: 100%;
  height: 420px;
  border-radius: 18px;
  object-fit: cover;
  display: block;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-content p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.about-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 8px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 25px;
}

.feature-card {
  background-color: var(--card-bg);
  padding: 20px 15px;
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.feature-card i {
  font-size: 26px;
  color: var(--btn-accent);
}

.feature-card span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 25px;
  align-items: stretch;
}

.contact-info-card {
  background-color: var(--card-bg);
  padding: 30px 25px;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.info-item i {
  font-size: 20px;
  color: var(--btn-accent);
  margin-top: 2px;
  width: 20px;
  text-align: center;
}

.info-text h4 {
  font-size: 13px;
  color: var(--text-dark);
  font-weight: 700;
}

.info-text p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.contact-form-card {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 12px;
  outline: none;
  color: #333;
  background-color: #fafafa;
}

.form-group textarea {
  resize: none;
  height: 90px;
}

.btn-submit {
  width: 100%;
  background-color: var(--bg-header);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.3s;
}

.btn-submit:hover {
  background-color: var(--btn-accent);
}

.header-contacto-centrado {
  text-align: center;
  margin-bottom: 30px;
}

.header-contacto-centrado .section-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.header-contacto-centrado .section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 5px;
}

.divider-nosotros {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 10px 0 20px 0;
  width: 100%;
}

.divider-nosotros .linea {
  display: block;
  height: 1.5px;
  width: 80px;
  background-color: #a05c37;
  opacity: 0.6;
}

.divider-nosotros .grano-cafe-icon {
  transform: rotate(-35deg);
  display: inline-block;
  vertical-align: middle;
}

/* ==========================================
   8. PIE DE PÁGINA (FOOTER)
   ========================================== */
.footer {
  background-color: var(--bg-header);
  color: #d8c8bc;
  padding: 45px 20px 35px;
  margin-top: 60px;
}

.footer-container {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr 0.8fr;
  gap: 40px;
  align-items: start;
}

.logo-col .slogan {
  font-size: 0.85rem;
  line-height: 1.4;
  margin-top: 12px;
  color: #bfaea1;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.footer-col a {
  color: #d8c8bc;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #ffffff;
}

.contact-info li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #d8c8bc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #ffffff;
  transition: border-color 0.2s, background-color 0.2s;
}

.social-btn:hover {
  border-color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
}

/* ==========================================
   9. ADAPTABILIDAD (RESPONSIVE)
   ========================================== */
@media (max-width: 992px) {
  .catalog-header {
    flex-direction: column;
    justify-content: center;
  }

  .custom-dropdown {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 15px;
  }

  .cart-layout, .cart-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .product-detail-grid, 
  .info-layout, 
  .info-content, 
  .about-grid, 
  .contact-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
  
  .cards-column, 
  .cards-section {
    width: 100%;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 15px 20px;
    flex-direction: column;
    gap: 15px;
  }

  .cart-actions {
    flex-direction: column;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Ajustes añadidos para integración con el backend/API
   ========================================================== */
.product-card-price {
  padding: 6px 14px 0;
  color: var(--price-red);
  font-weight: 700;
}
.product-card-stock {
  padding: 4px 14px 14px;
  color: var(--text-muted);
  font-size: .78rem;
}
.btn-add-cart:disabled,
.btn-confirmar-pedido:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.user-input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.user-input-group input,
.user-input-group select,
.user-input-group textarea {
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: #fff;
  color: var(--text-dark);
}
.user-input-group textarea {
  min-height: 70px;
  flex-basis: 100%;
  resize: vertical;
}

@media (max-width: 760px) {
  .header {
    padding: 12px 18px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .nav-links {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 14px;
  }
  .custom-dropdown {
    position: static;
    transform: none;
    width: min(100%, 300px);
    margin-top: 12px;
  }
  .catalog-header {
    flex-direction: column;
  }
}


/* =========================================================
   RESPONSIVE MÓVIL — EXPERIENCIA DE COMPRA
   ========================================================= */

@media (max-width: 768px) {

  /* ---------------------------------------------------------
     1. ENCABEZADO Y NAVEGACIÓN
     --------------------------------------------------------- */

  .header {
    padding: 12px 16px;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .logo {
    width: 100%;
    justify-content: center;
  }

  .nav-links {
    width: 100%;
    margin-left: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    align-items: center;
  }

  .nav-links a {
    min-width: 0;
    padding: 6px 3px;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: normal;
  }

  /*
   * El carrito es la acción principal.
   * Lo colocamos arriba de los enlaces.
   */
  .nav-links .btn-mi-pedido {
    order: -1;
    grid-column: 1 / -1;

    justify-self: center;

    width: auto;
    margin-left: 0 !important;

    padding: 9px 18px !important;
    font-size: 0.82rem !important;
  }


  /* ---------------------------------------------------------
     2. HERO
     --------------------------------------------------------- */

  .hero,
  .page-title-banner,
  .cart-hero {
    padding: 32px 16px;
  }

  .hero-text h1,
  .banner-content h1,
  .hero-content h1 {
    font-size: 1.8rem;
    line-height: 1.15;
  }

  .hero-text p,
  .banner-content p,
  .hero-content p {
    font-size: 0.82rem;
  }


  /* ---------------------------------------------------------
     3. CONTENEDOR DEL CARRITO
     --------------------------------------------------------- */

  .cart-container {
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    padding: 0 12px;
  }


  /* ---------------------------------------------------------
     4. DATOS DEL CLIENTE
     --------------------------------------------------------- */

  .user-data-card {
    width: 100%;

    display: flex;
    flex-direction: column;

    align-items: stretch;

    padding: 18px 16px;
    gap: 12px;
  }

  .user-icon {
    align-self: center;
  }

  .user-info-text {
    width: 100%;
    text-align: center;
  }

  .user-info-text h3 {
    font-size: 1rem;
  }

  .user-info-text p {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .user-input-group {
    width: 100%;
    max-width: 100%;

    margin-left: 0;

    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .input-name,
  .input-phone,
  .input-email,
  .input-payment,
  .input-notes {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    box-sizing: border-box;
  }

  .input-name {
    width: 100%;
  }

  .input-notes {
    min-height: 100px;
    resize: vertical;
  }


  /* ---------------------------------------------------------
     5. TARJETA DE PRODUCTOS DEL CARRITO
     --------------------------------------------------------- */

  .cart-table-card {
    width: 100%;
    padding: 16px;
    overflow: hidden;
  }

  .cart-table-header h3 {
    font-size: 1rem;
    margin-bottom: 16px;
  }


  /* Ocultamos encabezado de tabla en móvil. */
  .cart-table thead {
    display: none;
  }

  .cart-table {
    display: block;
    width: 100%;
  }

  .cart-table tbody {
    display: block;
    width: 100%;
  }


  /*
   * Cada fila se convierte en una tarjeta.
   */
  .cart-table tbody tr {
    display: grid;

    grid-template-columns: minmax(0, 1fr) auto;

    gap: 12px;

    width: 100%;

    padding: 14px 0;

    border-bottom: 1px solid #f0e8e0;
  }

  .cart-table tbody td {
    display: block;

    padding: 0;

    border: none;

    min-width: 0;
  }


  /* ---------------------------------------------------------
     6. PRODUCTO
     --------------------------------------------------------- */

  .cart-table tbody td:nth-child(1) {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .product-col,
  .product-info-cell {
    width: 100%;
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 12px;
  }

  .product-col img,
  .product-info-cell img {
    width: 58px;
    height: 58px;

    flex-shrink: 0;
  }

  .product-col > div,
  .product-info-cell > div {
    min-width: 0;
    flex: 1;
  }

  .product-col strong,
  .product-info-cell strong {
    font-size: 0.88rem;
    line-height: 1.25;

    overflow-wrap: anywhere;
  }

  .product-col p,
  .product-info-cell p {
    font-size: 0.72rem;
    line-height: 1.25;
  }


  /* ---------------------------------------------------------
     7. PRECIO UNITARIO
     --------------------------------------------------------- */

  .cart-table tbody td:nth-child(2) {
    grid-column: 1;
    grid-row: 2;

    text-align: left;
  }

  .unit-price {
    text-align: left;

    font-size: 0.9rem;
    font-weight: 600;

    white-space: nowrap;
  }

  .unit-price::before {
    content: "Precio";

    display: block;

    margin-bottom: 3px;

    font-size: 0.68rem;
    font-weight: 500;

    color: var(--text-muted);
  }


  /* ---------------------------------------------------------
     8. SUBTOTAL
     --------------------------------------------------------- */

  .cart-table tbody td:nth-child(4) {
    grid-column: 2;
    grid-row: 2;

    text-align: right;
  }

  .subtotal-price {
    text-align: right;

    font-size: 0.9rem;
    font-weight: 700;

    white-space: nowrap;
  }

  .subtotal-price::before {
    content: "Subtotal";

    display: block;

    margin-bottom: 3px;

    font-size: 0.68rem;
    font-weight: 500;

    color: var(--text-muted);
  }


  /* ---------------------------------------------------------
     9. CONTROL DE CANTIDAD
     --------------------------------------------------------- */

  .cart-table tbody td:nth-child(3) {
    grid-column: 1;
    grid-row: 3;

    text-align: left;
  }

  .cart-table tbody td:nth-child(3)::before {
    content: "Cantidad";

    display: block;

    margin-bottom: 5px;

    font-size: 0.68rem;
    font-weight: 500;

    color: var(--text-muted);
  }

  .quantity-control {
    margin: 0;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border: 1px solid #dfd5cb;
    border-radius: 6px;

    overflow: hidden;
  }

  .quantity-control button {
    width: 34px;
    height: 34px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1rem;
  }

  .quantity-control input.input-cantidad {
    width: 42px;
    height: 34px;

    padding: 0;

    text-align: center;

    border: 0;
    border-left: 1px solid #dfd5cb;
    border-right: 1px solid #dfd5cb;

    border-radius: 0;

    font-size: 0.88rem;
  }


  /* ---------------------------------------------------------
     10. ELIMINAR PRODUCTO
     --------------------------------------------------------- */

  .cart-table tbody td:nth-child(5) {
    grid-column: 2;
    grid-row: 3;

    align-self: end;

    justify-self: end;
  }

  .btn-delete {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;
  }


  /* ---------------------------------------------------------
     11. FILAS ESPECIALES
     Cargando / carrito vacío
     --------------------------------------------------------- */

  .cart-table tbody td[colspan] {
    grid-column: 1 / -1 !important;

    width: 100%;

    text-align: center !important;
  }


  /* ---------------------------------------------------------
     12. BOTONES DEL CARRITO
     --------------------------------------------------------- */

  .cart-actions {
    width: 100%;

    flex-direction: column;

    gap: 12px;

    margin-top: 20px;
  }

  .action-item {
    width: 100%;
  }

  .btn-secondary,
  .btn-confirm,
  .btn-confirmar-pedido {
    width: 100%;
  }


  /* ---------------------------------------------------------
     13. RESUMEN
     --------------------------------------------------------- */

  .summary-card {
    width: 100%;
    padding: 18px 16px;
  }

  .summary-row,
  .total-row {
    gap: 12px;
  }

  .summary-row span:first-child,
  .total-row span:first-child {
    min-width: 0;
  }

  .summary-row span:last-child,
  .total-price {
    white-space: nowrap;
  }

  .total-price {
    font-size: 1.25rem;
  }
}

/* =========================================================
   AVISO DE PRODUCTO AGREGADO AL CARRITO
   ========================================================= */

.aviso-carrito {
    position: fixed;
    left: 50%;
    bottom: 20px;
    z-index: 9999;

    width: calc(100% - 32px);
    max-width: 520px;
    box-sizing: border-box;

    padding: 16px;
    border: 1px solid #e7d9ce;
    border-radius: 14px;

    background: #fffaf6;
    color: #241711;

    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translate(-50%, 16px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}

.aviso-carrito.activo {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translate(-50%, 0);
}

.aviso-carrito-mensaje {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

.aviso-carrito-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.aviso-carrito-ver,
.aviso-carrito-seguir {
    min-height: 42px;
    padding: 10px 14px;
    box-sizing: border-box;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;

    cursor: pointer;
}

.aviso-carrito-ver {
    flex: 1 1 180px;

    border: 1px solid #b95d2b;
    background: #b95d2b;
    color: #ffffff;
}

.aviso-carrito-seguir {
    flex: 1 1 150px;

    border: 1px solid #d8c9bd;
    background: #ffffff;
    color: #241711;
}

.aviso-carrito-ver:focus-visible,
.aviso-carrito-seguir:focus-visible {
    outline: 3px solid #6b9bd2;
    outline-offset: 3px;
}

@media (max-width: 480px) {
    .aviso-carrito {
        bottom: 12px;
        padding: 14px;
    }

    .aviso-carrito-acciones {
        flex-direction: column;
    }

    .aviso-carrito-ver,
    .aviso-carrito-seguir {
        width: 100%;
        flex-basis: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aviso-carrito {
        transition: none;
    }
}

/* Filtros de categorías del catálogo */
.category-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  margin: 24px auto 20px;
}

.category-chip {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-dark);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover {
  border-color: var(--accent-orange);
}

.category-chip.activo {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  color: #ffffff;
}

.category-chip:focus-visible {
  outline: 3px solid var(--accent-orange);
  outline-offset: 3px;
}

/* En celular, permitir deslizar las categorías horizontalmente */
@media (max-width: 600px) {
  .category-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px 2px 12px;
    margin-top: 20px;
    scrollbar-width: thin;
  }
}
