/* ==========================================================================
   CIBERMERCADO ECOCOOP - ESTILOS GLOBALES UNIFICADOS
   Mercado Ecológico, Cooperativa Agrícola, Blog de Noticias y Logística Multimodal
   ========================================================================== */

:root {
    --cib-primary: #143d2b;
    --cib-primary-dark: #0d281c;
    --cib-secondary: #166534;
    --cib-accent: #10b981;
    --cib-accent-light: #d1fae5;
    --cib-terracotta: #c85a28;
    --cib-terracotta-hover: #b24d1f;
    --cib-terracotta-light: #ffedd5;
    --cib-gold: #f59e0b;
    --cib-danger: #dc2626;
    --cib-danger-bg: #fef2f2;
    --cib-bg-soft: #fbfbf8;
    --cib-text: #1e293b;
    --cib-text-muted: #64748b;
    --cib-border: #e2ece4;
    --cib-shadow: 0 4px 18px rgba(20, 61, 43, 0.08);
    --cib-radius: 14px;
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Reset básico */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    color: var(--cib-text);
    background-color: var(--cib-bg-soft);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Tipografía de Encabezados */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--cib-primary);
    line-height: 1.25;
    margin-top: 0;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; font-family: var(--font-sans); }

a {
    color: var(--cib-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--cib-primary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   ESTILOS PARA BLOQUES DE WORDPRESS (GUTENBERG)
   ========================================================================== */

.entry-content {
    font-family: var(--font-sans);
    color: #2d3748;
}

.entry-content p {
    font-size: 1.08rem;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

/* Alineaciones anchas de WordPress */
.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    max-width: 100vw;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Columnas de Gutenberg */
.wp-block-columns {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .wp-block-columns {
        flex-wrap: nowrap;
    }
}

.wp-block-column {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: var(--cib-radius);
    border: 1px solid var(--cib-border);
    box-shadow: var(--cib-shadow);
}

/* Botones de Gutenberg */
.wp-block-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.wp-block-button__link {
    display: inline-block;
    padding: 0.85rem 1.75rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    color: white !important;
    background: var(--cib-primary);
    text-decoration: none !important;
    transition: transform 0.15s ease, background 0.2s ease;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    background: var(--cib-primary-dark);
}

/* Separadores */
.wp-block-separator {
    border: none;
    height: 1px;
    background: var(--cib-border);
    margin: 3rem auto;
    max-width: 600px;
}

/* Citas */
.wp-block-quote {
    border-left: 4px solid var(--cib-gold);
    padding: 1.5rem 2rem;
    background: white;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
    font-style: italic;
    color: #4a5568;
}

/* ==========================================================================
   BLOG DE NOTICIAS & ARTÍCULOS EDITORIALES
   ========================================================================== */

.cib-blog-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cib-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(27, 67, 50, 0.12);
}

.cib-editorial-content {
    font-size: 1.12rem;
    line-height: 1.85;
}

.cib-editorial-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--cib-light-green);
    padding-bottom: 0.5rem;
}

.cib-editorial-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.cib-editorial-content ul, .cib-editorial-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.cib-editorial-content li {
    margin-bottom: 0.5rem;
}

/* Paginación de noticias */
.cib-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.cib-pagination .page-numbers {
    padding: 8px 14px;
    border: 1px solid var(--cib-border);
    border-radius: 6px;
    background: white;
    color: var(--cib-primary);
    font-weight: 600;
}

.cib-pagination .page-numbers.current {
    background: var(--cib-primary);
    color: white;
    border-color: var(--cib-primary);
}

/* ==========================================================================
   MERCADO Y TARJETAS DE COSECHAS
   ========================================================================== */

.cib-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cib-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(27, 67, 50, 0.12);
}

.cib-btn-add {
    transition: background 0.2s ease, transform 0.1s ease;
}

.cib-btn-add:hover {
    background: var(--cib-primary) !important;
    transform: scale(1.02);
}

.cib-btn-add:active {
    transform: scale(0.98);
}

/* Botones selectores de cliente (B2C / B2B) */
.cib-toggle-client.active {
    background: var(--cib-primary) !important;
    color: white !important;
    border-color: var(--cib-primary) !important;
}

/* ==========================================================================
   INSIGNIAS LOGÍSTICAS MULTIMODALES (SIN FRÍO)
   ========================================================================== */

.badge-scooter {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-van {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ==========================================================================
   TABLAS Y FORMULARIOS
   ========================================================================== */

.cib-table th {
    background: #f4f8f5;
    color: var(--cib-primary);
    font-weight: 700;
}

.cib-table td, .cib-table th {
    padding: 12px 14px;
    border-bottom: 1px solid var(--cib-border);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
    font-family: inherit;
    font-size: 14px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    padding: 10px 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--cib-secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.15);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 900px) {
    .cib-main-nav {
        display: none; /* Podrá expandirse con menú hamburguesa */
    }
    .cib-site-header .cib-container {
        padding: 10px 15px;
    }
}

/* ==========================================================================
   DISEÑO MODERNO DE TIENDA ECOLÓGICA (ESTILO FARMY / TALKUAL / CROWDFARMING)
   Colores del logo: Verde Bosque (#143d2b), Terracota (#c85a28), Lima (#10b981)
   ========================================================================== */

/* Hero Comercial Visual */
.cib-sales-hero {
    background: linear-gradient(135deg, rgba(16, 53, 36, 0.96) 0%, rgba(20, 78, 51, 0.92) 100%),
                url('https://images.unsplash.com/photo-1610832958506-aa56368176cf?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
    color: white;
    padding: 60px 20px 55px;
    position: relative;
    border-bottom: 4px solid var(--cib-terracotta);
}

.cib-hero-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(200, 90, 40, 0.25);
    border: 1px solid rgba(200, 90, 40, 0.6);
    color: #ffedd5;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}

.cib-hero-main-title {
    color: white !important;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    max-width: 820px;
}

.cib-hero-main-sub {
    color: #e2ece4;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.55;
    max-width: 680px;
    margin-bottom: 26px;
}

.cib-hero-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.cib-hero-badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.cib-hero-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--cib-terracotta) 0%, #e76f51 100%);
    color: white !important;
    font-weight: 800;
    font-size: 16px;
    padding: 14px 30px;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(200, 90, 40, 0.45);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.cib-hero-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(200, 90, 40, 0.55);
}

.cib-hero-sec-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.85);
    color: white !important;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 24px;
    border-radius: 50px;
    transition: all 0.2s;
    text-decoration: none;
}

.cib-hero-sec-btn:hover {
    background: white;
    color: var(--cib-primary) !important;
}

/* -------------------------------------------------------------
   BARRA VISUAL DE CATEGORÍAS (TABS INTERACTIVAS)
   ------------------------------------------------------------- */
.cib-cat-nav-container {
    background: white;
    border: 1px solid #e2ece4;
    border-radius: 20px;
    padding: 12px 18px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    margin: -25px auto 35px;
    position: relative;
    z-index: 10;
}

.cib-cat-nav-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}

.cib-cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8faf8;
    color: #334155;
    border: 1px solid #e2ece4;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    user-select: none;
}

.cib-cat-tab .cib-cat-icon {
    font-size: 18px;
}

.cib-cat-tab:hover {
    background: #f1f5f2;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.cib-cat-tab.active {
    background: linear-gradient(135deg, var(--cib-primary) 0%, #205c3d 100%);
    color: white;
    border-color: var(--cib-primary);
    box-shadow: 0 4px 14px rgba(20, 61, 43, 0.35);
    transform: translateY(-1px);
}

.cib-filter-status-pill {
    margin-top: 10px;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

/* -------------------------------------------------------------
   GRID Y TARJETAS DE PRODUCTO COMERCIALES
   ------------------------------------------------------------- */
.cib-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 28px;
    margin-bottom: 45px;
}

.cib-product-card-wrap {
    display: flex;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cib-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e6efe8;
    display: flex;
    flex-direction: column;
    width: 100%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.cib-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(20, 61, 43, 0.12);
}

.cib-card-img-wrap {
    height: 210px;
    overflow: hidden;
    position: relative;
    background: #f4f6f4;
}

.cib-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.cib-card:hover .cib-card-img-wrap img {
    transform: scale(1.05);
}

/* Stickers sobre imagen (Claramente informativos, NO botones) */
.cib-sticker-bio {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(16, 53, 36, 0.9);
    backdrop-filter: blur(4px);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    pointer-events: none;
    z-index: 2;
}

.cib-sticker-oferta {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #dc2626 0%, var(--cib-terracotta) 100%);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
    z-index: 2;
}

/* Overlay de Agotado */
.cib-overlay-agotado {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}

.cib-pill-agotado {
    background: #dc2626;
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Contenido de la tarjeta */
.cib-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cib-card-origin {
    font-size: 11.5px;
    color: var(--cib-terracotta);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cib-card-title {
    margin: 0 0 10px 0;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.25;
}

.cib-card-title a {
    color: var(--cib-primary);
    text-decoration: none;
    transition: color 0.15s;
}

.cib-card-title a:hover {
    color: var(--cib-terracotta);
}

/* Precios */
.cib-price-block {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
}

.cib-old-price {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 14px;
    font-weight: 600;
    margin-right: 6px;
}

.cib-current-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--cib-primary);
    letter-spacing: -0.5px;
}

.cib-price-unit {
    font-size: 13px;
    color: #64748b;
    font-weight: 700;
}

.cib-save-tag {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
}

/* Estado stock */
.cib-stock-label {
    margin: 10px 0 14px 0;
    font-size: 12.5px;
    font-weight: 700;
}

.cib-stock-label.in-stock {
    color: #15803d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cib-dot-live {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
    display: inline-block;
}

.cib-stock-label.out-of-stock {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #dc2626;
    padding: 6px 12px;
    border-radius: 8px;
    text-align: center;
}

/* Acciones de compra */
.cib-buy-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cib-qty-picker {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.cib-qty-btn {
    background: #f8fafc;
    border: none;
    color: #334155;
    width: 32px;
    height: 38px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cib-qty-btn:hover {
    background: #e2e8f0;
}

.cib-qty-picker input.cib-qty-input {
    width: 40px;
    height: 38px;
    border: none;
    text-align: center;
    font-weight: 800;
    font-size: 14px;
    padding: 0;
    -moz-appearance: textfield;
}

.cib-qty-picker input.cib-qty-input::-webkit-outer-spin-button,
.cib-qty-picker input.cib-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cib-btn-add {
    flex-grow: 1;
    background: linear-gradient(135deg, var(--cib-primary) 0%, #1e5c3e 100%);
    color: white;
    border: none;
    padding: 11px 16px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(20, 61, 43, 0.25);
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}

.cib-btn-add:hover {
    background: linear-gradient(135deg, var(--cib-terracotta) 0%, #e76f51 100%) !important;
    box-shadow: 0 6px 18px rgba(200, 90, 40, 0.35);
    transform: translateY(-1px);
}

.cib-btn-disabled {
    width: 100% !important;
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    border: 1px solid #cbd5e1 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    padding: 12px !important;
    border-radius: 10px !important;
    font-weight: 800 !important;
}

/* -------------------------------------------------------------
   BANNERS PROMOCIONALES VISUALES (ESTILO FARMY / TALKUAL)
   ------------------------------------------------------------- */
.cib-banners-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin: 40px 0 60px;
}

.cib-banner-card {
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    min-height: 190px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.cib-banner-1 {
    background: linear-gradient(135deg, rgba(200, 90, 40, 0.94) 0%, rgba(231, 111, 81, 0.9) 100%),
                url('https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=800&q=80') center/cover;
}

.cib-banner-2 {
    background: linear-gradient(135deg, rgba(20, 61, 43, 0.94) 0%, rgba(32, 92, 61, 0.9) 100%),
                url('https://images.unsplash.com/photo-1597362925123-77861d3fbac7?auto=format&fit=crop&w=800&q=80') center/cover;
}

.cib-banner-tag {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 10px;
    border-radius: 20px;
    align-self: flex-start;
    margin-bottom: 8px;
}

.cib-banner-title {
    font-size: 24px;
    font-weight: 800;
    color: white !important;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.cib-banner-desc {
    font-size: 14px;
    opacity: 0.95;
    margin: 0 0 14px 0;
    max-width: 380px;
}

.cib-banner-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: #1e293b;
    font-weight: 800;
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 30px;
    text-decoration: none;
    align-self: flex-start;
    transition: transform 0.15s;
}

.cib-banner-link:hover {
    transform: scale(1.04);
}

/* -------------------------------------------------------------
   3 PASOS VISUALES & BENEFICIOS ICONOGRÁFICOS
   ------------------------------------------------------------- */
.cib-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 30px 0 60px;
}

.cib-step-tile {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2ece4;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.cib-step-num {
    background: var(--cib-terracotta-light);
    color: var(--cib-terracotta);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    margin: 0 auto 12px;
}

.cib-step-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.cib-step-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--cib-primary);
    margin: 0 0 6px 0;
}

.cib-step-desc {
    font-size: 13.5px;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}
