/* Estilos para el Plugin de Tienda Virtual ConRumbo Digital */

:root {
    --crd-primary: #2563eb;
    --crd-primary-dark: #1d4ed8;
    --crd-primary-light: #eff6ff;
    --crd-accent: #f59e0b;
    --crd-success: #10b981;
    --crd-dark: #0f172a;
    --crd-text: #334155;
    --crd-text-muted: #64748b;
    --crd-card-bg: #ffffff;
    --crd-border: #e2e8f0;
    --crd-radius: 12px;
    --crd-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
    --crd-shadow-hover: 0 12px 24px -4px rgba(0, 0, 0, 0.1), 0 4px 8px -2px rgba(0, 0, 0, 0.05);
}

.crd-store-wrapper {
    font-family: inherit;
    color: var(--crd-text);
    margin-bottom: 50px;
}

/* Hero Header */
.crd-hero-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    border-radius: 16px;
    padding: 45px 30px;
    color: #ffffff;
    text-align: center;
    margin-bottom: 35px;
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.25);
    position: relative;
    overflow: hidden;
}

.crd-hero-banner h1 {
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    color: #ffffff !important;
}

.crd-hero-banner p {
    font-size: 1.15rem;
    opacity: 0.92;
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Filtros y Buscador */
.crd-filters-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    background: #ffffff;
    padding: 16px 20px;
    border-radius: var(--crd-radius);
    box-shadow: var(--crd-shadow);
    border: 1px solid var(--crd-border);
}

.crd-search-input {
    flex: 1;
    min-width: 260px;
    position: relative;
}

.crd-search-input input {
    width: 100%;
    padding: 10px 16px 10px 38px;
    border: 1px solid var(--crd-border);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s ease;
}

.crd-search-input input:focus {
    border-color: var(--crd-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.crd-search-input i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--crd-text-muted);
}

/* Grid de Cursos */
.crd-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 26px;
}

/* Tarjeta de Curso */
.crd-course-card {
    background: var(--crd-card-bg);
    border-radius: var(--crd-radius);
    border: 1px solid var(--crd-border);
    box-shadow: var(--crd-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.crd-course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--crd-shadow-hover);
}

.crd-card-thumb-wrap {
    height: 190px;
    position: relative;
    overflow: hidden;
    background-color: #f1f5f9;
}

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

.crd-course-card:hover .crd-card-thumb-wrap img {
    transform: scale(1.04);
}

.crd-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 6px;
    letter-spacing: 0.5px;
    z-index: 2;
}

.crd-badge-featured {
    background-color: var(--crd-accent);
    color: #ffffff;
}

.crd-badge-discount {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: var(--crd-success);
    color: #ffffff;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 6px;
}

.crd-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.crd-card-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--crd-primary);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.crd-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--crd-dark);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.crd-card-desc {
    font-size: 0.9rem;
    color: var(--crd-text-muted);
    line-height: 1.5;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.crd-card-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.crd-price-box {
    display: flex;
    flex-direction: column;
}

.crd-regular-price {
    font-size: 0.85rem;
    color: #94a3b8;
    text-decoration: line-through;
    margin-bottom: -2px;
}

.crd-main-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--crd-dark);
}

.crd-main-price small {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--crd-text-muted);
    margin-left: 2px;
}

.crd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.crd-btn-primary {
    background-color: var(--crd-primary);
    color: #ffffff !important;
}

.crd-btn-primary:hover {
    background-color: var(--crd-primary-dark);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.crd-btn-outline {
    background: transparent;
    border: 1px solid var(--crd-border);
    color: var(--crd-text) !important;
}

.crd-btn-outline:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

/* Ficha de Curso Detallada */
.crd-detail-header {
    background: #ffffff;
    border: 1px solid var(--crd-border);
    border-radius: var(--crd-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--crd-shadow);
}

.crd-detail-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--crd-dark);
    margin-bottom: 12px;
}

.crd-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) {
    .crd-detail-grid {
        grid-template-columns: 1fr;
    }
}

.crd-sidebar-buy {
    background: #ffffff;
    border: 1px solid var(--crd-border);
    border-radius: var(--crd-radius);
    padding: 24px;
    box-shadow: var(--crd-shadow);
    position: sticky;
    top: 20px;
}

/* Checkout */
.crd-checkout-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 30px;
}

@media (max-width: 860px) {
    .crd-checkout-grid {
        grid-template-columns: 1fr;
    }
}

.crd-form-card {
    background: #ffffff;
    border: 1px solid var(--crd-border);
    border-radius: var(--crd-radius);
    padding: 26px;
    box-shadow: var(--crd-shadow);
    margin-bottom: 24px;
}

.crd-form-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--crd-dark);
    margin-bottom: 8px;
}

.crd-form-group {
    margin-bottom: 16px;
}

.crd-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--crd-text);
    margin-bottom: 6px;
}

.crd-form-group input,
.crd-form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--crd-border);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.crd-form-group input:focus,
.crd-form-group select:focus {
    border-color: var(--crd-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Opciones de Gateway */
.crd-gateway-option {
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.crd-gateway-option:hover {
    border-color: #93c5fd !important;
    background-color: #f8fafc;
}

.crd-gateway-option input[type="radio"]:checked+div {
    color: #1e3a8a;
}

.crd-summary-card {
    background: #ffffff;
    border: 1px solid var(--crd-border);
    border-radius: var(--crd-radius);
    padding: 24px;
    box-shadow: var(--crd-shadow);
    position: sticky;
    top: 20px;
}

.crd-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.crd-summary-total {
    border-top: 2px dashed var(--crd-border);
    padding-top: 15px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--crd-dark);
}

/* Tabs Admin */
.crd-nav-tabs {
    display: flex;
    border-bottom: 2px solid var(--crd-border);
    margin-bottom: 24px;
    gap: 8px;
}

.crd-nav-tab {
    padding: 12px 20px;
    font-weight: 600;
    color: var(--crd-text-muted);
    text-decoration: none !important;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.crd-nav-tab.active {
    color: var(--crd-primary);
    border-bottom-color: var(--crd-primary);
}

.crd-nav-tab:hover:not(.active) {
    color: var(--crd-dark);
}

/* ==========================================================================
   Menú Superior Unificado de Tienda (crd-top-navbar)
   ========================================================================== */
.crd-top-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    background: #ffffff;
    border: 1px solid var(--crd-border);
    border-radius: var(--crd-radius);
    padding: 10px 18px;
    margin-bottom: 25px;
    box-shadow: var(--crd-shadow);
}

.crd-top-navbar-brand .crd-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    color: var(--crd-dark);
}

.crd-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--crd-primary-light);
    color: var(--crd-primary);
    border-radius: 8px;
    font-size: 1.05rem;
}

.crd-badge-store {
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: #e0e7ff;
    color: #3730a3;
    padding: 3px 8px;
    border-radius: 9999px;
    font-weight: 700;
    margin-left: 6px;
    display: inline-block;
}

.crd-top-navbar-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.crd-menu-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--crd-text);
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.crd-menu-item:hover {
    background: #f1f5f9;
    color: var(--crd-primary);
}

.crd-menu-item.active {
    background: var(--crd-primary-light);
    color: var(--crd-primary);
}

.crd-menu-admin {
    color: #0d9488;
}

.crd-menu-admin:hover,
.crd-menu-admin.active {
    background: #f0fdfa;
    color: #0f766e;
}

.crd-menu-settings {
    color: #6366f1;
}

.crd-menu-settings:hover,
.crd-menu-settings.active {
    background: #eef2ff;
    color: #4f46e5;
}

.crd-menu-campus {
    color: var(--crd-text-muted);
}

.crd-top-navbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.crd-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: #f8fafc;
    border: 1px solid var(--crd-border);
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--crd-dark);
    text-decoration: none !important;
    transition: all 0.2s;
}

.crd-user-chip:hover {
    background: #f1f5f9;
    color: var(--crd-primary);
}

@media (max-width: 768px) {
    .crd-top-navbar {
        flex-direction: column;
        align-items: stretch;
    }

    .crd-top-navbar-menu {
        justify-content: flex-start;
    }
}

/* ==========================================================================
   Contenedor 100% y Pestañas Laterales de Configuración (Lateral Tabs)
   ========================================================================== */
body.crd-admin-fullwidth #page.drawers .main-inner,
body.crd-admin-fullwidth #page-content,
body.crd-admin-fullwidth #region-main,
body.crd-admin-fullwidth #region-main-box,
body.crd-admin-fullwidth .crd-store-wrapper,
.crd-admin-container {
    max-width: 100% !important;
    width: 100% !important;
}

.crd-settings-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    width: 100%;
}

.crd-settings-sidebar {
    flex: 0 0 310px;
    width: 310px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.crd-side-tab {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid var(--crd-border);
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    position: relative;
    user-select: none;
    outline: none;
}

.crd-side-tab:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.crd-side-tab.active {
    background: #eff6ff;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.crd-side-tab.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 4px;
    background: #2563eb;
    border-radius: 0 4px 4px 0;
}

.crd-side-tab-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.crd-side-tab-icon.icon-store {
    background: #ecfdf5;
    color: #059669;
}

.crd-side-tab-icon.icon-stripe {
    background: #f5f3ff;
    color: #6366f1;
}

.crd-side-tab-icon.icon-mp {
    background: #e0f2fe;
    color: #0284c7;
}

.crd-side-tab-icon.icon-paypal {
    background: #eff6ff;
    color: #2563eb;
}

.crd-side-tab-info {
    flex: 1;
    min-width: 0;
}

.crd-side-tab-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.crd-side-tab-desc {
    display: block;
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.crd-side-tab.active .crd-side-tab-title {
    color: #1d4ed8;
}

.crd-side-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.crd-pill-success {
    background: #dcfce7;
    color: #15803d;
}

.crd-pill-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.crd-pill-warning {
    background: #fef3c7;
    color: #b45309;
}

.crd-pill-muted {
    background: #f1f5f9;
    color: #64748b;
}

.crd-sidebar-footer-box {
    background: #f8fafc;
    border: 1px solid var(--crd-border);
    border-radius: 12px;
    padding: 16px;
    margin-top: 10px;
}

.crd-settings-main {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.crd-settings-panel {
    display: none;
    animation: crdFadeIn 0.2s ease forwards;
}

.crd-settings-panel.active {
    display: block;
}

.crd-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--crd-border);
    padding-bottom: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.crd-panel-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.crd-panel-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--crd-border);
    padding-top: 20px;
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.crd-global-savebar {
    background: #ffffff;
    border: 1px solid var(--crd-border);
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: var(--crd-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    flex-wrap: wrap;
    gap: 14px;
}

@keyframes crdFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 960px) {
    .crd-settings-layout {
        flex-direction: column;
    }

    .crd-settings-sidebar {
        flex: 1 1 100%;
        width: 100%;
    }
}