/* ==========================================================================
   MULTI SERVICE DE LA COSTA S.A.S. — 3D POPOUT CATALOG CARDS (CLASH STYLE)
   ========================================================================== */

.catalog-section {
  padding: 60px 0 100px;
  background: var(--gray-50);
  min-height: 100vh;
}

/* CONTROLS & FILTER BAR */
.catalog-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 70px;
  background: #ffffff;
  padding: 24px 32px;
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 30px -10px rgba(8, 29, 52, 0.08);
  border: 1px solid rgba(10, 37, 64, 0.08);
}

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

.catalog-search-bar input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--gray-200);
  background: var(--gray-50);
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  color: var(--navy-950);
  outline: none;
  transition: all 0.3s var(--ease);
}

.catalog-search-bar input:focus {
  border-color: var(--green-500);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(94, 162, 38, 0.15);
}

.catalog-search-bar svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  color: var(--gray-500);
}

.filter-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-tab {
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  background: var(--gray-100);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.filter-tab:hover {
  color: var(--navy-900);
  background: var(--gray-200);
  transform: translateY(-1px);
}

.filter-tab.active-tab {
  background: var(--navy-900);
  color: #ffffff;
  box-shadow: 0 6px 18px -4px rgba(8, 29, 52, 0.3);
  border-color: var(--navy-900);
}

/* 3D POPOUT CATALOG GRID */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 65px 28px;
}

/* 3D POPOUT CARD CONTAINER (CLASH STYLE - EXTRA LARGE CHARACTERS) */
.catalog-card-3d {
  background: #ffffff;
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 45px -12px rgba(8, 29, 52, 0.12);
  border: 1px solid var(--gray-200);
  transition: all 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
  margin-top: 60px; /* Headroom for 3D characters */
}

.catalog-card-3d:hover {
  transform: translateY(-10px);
  box-shadow: 0 32px 65px -15px rgba(8, 29, 52, 0.24);
  border-color: var(--green-300);
}

/* TOP BACKDROP STAGE WITH POPOUT 3D RENDER */
.c-card-stage-3d {
  height: 140px;
  position: relative;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: visible;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.c-3d-glow-orb {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.85;
  pointer-events: none;
}

/* THE 3D IMAGE EXTENDING DRAMATICALLY OUT OF THE TOP FRAME (EXTRA LARGE) */
.c-3d-popout-img {
  position: absolute;
  top: -75px;
  height: 230px;
  width: auto;
  max-width: 150%;
  object-fit: contain;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  filter: 
    drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5))
    brightness(1.04);
  transition: all 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  pointer-events: none;
}

.catalog-card-3d:hover .c-3d-popout-img {
  transform: translateX(-50%) translateY(-14px) scale(1.20);
  filter: 
    drop-shadow(0 30px 45px rgba(0, 0, 0, 0.6)) 
    drop-shadow(0 0 30px rgba(147, 204, 92, 0.5));
}

.c-3d-badge {
  position: absolute;
  top: 40px;
  left: 16px;
  font-size: 11.5px;
  font-weight: 800;
  font-family: 'IBM Plex Mono', monospace;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  z-index: 6;
  transition: transform 0.3s var(--ease);
}

.catalog-card-3d:hover .c-3d-badge {
  transform: translateY(-2px) scale(1.04);
}

/* MAIN CARD BODY */
.c-card-body-3d {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: #ffffff;
}

.c-cat-label {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.c-card-title-3d {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy-900);
  line-height: 1.3;
  margin-bottom: 10px;
}

.c-card-desc-3d {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 20px;
}

/* SPECS LIST */
.c-specs-3d {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
}

.c-spec-item-3d {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.4;
}

.c-spec-item-3d svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* BOTTOM FOOTER HIGHLIGHT STRIP & BUTTON (WARM THEMED) */
.c-card-footer-3d {
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  padding: 20px 24px 24px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 2;
}

.c-stats-strip-3d {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.c-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.c-stat-box .val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
}

.c-stat-box .lbl {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.c-stat-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
}

/* 3D INTEGRATED BUTTON */
.btn-3d-cta {
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  background: var(--green-500);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(94, 162, 38, 0.4);
  transition: all 0.3s var(--ease);
  font-family: 'Space Grotesk', sans-serif;
}

.btn-3d-cta:hover {
  background: var(--green-400);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(94, 162, 38, 0.55);
}

.btn-3d-cta.added {
  background: var(--gold-500);
  color: var(--navy-950);
  box-shadow: 0 8px 20px rgba(227, 167, 62, 0.4);
}

/* QUOTE DRAWER SLIDE-OVER OVERLAY */
.quote-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 20, 36, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s var(--ease);
}

.quote-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.quote-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 100%;
  background: #ffffff;
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.quote-drawer-overlay.open .quote-drawer {
  transform: translateX(0);
}

.drawer-header {
  padding: 24px 28px;
  background: var(--navy-950);
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.drawer-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.drawer-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  transition: all 0.25s var(--ease);
}

.cart-item-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy-900);
}

.cart-item-cat {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.cart-item-remove {
  background: rgba(231, 76, 60, 0.1);
  border: none;
  color: #E74C3C;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s var(--ease);
}

.cart-item-remove:hover {
  background: #E74C3C;
  color: #ffffff;
}

.cart-empty-msg {
  text-align: center;
  color: var(--gray-500);
  font-size: 15px;
  margin: auto 0;
  padding: 40px 20px;
  line-height: 1.6;
}

.drawer-footer {
  padding: 20px 28px 28px;
  border-top: 1px solid var(--gray-200);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-items-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}

.drawer-clear-link {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: #E74C3C;
  cursor: pointer;
  padding: 0;
  opacity: 0.8;
}

.drawer-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  background: #25D366;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.35);
  transition: all 0.25s var(--ease);
  font-family: 'Space Grotesk', sans-serif;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 1100px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 75px 28px;
  }
}

@media (max-width: 768px) {
  .catalog-controls {
    padding: 20px;
    margin-bottom: 60px;
  }
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 75px;
  }
  .catalog-card-3d {
    margin-top: 65px;
  }
  .filter-tabs {
    overflow-x: auto;
    padding-bottom: 8px;
    flex-wrap: nowrap;
  }
  .c-3d-popout-img {
    height: 200px;
    top: -65px;
  }
}

/* ── BOTÓN WHATSAPP EN CARDS DEL CATÁLOGO ───────────────────────────────── */
.btn-whatsapp.c-add-btn-3d {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--radius-lg);
  background: #25D366;
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.38);
  transition: all 0.3s var(--ease);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.01em;
}

.btn-whatsapp.c-add-btn-3d:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.55);
  color: #ffffff;
  text-decoration: none;
}

/* ── TAB AGRÍCOLA — ACENTO VERDE TIERRA ────────────────────────────────── */
.filter-tab:first-child {
  background: linear-gradient(135deg, #1B5E20 0%, #2E7D32 100%);
  color: #ffffff;
  border-color: transparent;
}

.filter-tab:first-child:hover {
  background: linear-gradient(135deg, #2E7D32 0%, #388E3C 100%);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(27, 94, 32, 0.35);
}

.filter-tab:first-child.active-tab {
  background: linear-gradient(135deg, #1B5E20 0%, #33691E 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(27, 94, 32, 0.5);
  border-color: #76C442;
}

/* ── FOTO DE PRODUCTO REAL EN CARD (MODO FOTO) ──────────────────────────── */
.c-card-stage-3d[style*="overflow:hidden"] {
  height: 200px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.c-card-stage-3d[style*="overflow:hidden"] .c-3d-badge {
  z-index: 5;
  top: 12px;
  left: 12px;
}

.c-card-stage-3d[style*="overflow:hidden"] .c-3d-glow-orb {
  display: none;
}
