/* ===========================================
   Lauben Uniformes – Catálogo
   Created by ElissaMedia.com
   =========================================== */

/* ── LAYOUT ─────────────────────────────── */
.catalogo-wrap {
  display: flex;
  min-height: 100vh;
  padding-top: 80px;
  background: var(--gray);
  align-items: flex-start;
}

/* ── LEFT SIDEBAR ───────────────────────── */
.cat-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--navy);
  padding: 2rem 0;
  position: fixed;
  top: 80px;
  left: 0;
  height: calc(100vh - 80px);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}

.cat-sidebar::-webkit-scrollbar { width: 4px; }
.cat-sidebar::-webkit-scrollbar-track { background: transparent; }
.cat-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 4px; }

.cat-sidebar-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  padding: 0 1.5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 0.5rem;
}

.cat-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: rgba(255,255,255,.7);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all .2s;
  text-decoration: none;
  background: none;
  border-top: none;
  border-right: none;
  border-bottom: none;
  width: 100%;
  text-align: left;
}

.cat-menu-item:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
}

.cat-menu-item.active {
  color: #fff;
  background: rgba(212,30,108,.15);
  border-left-color: var(--pink);
}

.cat-menu-item i {
  font-size: 1rem;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}

/* ── RIGHT PANEL ────────────────────────── */
.cat-panel {
  flex: 1;
  padding: 2rem;
  min-width: 0;
  margin-left: 240px;
}

/* ── CATEGORY BANNER ────────────────────── */
.cat-banner {
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  height: 180px;
  margin-bottom: 2rem;
  background: var(--navy);
}

.cat-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.4;
}

.cat-banner-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
}

.cat-banner-text h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: #fff;
  margin-bottom: 0.4rem;
  line-height: 1.1;
}

.cat-banner-text p {
  color: rgba(255,255,255,.75);
  font-size: 0.9rem;
  margin: 0;
  max-width: 480px;
}

.cat-banner-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--pink);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  letter-spacing: 0.05em;
}

/* ── PRODUCT CARDS ──────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(13,27,62,.07);
  display: flex;
  flex-direction: column;
  transition: border-color .2s;
}

.product-card:hover {
  border-color: rgba(212,30,108,.25);
}

.product-card-img {
  height: 200px;
  overflow: hidden;
  position: relative;
  background: var(--gray);
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}

.product-card:hover .product-card-img img {
  transform: scale(1.04);
}

.product-card-body {
  padding: 1rem 1.1rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-body h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.product-card-body p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 0.9rem;
}

/* Qty + Add row */
.product-card-action {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  margin-top: auto;
}

.qty-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.qty-input {
  width: 52px;
  border: 1.5px solid rgba(13,27,62,.15);
  border-radius: 8px;
  padding: 0.3rem 0.4rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  text-align: center;
  background: var(--gray);
}

.qty-input:focus {
  outline: none;
  border-color: var(--pink);
}

.btn-agregar {
  flex: 1;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}

.btn-agregar:hover { background: var(--pink-lt); }

.btn-agregar.added {
  background: #16a34a;
}

/* ── CART ICON (navbar) ─────────────────── */
.cart-btn {
  position: relative;
  background: rgba(255,255,255,.12);
  border: 1.5px solid rgba(255,255,255,.25);
  color: #fff;
  border-radius: 50px;
  padding: 0.4rem 0.9rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: background .2s, border-color .2s;
  text-decoration: none;
}

.cart-btn:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.5);
  color: #fff;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--pink);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 0.65rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  display: none;
}

.cart-badge.visible { display: flex; }

/* ── CART MODAL ─────────────────────────── */
.cart-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,27,62,.55);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}

.cart-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-modal {
  background: #fff;
  width: 100%;
  max-width: 560px;
  border-radius: 1.5rem 1.5rem 0 0;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(40px);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.cart-modal-overlay.open .cart-modal {
  transform: translateY(0);
}

.cart-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(13,27,62,.08);
  flex-shrink: 0;
}

.cart-modal-header h5 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--navy);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-close-btn {
  background: var(--gray);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--navy);
  font-size: 1rem;
  transition: background .2s;
}

.cart-close-btn:hover { background: rgba(13,27,62,.12); }

.cart-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.cart-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}

.cart-empty i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
  opacity: .35;
}

.cart-empty p {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0;
}

/* Cart item row */
.cart-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(13,27,62,.06);
}

.cart-item:last-child { border-bottom: none; }

.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gray);
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-info h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--navy);
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-info span {
  font-size: 0.75rem;
  color: var(--pink);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.qty-ctrl {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(13,27,62,.15);
  background: #fff;
  color: var(--navy);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  font-weight: 700;
  line-height: 1;
}

.qty-ctrl:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.cart-item-qty {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--navy);
  min-width: 24px;
  text-align: center;
}

.cart-remove-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(212,30,108,.08);
  color: var(--pink);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 0.25rem;
  transition: background .15s;
}

.cart-remove-btn:hover { background: rgba(212,30,108,.18); }

/* Cart footer */
.cart-modal-footer {
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid rgba(13,27,62,.08);
  flex-shrink: 0;
}

.cart-count-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.9rem;
  text-align: center;
}

.cart-footer-btns {
  display: flex;
  gap: 0.75rem;
}

.btn-cancel-cart {
  flex: 1;
  background: var(--gray);
  color: var(--navy);
  border: none;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: background .2s;
}

.btn-cancel-cart:hover { background: rgba(13,27,62,.1); }

.btn-solicitar-cart {
  flex: 2;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.btn-solicitar-cart:hover { background: var(--pink-lt); }
.btn-solicitar-cart:disabled {
  opacity: .45;
  cursor: default;
}

/* ── MOBILE SIDEBAR ─────────────────────── */
.sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 500;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.6rem 1.2rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  gap: 0.4rem;
  align-items: center;
  box-shadow: 0 4px 16px rgba(13,27,62,.3);
}

@media (max-width: 767.98px) {
  .catalogo-wrap {
    flex-direction: column;
    padding-top: 70px;
  }

  .cat-sidebar {
    width: 280px;
    height: calc(100vh - 70px);
    top: 70px;
    left: 0;
    padding: 1rem 0;
    transform: translateX(-100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    z-index: 400;
  }

  .cat-sidebar.open { transform: translateX(0); }

  .cat-panel {
    margin-left: 0;
    padding: 1.25rem;
    padding-top: 1.75rem;
    width: 100%;
  }

  .sidebar-toggle { display: flex; }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

  .product-card-img { height: 160px; }

  .product-card-action {
    flex-direction: column;
    align-items: stretch;
  }

  .qty-row {
    justify-content: space-between;
  }

  .btn-agregar {
    width: 100%;
    flex: none;
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem;
  }

  .cart-modal { border-radius: 1.25rem 1.25rem 0 0; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .cat-sidebar { width: 200px; }
  .cat-panel { margin-left: 200px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}

/* ── LOADING STATE ──────────────────────── */
.products-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--muted);
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  gap: 0.5rem;
}

.spin {
  animation: spin .8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── TOAST NOTIFICATION ─────────────────── */
.toast-lauben {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  z-index: 3000;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  white-space: nowrap;
  pointer-events: none;
}

.toast-lauben.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}