/* =============================================================
   SHOP.CSS — Tienda (archive-product) + estilos comunes de cards
   ============================================================= */

/* ── HERO TIENDA ─────────────────────────────────────────── */
.cd-shop-hero {
    background: linear-gradient(135deg, #F0F5FF 0%, #F0FDF8 100%);
    padding: 4rem 0 2.5rem;
    border-bottom: 1px solid var(--cd-border-light);
}
.cd-shop-hero__title {
    font-family: var(--cd-font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--cd-text);
    margin: 0 0 0.75rem;
}
.cd-shop-hero__desc {
    font-size: 1.125rem;
    color: var(--cd-text-light);
    max-width: 520px;
    margin: 0;
    line-height: 1.6;
}

/* ── MAIN ────────────────────────────────────────────────── */
.cd-shop-main { padding: 3rem 0 5rem; }

/* ── TOPBAR ──────────────────────────────────────────────── */
.cd-shop-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--cd-border-light);
}
.cd-shop-topbar__count {
    font-size: 0.9rem;
    color: var(--cd-text-muted);
    margin: 0;
}
.cd-shop-topbar__order .woocommerce-ordering { margin: 0; }
.cd-shop-topbar__order select {
    padding: 0.5rem 2.25rem 0.5rem 0.875rem;
    border: 1.5px solid var(--cd-border);
    border-radius: 0.5rem;
    font-family: var(--cd-font-body);
    font-size: 0.875rem;
    color: var(--cd-text);
    background: var(--cd-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A6A85' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 0.75rem center;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.cd-shop-topbar__order select:focus {
    outline: none;
    border-color: var(--cd-primary);
    box-shadow: 0 0 0 3px rgba(0,102,255,0.1);
}

/* ── GRID DE PRODUCTOS ───────────────────────────────────── */
.cd-shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}
@media (max-width: 1024px) { .cd-shop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .cd-shop-grid { grid-template-columns: 1fr; gap: 1.25rem; } }

/* ── CARD DE PRODUCTO ────────────────────────────────────── */
.cd-product-card {
    background: var(--cd-bg);
    border: 1px solid var(--cd-border-light);
    border-radius: 1rem;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    list-style: none;
}
.cd-product-card:hover {
    box-shadow: 0 8px 32px rgba(0,102,255,0.14);
    transform: translateY(-5px);
    border-color: var(--cd-primary);
}

/* Imagen */
.cd-product-card__img-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--cd-bg-alt);
    text-decoration: none;
}
.cd-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}
.cd-product-card:hover .cd-product-card__img { transform: scale(1.06); }
.cd-product-card__no-img {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--cd-border);
    background: linear-gradient(135deg, var(--cd-bg-alt), var(--cd-primary-light));
}

/* Badge */
.cd-badge {
    position: absolute;
    top: 12px; left: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    z-index: 2;
    line-height: 1.5;
}
.cd-badge--digital { background: var(--cd-primary); color: #fff; }
.cd-badge--sale    { background: var(--cd-accent); color: #fff; }
.cd-badge--nuevo   { background: var(--cd-secondary); color: #fff; }

/* Hover overlay */
.cd-product-card__hover {
    position: absolute; inset: 0;
    background: rgba(0,102,255,0.82);
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    color: #fff;
    font-family: var(--cd-font-display);
    font-weight: 600;
    font-size: 1rem;
}
.cd-product-card:hover .cd-product-card__hover { opacity: 1; }

/* Body */
.cd-product-card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.375rem;
}
.cd-product-card__cat {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--cd-secondary-dark);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.cd-product-card__title {
    font-family: var(--cd-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}
.cd-product-card__title a { color: var(--cd-text); text-decoration: none; }
.cd-product-card__title a:hover { color: var(--cd-primary); }
.cd-product-card__excerpt {
    font-size: 0.875rem;
    color: var(--cd-text-muted);
    line-height: 1.6;
    flex: 1;
    margin: 0;
}
.cd-product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--cd-border-light);
    margin-top: auto;
    flex-wrap: wrap;
}
.cd-product-card__price {
    font-family: var(--cd-font-display);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--cd-text);
    line-height: 1;
}
.cd-product-card__price .woocommerce-Price-amount { color: var(--cd-text); }
.cd-product-card__price ins { text-decoration: none; }
.cd-product-card__price del {
    color: var(--cd-text-muted);
    font-size: 0.875rem;
    font-weight: 400;
    margin-right: 4px;
    opacity: 0.7;
}

/* Botón dentro de card */
.cd-product-card .cd-btn--sm {
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── VACÍO ───────────────────────────────────────────────── */
.cd-shop-vacio {
    text-align: center;
    padding: 6rem 0;
}
.cd-shop-vacio__icono { font-size: 4rem; margin-bottom: 1.5rem; }
.cd-shop-vacio h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--cd-text);
}
.cd-shop-vacio p { color: var(--cd-text-muted); margin-bottom: 2rem; }

/* ── PAGINACIÓN ──────────────────────────────────────────── */
.cd-shop-paginacion { margin-top: 3.5rem; }
.cd-shop-paginacion .woocommerce-pagination ul {
    display: flex; justify-content: center; gap: 0.5rem;
    list-style: none; padding: 0; margin: 0; border: none;
}
.cd-shop-paginacion .woocommerce-pagination ul li { border: none; }
.cd-shop-paginacion .woocommerce-pagination ul li a,
.cd-shop-paginacion .woocommerce-pagination ul li span {
    display: flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; padding: 0 0.5rem;
    border: 1.5px solid var(--cd-border);
    border-radius: 0.5rem;
    font-weight: 600; font-size: 0.875rem;
    color: var(--cd-text-light);
    transition: all 0.2s;
    text-decoration: none;
}
.cd-shop-paginacion .woocommerce-pagination ul li a:hover {
    border-color: var(--cd-primary); color: var(--cd-primary);
}
.cd-shop-paginacion .woocommerce-pagination ul li span.current {
    background: var(--cd-primary); border-color: var(--cd-primary); color: #fff;
}
