.cart-icon {
    position: relative;
    cursor: pointer;
    margin-right: 20px;
}

.cart-icon img {
    width: 30px;
    height: 30px;
}

#cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #195d7b;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(360px, 95vw); /* responsive */
    max-width: 360px;
    background: #f9f9f9;
    padding: 20px;
    box-shadow: -4px 0 18px rgba(0,0,0,0.18);
    z-index: 1100;
    transform: translateX(100%); /* oculto por defecto */
    transition: transform 0.3s ease;
    overflow-y: auto;
    border-left: 1px solid rgba(0,0,0,0.04);
}

/* Visible */
.cart-sidebar.active {
    transform: translateX(0);
}

/* Close button */
.close-cart {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    padding: 5px;
    border-radius: 6px;
}
.close-cart:hover {
    background: rgba(0,0,0,0.06);
}

/* Overlay behind sidebar */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1090;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

/* Overlay active */
.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Ajustes de items y botones dentro del sidebar */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 6px;
    border-bottom: 1px solid #eee;
}

.cart-item button {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
}

/* Mantener footer encima en pantallas pequeñas si es necesario */
.checkout-btn {
    width: 100%;
    padding: 12px;
    background: #195d7b;
    color: white;
    border: none;
    border-radius: 8px;
    margin-top: 18px;
    cursor: pointer;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #195d7b;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    animation: slideIn 0.3s ease;
    z-index: 1200;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.st-title {
    text-align: center;
    color: #fff;
    margin: 30px 0;
    font-size: 2em;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.cart-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.checkout-btn,
.factura-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, background-color 0.2s;
}

.checkout-btn {
    background: #195d7b;
    color: white;
}

.factura-btn {
    background: #2e3848;
    color: white;
}

.checkout-btn:hover,
.factura-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* NAV - copiar estilos del index para consistencia */
.navbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(18,24,27,0.95);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: 72px;
  z-index: 1000;
  width: 100%;
  box-sizing: border-box;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo img {
  height: 48px;
  width: auto;
  display: block;
  min-width: 30px;
}

/* Centro (marca). En st.html puede estar vacío, pero mantenemos el estilo */
.brand,
.nav-center {
  text-align: center;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* derecha: menú + carrito */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: flex-end;
}

/* lista de enlaces */
.nav-links {
  display: flex;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-links li { margin: 0; }
.nav-links a {
  color: #f3f3f3;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
}
.nav-links a:hover {
  background: rgba(255,255,255,0.04);
}

/* icono del carrito */
.cart-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
}
.cart-icon img {
  width: 34px;
  height: 34px;
  display: block;
}
#cart-count {
  background: #195d7b;
  color: #fff;
  border-radius: 50%;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 700;
  position: relative;
  top: -6px;
  right: 6px;
}

/* Asegurar que el contenido principal no quede oculto bajo el nav fijo.
   Ajusta este valor si tu navbar tiene otra altura. */
body {
  padding-top: 82px; /* navbar (72px) + 10px de separación */
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Responsive: ocultar enlaces y mostrar menú hamburguesa si se implementa */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .navbar { padding: 10px 12px; min-height: 60px; }
  .logo img { height: 40px; }
  .brand { font-size: 1rem; }
}

/* Mobile small adjustments */
@media (max-width: 480px) {
  .navbar { min-height: 50px; padding: 8px 10px; }
  .logo img { height: 32px; }
  .brand { font-size: 0.95rem; margin: 0 6px; }
  body { padding-top: 60px; }
}

/* Asegura que el sidebar del carrito se muestre sobre el contenido pero debajo del navbar si lo deseas */
.cart-sidebar {
  z-index: 1100; /* mayor que contenido, menor o igual a 1200 según tu preferencia */
}