/* ═══════════════════════════════════════════════════════
   WOO COUNTDOWN — GRID CARDS — DATXALE v7
   Diseño: imagen izquierda | detalles derecha
   ═══════════════════════════════════════════════════════ */

/* ── GRID ────────────────────────────────────────────── */
.wcdg-grid {
    display: grid;
    gap: 20px;
    width: 100%;
}
.wcdg-cols-1 { grid-template-columns: 1fr; }
.wcdg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wcdg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wcdg-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .wcdg-cols-3,
    .wcdg-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
    .wcdg-grid { grid-template-columns: 1fr !important; }
}

/* ── CARD ────────────────────────────────────────────── */
.wcdg-card {
    display: flex;
    flex-direction: row;
    border: 2px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    transition: box-shadow .25s ease, border-color .25s ease;
    position: relative;
    min-height: 280px;
}
.wcdg-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
    border-color: #cc0000;
}

/* Borde izquierdo rojo */
.wcdg-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: #cc0000;
    z-index: 1;
}

/* ── IMAGEN — ocupa 42% izquierdo ────────────────────── */
.wcdg-img-wrap {
    display: block;
    flex: 0 0 42%;
    max-width: 42%;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}
.wcdg-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .35s ease;
}
.wcdg-card:hover .wcdg-img-wrap img {
    transform: scale(1.04);
}

/* ── DETALLES — ocupa el 58% derecho ─────────────────── */
.wcdg-details {
    flex: 1;
    padding: 14px 16px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

/* ── SKU ─────────────────────────────────────────────── */
.wcdg-sku {
    font-size: 11px !important;
    color: #999 !important;
    margin: 0 !important;
    font-family: monospace;
    letter-spacing: 0.3px;
}

/* ── STOCK ───────────────────────────────────────────── */
.wcdg-stock {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}
.wcdg-stock.in  { color: #2e7d32; }
.wcdg-stock.out { color: #c62828; }

/* ── PRECIO ──────────────────────────────────────────── */
.wcdg-price {
    margin: 2px 0 !important;
}
.wcdg-price .woocommerce-Price-amount,
.wcdg-price bdi {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #cc0000 !important;
}
.wcdg-price del .woocommerce-Price-amount,
.wcdg-price del bdi {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #aaa !important;
}

/* ── COUNTDOWN en la card ────────────────────────────── */
.wcd-ctx-grid {
    margin: 4px 0 6px !important;
}
.wcd-ctx-grid .wcd-inner  { padding: 5px 8px 4px; }
.wcd-ctx-grid .wcd-label  { font-size: 9px !important; margin-bottom: 3px !important; }
.wcd-ctx-grid .wcd-num    { font-size: 17px !important; }
.wcd-ctx-grid .wcd-name   { font-size: 7px !important; }
.wcd-ctx-grid .wcd-sep    { font-size: 13px !important; margin-bottom: 8px; }
.wcd-ctx-grid .wcd-unit   { min-width: 26px; }

/* ── BOTONES ─────────────────────────────────────────── */
.wcdg-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

.wcdg-cart-form {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

/* Qty */
.wcdg-qty-wrap {
    display: flex;
    align-items: center;
    width: fit-content;
}
.wcdg-qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    transition: background .15s;
}
.wcdg-qty-btn:hover { background: #e0e0e0; }
.wcdg-qty-btn:first-child { border-radius: 3px 0 0 3px; }
.wcdg-qty-btn:last-child  { border-radius: 0 3px 3px 0; }
.wcdg-qty-input {
    width: 38px !important;
    height: 28px !important;
    border: 1px solid #ccc !important;
    border-left: 0 !important;
    border-right: 0 !important;
    text-align: center !important;
    font-size: 13px !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -moz-appearance: textfield;
    background: #fff !important;
}
.wcdg-qty-input::-webkit-outer-spin-button,
.wcdg-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Botón base */
.wcdg-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 10px;
    border: none;
    border-radius: 3px;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.4px;
    cursor: pointer;
    text-decoration: none !important;
    transition: opacity .2s, transform .15s;
    text-align: center;
    line-height: 1 !important;
    box-sizing: border-box;
}
.wcdg-btn:hover {
    opacity: .87;
    transform: translateY(-1px);
    text-decoration: none !important;
}

/* Carrito — rojo */
.wcdg-btn-cart {
    background: #cc0000 !important;
    color: #fff !important;
}
.wcdg-btn-cart:hover { color: #fff !important; }

/* WhatsApp — verde */
.wcdg-btn-wa {
    background: #25D366 !important;
    color: #fff !important;
}
.wcdg-btn-wa:hover { color: #fff !important; }
.wcdg-btn-wa svg   { flex-shrink: 0; }
