/**
 * CARNEDOM — CATALOG CSS
 * Separado del JS para caching correcto y menor parse time.
 * Cargar via: wp_enqueue_style('cdom-catalog', get_template_directory_uri().'/css/carnedom-catalog.css');
 */

/* ── ROOT ─────────────────────────────────────────────────────── */
#cdom-catalog {
  background: #1a1a1a;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 140px;
}

/* ── LOADING ─────────────────────────────────────────────────── */
.cdc-loading {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 60vh; gap: 20px;
}
.cdc-spinner {
  width: 32px; height: 32px;
  border: 2px solid rgba(176,48,48,0.2);
  border-top-color: #B03030;
  border-radius: 50%;
  animation: cdcSpin .8s linear infinite;
}
.cdc-loading p {
  font-size: 10px; letter-spacing: 4px;
  text-transform: uppercase; color: rgba(255,255,255,0.3);
}
@keyframes cdcSpin { to { transform: rotate(360deg); } }

/* ── HERO ────────────────────────────────────────────────────── */
.cdc-hero {
  padding: 80px 0 48px; text-align: center;
  position: relative;
  background: radial-gradient(ellipse at 50% 0%, rgba(207,10,10,0.06) 0%, transparent 60%);
}
.cdc-hero-eyebrow {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-bottom: 16px;
}
.cdc-hero-eyebrow span:first-child,
.cdc-hero-eyebrow span:last-child {
  width: 32px; height: 1px; background: #B03030; display: block;
}
.cdc-hero-eyebrow span:nth-child(2) {
  font-size: 10px; font-weight: 600;
  letter-spacing: 5px; text-transform: uppercase; color: #B03030;
}
.cdc-hero-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 300; line-height: 1;
  letter-spacing: -1px; margin: 0 0 16px;
}
.cdc-hero-title em { font-style: italic; color: #B03030; }
.cdc-hero-sub {
  font-size: 14px; color: rgba(255,255,255,0.4);
  line-height: 1.8; max-width: 420px; margin: 0 auto;
}

/* ── SEARCH ──────────────────────────────────────────────────── */
.cdc-search-bar {
  position: sticky; top: 0; z-index: 100;
  background: #1a1a1a;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cdc-search-wrap {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px; display: flex;
  align-items: center; gap: 10px; height: 52px;
}
.cdc-search-icon {
  color: rgba(255,255,255,0.22); flex-shrink: 0;
  width: 16px; height: 16px;
}
.cdc-search-icon::before {
  content: "⌕"; font-size: 18px; line-height: 1;
}
.cdc-search-input {
  background: none; border: none; outline: none;
  color: #fff; font-size: 16px;
  font-family: Montserrat, sans-serif;
  font-weight: 300; width: 100%; padding: 4px 0;
}
.cdc-search-clear {
  background: none; border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer; font-size: 14px; padding: 4px 8px;
}
.cdc-results {
  font-size: 10px; font-weight: 500;
  letter-spacing: 3px; text-transform: uppercase;
  color: rgba(255,255,255,0.2); margin-bottom: 16px;
  padding: 16px 0 0;
}
.cdc-empty {
  text-align: center; padding: 80px 0;
  color: rgba(255,255,255,0.3); font-size: 14px;
}

/* ── CATEGORIES ──────────────────────────────────────────────── */
#cdc-categories {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px 60px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.cdc-cat-wrap { border-bottom: 1px solid rgba(255,255,255,0.07); }
.cdc-cat-header {
  width: 100%; background: none; border: none;
  cursor: pointer; padding: 24px 0;
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  text-align: left; font-family: Montserrat, sans-serif;
}
.cdc-cat-left { display: flex; align-items: center; gap: 14px; }
.cdc-cat-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(22px, 3vw, 32px); font-weight: 300;
  color: rgba(255,255,255,0.75); letter-spacing: 1px;
  transition: color .3s;
}
.cdc-cat-wrap.open .cdc-cat-name { color: #fff; }
.cdc-cat-count {
  font-size: 10px; font-weight: 500;
  letter-spacing: 2px; color: rgba(255,255,255,0.2);
}
.cdc-chev {
  font-size: 20px; color: rgba(255,255,255,0.25);
  transition: transform .3s, color .3s;
  display: inline-block; transform: rotate(0deg);
}
.cdc-chev.open { transform: rotate(90deg); color: #B03030; }
.cdc-cat-panel { padding-bottom: 24px; }
.cdc-cat-note {
  font-size: 11px; color: rgba(255,255,255,0.22);
  font-style: italic; margin-bottom: 12px;
}
.cdc-sub-label {
  font-size: 9px; font-weight: 600;
  letter-spacing: 4px; text-transform: uppercase;
  color: rgba(255,255,255,0.18);
  padding: 16px 0 4px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  margin-top: 8px;
}

/* ── PRODUCT ROW ─────────────────────────────────────────────── */
.cdc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background .3s, padding .3s, margin .3s;
}
.cdc-row.active {
  background: rgba(176,48,48,0.04);
  margin: 0 -12px; padding: 14px 12px;
}
.cdc-info { flex: 1; min-width: 0; }
.cdc-name-row {
  display: flex; align-items: center;
  flex-wrap: wrap; gap: 6px;
}
.cdc-name {
  font-family: 'DM Sans', sans-serif;;
  font-size: 15px; font-weight: 400;
  color: rgba(255,255,255,0.82); transition: color .3s;
}
.cdc-row.active .cdc-name { color: #fff; }
.cdc-star {
  font-size: 7px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: #B03030; border: 1px solid rgba(176,48,48,0.25);
  border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.cdc-desc {
  display: none;
}
.cdc-price {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 300;
  color: rgba(255,255,255,0.85);
  white-space: nowrap; text-align: right; min-width: 80px;
}
.cdc-unit {
  font-size: 9px; font-family: Montserrat, sans-serif;
  color: rgba(255,255,255,0.28); margin-left: 3px; font-weight: 500;
}

/* ── QTY CONTROLS ────────────────────────────────────────────── */
.cdc-qty-wrap { flex-shrink: 0; }
.cdc-add-btn {
  background: none; border: 1px solid rgba(176,48,48,0.3);
  color: rgba(255,255,255,0.45); font-size: 16px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color .25s, color .25s;
  font-family: Montserrat, sans-serif;
}
.cdc-add-btn:hover { border-color: rgba(176,48,48,0.7); color: #fff; }
.cdc-qty {
  display: flex; align-items: center;
  border: 1px solid rgba(176,48,48,0.4);
}
.cdc-qb {
  background: none; border: none;
  color: rgba(255,255,255,0.5); font-size: 14px;
  width: 30px; height: 30px; cursor: pointer;
  font-family: Montserrat, sans-serif;
  display: flex; align-items: center; justify-content: center;
  transition: color .15s;
}
.cdc-qb:first-child { border-right: 1px solid rgba(176,48,48,0.2); }
.cdc-qb:last-child  { border-left:  1px solid rgba(176,48,48,0.2); }
.cdc-qb:hover { color: #fff; }
.cdc-qn {
  width: 38px; text-align: center;
  font-size: 13px; font-weight: 600; color: #fff;
  font-family: Montserrat, sans-serif;
  height: 30px; line-height: 30px;
}

/* ── CROSS-SELL ──────────────────────────────────────────────── */
.cdc-xsell {
  border-top: 1px solid rgba(255,255,255,0.55);
  padding: 64px 0; text-align: center; background: #1a1a1a;
}
.cdc-xsell-eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase;
  color: rgba(255,255,255,0.22); margin-bottom: 16px;
}
.cdc-xsell-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(28px, 4vw, 48px); font-weight: 300; margin-bottom: 12px;
}
.cdc-xsell-sub {
  font-size: 14px; color: rgba(255,255,255,0.33);
  line-height: 1.7; max-width: 460px; margin: 0 auto 32px;
}
.cdc-xsell-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  background: #B03030;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, gap 0.2s ease;
}
.cdc-xsell-link:hover {
  background: #8a2020;
  gap: 20px;
  color: #fff;
}
