/**
 * ONA Club - Componentes Reutilizables
 * Botones, tarjetas, formularios, modales, badges, etc.
 */

/* ============================
   BOTONES
   ============================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
    border-radius: var(--border-radius);
    transition: all var(--transition-base);
    white-space: nowrap;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn--primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--text-on-primary);
    box-shadow: var(--shadow-gold);
}

.btn--primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
    box-shadow: 0 6px 25px rgba(var(--color-primary-rgb), 0.2);
}

.btn--secondary {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn--secondary:hover:not(:disabled) {
    background: rgba(var(--color-primary-rgb), 0.08);
}

.btn--ghost {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn--ghost:hover:not(:disabled) {
    background: var(--bg-card-hover);
    border-color: var(--color-primary);
}

.btn--danger {
    background: var(--color-error);
    color: white;
}

.btn--danger:hover:not(:disabled) {
    background: #c44539;
}

.btn--success {
    background: var(--color-success);
    color: white;
}

.btn--success:hover:not(:disabled) {
    background: #3d9568;
}

.btn--sm {
    padding: 8px 16px;
    font-size: var(--font-size-xs);
}

.btn--lg {
    padding: 16px 32px;
    font-size: var(--font-size-base);
}

.btn--full {
    width: 100%;
}

.btn--icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--border-radius-full);
}

.btn--icon.btn--sm {
    width: 32px;
    height: 32px;
}

.btn--loading .btn__text {
    visibility: hidden;
}

.btn--loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ============================
   TARJETAS
   ============================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    transition: all var(--transition-base);
}

.card:hover {
    border-color: rgba(var(--color-primary-rgb), 0.2);
    box-shadow: var(--shadow-md);
}

.card--elevated {
    box-shadow: var(--shadow-md);
}

.card--gold {
    border-color: var(--color-primary);
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(var(--color-primary-rgb), 0.04) 100%);
}

.card--interactive {
    cursor: pointer;
}

.card--interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.card__title {
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    color: var(--text-heading);
}

.card__subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

.card__body {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-loose);
}

.card__footer {
    margin-top: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card__image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: var(--space-md);
}

/* ============================
   FORMULARIOS
   ============================ */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    letter-spacing: var(--letter-spacing-wide);
}

.form-label--required::after {
    content: ' *';
    color: var(--color-error);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.12);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input--error {
    border-color: var(--color-error);
}

.form-input--error:focus {
    box-shadow: 0 0 0 3px rgba(212, 86, 74, 0.15);
}

.form-error {
    font-size: var(--font-size-xs);
    color: var(--color-error);
    margin-top: var(--space-xs);
}

.form-hint {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b8b2a8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Radio y Checkbox personalizados */
.form-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.form-option:hover {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.04);
}

.form-option input[type="radio"],
.form-option input[type="checkbox"] {
    display: none;
}

.form-option input:checked + .form-option__indicator {
    border-color: var(--color-primary);
    background: var(--color-primary);
}

.form-option input:checked ~ .form-option__text {
    color: var(--text-primary);
}

.form-option.selected {
    border-color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.06);
    color: var(--text-primary);
}

.form-option__indicator {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-full);
    transition: all var(--transition-fast);
    flex-shrink: 0;
    position: relative;
}

.form-option__indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.form-option input:checked + .form-option__indicator::after {
    opacity: 1;
}

.form-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-sm);
}

/* ============================
   MODAL / POPUP
   ============================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: var(--z-modal-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.3s ease;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-color);
}

.modal__title {
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    color: var(--text-heading);
}

.modal__close {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.modal__close:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.modal__body {
    padding: var(--space-lg);
}

.modal__footer {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* ============================
   BADGES
   ============================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-wide);
    text-transform: uppercase;
}

.badge--gold {
    background: rgba(var(--color-primary-rgb), 0.12);
    color: var(--color-primary);
}

.badge--success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.badge--warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.badge--error {
    background: var(--color-error-bg);
    color: var(--color-error);
}

.badge--info {
    background: var(--color-info-bg);
    color: var(--color-info);
}

.badge--outline {
    background: transparent;
    border: 1px solid currentColor;
}

/* ============================
   TABS
   ============================ */

.tabs {
    display: flex;
    gap: var(--space-xs);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-lg);
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
    font-weight: var(--font-weight-medium);
}

.tab:hover {
    color: var(--text-secondary);
}

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

/* ============================
   PROGRESS BAR
   ============================ */

.progress {
    width: 100%;
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.progress__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress__bar--success {
    background: linear-gradient(90deg, #3d9568, var(--color-success));
}

.progress__bar--animated {
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ============================
   COUNTDOWN
   ============================ */

.countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.countdown__unit {
    text-align: center;
    min-width: 56px;
}

.countdown__value {
    font-family: var(--font-heading);
    font-size: var(--font-size-2xl);
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    line-height: 1;
}

.countdown__label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wider);
    margin-top: 4px;
}

.countdown__separator {
    font-size: var(--font-size-xl);
    color: var(--text-muted);
    font-weight: var(--font-weight-bold);
    line-height: 1;
    margin-top: -8px;
}

/* ============================
   STAT CARD
   ============================ */

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    text-align: center;
}

.stat-card__value {
    font-family: var(--font-heading);
    font-size: var(--font-size-2xl);
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
}

.stat-card__label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wider);
    margin-top: var(--space-xs);
}

/* ============================
   AVATAR
   ============================ */

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-primary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar--lg {
    width: 64px;
    height: 64px;
    font-size: var(--font-size-xl);
}

.avatar--xl {
    width: 96px;
    height: 96px;
    font-size: var(--font-size-2xl);
}

/* ============================
   CHIP / TAG
   ============================ */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.chip--active {
    background: rgba(var(--color-primary-rgb), 0.10);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.chip--clickable {
    cursor: pointer;
}

.chip--clickable:hover {
    border-color: var(--color-primary);
}

/* ============================
   LIST ITEM
   ============================ */

.list-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: rgba(var(--color-primary-rgb), 0.03);
}

.list-item__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background: rgba(var(--color-primary-rgb), 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
}

.list-item__content {
    flex: 1;
    min-width: 0;
}

.list-item__title {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
}

.list-item__desc {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

.list-item__action {
    flex-shrink: 0;
}

/* ============================
   BLOG
   ============================ */

/* Header */
.blog-hero-header {
    text-align: center;
    padding: var(--space-xl) 0 var(--space-lg);
}

.blog-hero-header__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 3rem);
    letter-spacing: 0.12em;
    color: var(--text-heading);
    margin: 0 0 var(--space-xs);
}

.blog-hero-header__sub {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    max-width: 400px;
    margin: 0 auto;
}

/* Categories */
.blog-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: var(--space-xl);
}

.blog-cat-chip {
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: var(--font-weight-medium);
}

.blog-cat-chip:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.blog-cat-chip--active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

/* Featured Post */
.blog-featured {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: var(--space-xl);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.blog-featured:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.blog-featured__img-wrap {
    width: 100%;
    max-height: 360px;
    overflow: hidden;
}

.blog-featured__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.blog-featured:hover .blog-featured__img {
    transform: scale(1.03);
}

.blog-featured__body {
    padding: var(--space-lg) var(--space-xl);
}

.blog-featured__title {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    color: var(--text-heading);
    margin: var(--space-sm) 0;
    line-height: 1.3;
}

.blog-featured__excerpt {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

/* Blog Tag */
.blog-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.10);
    padding: 3px 10px;
    border-radius: 12px;
}

.blog-tag--sm {
    font-size: 10px;
    padding: 2px 8px;
}

/* Meta info */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.blog-meta--sm {
    font-size: 11px;
}

.blog-meta__dot {
    opacity: 0.4;
}

/* Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

/* Card */
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.blog-card__img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.blog-card__img-placeholder {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.06), rgba(var(--color-primary-rgb), 0.02));
    color: var(--text-muted);
}

.blog-card__body {
    padding: var(--space-md);
}

.blog-card__title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--text-heading);
    margin: var(--space-xs) 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__excerpt {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-sm);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- DETAIL VIEW ---- */

.blog-detail-nav {
    margin-bottom: var(--space-md);
}

.blog-detail-hero {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: var(--space-xl);
    max-height: 420px;
}

.blog-detail-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-detail {
    max-width: 720px;
    margin: 0 auto;
}

.blog-detail__header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.blog-detail__title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--text-heading);
    line-height: 1.25;
    margin: var(--space-sm) 0 var(--space-md);
    letter-spacing: 0.01em;
}

/* Prose content */
.blog-content {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.85;
    letter-spacing: 0.01em;
}

.blog-content > p:first-of-type::first-letter {
    font-size: 3.2em;
    float: left;
    line-height: 0.8;
    margin-right: 8px;
    margin-top: 6px;
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
}

.blog-content h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--text-heading);
    margin: 2em 0 0.6em;
    letter-spacing: 0.02em;
}

.blog-content h3 {
    font-size: 1.1rem;
    color: var(--text-heading);
    margin: 1.6em 0 0.5em;
}

.blog-content p {
    margin-bottom: 1.2em;
}

.blog-content ul, .blog-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.2em;
}

.blog-content li {
    margin-bottom: 0.5em;
}

.blog-content blockquote {
    border-left: 3px solid var(--color-primary);
    padding: var(--space-sm) var(--space-md);
    margin: 1.5em 0;
    background: rgba(var(--color-primary-rgb), 0.04);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-primary);
}

.blog-content strong {
    color: var(--text-heading);
    font-weight: var(--font-weight-semibold);
}

.blog-content em {
    color: var(--text-primary);
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 14px;
}

.blog-content th, .blog-content td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.blog-content th {
    background: var(--bg-elevated);
    font-weight: var(--font-weight-semibold);
    color: var(--text-heading);
}

.blog-content img {
    max-width: 100%;
    border-radius: 10px;
    margin: 1.5em 0;
}

/* Like section */
.blog-like-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.blog-like-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 24px;
    border: 1.5px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 15px;
    font-weight: var(--font-weight-medium);
    transition: all 0.2s ease;
}

.blog-like-btn:hover {
    border-color: #e74c5e;
    color: #e74c5e;
}

.blog-like-btn--active {
    background: rgba(231, 76, 94, 0.08);
    border-color: #e74c5e;
    color: #e74c5e;
}

.blog-like-btn--pop {
    animation: likePop 0.3s ease;
}

@keyframes likePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.blog-like-btn__icon {
    transition: transform 0.2s ease;
}

.blog-like-btn:hover .blog-like-btn__icon {
    transform: scale(1.1);
}

/* Comments */
.blog-comments-section {
    margin-top: var(--space-xl);
}

.blog-comments-section__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text-heading);
    margin-bottom: var(--space-lg);
}

.blog-comment-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: var(--space-md);
    margin-bottom: var(--space-xl);
}

.blog-comments-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.blog-comment {
    display: flex;
    gap: 12px;
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: border-color var(--transition-fast);
}

.blog-comment:hover {
    border-color: rgba(var(--color-primary-rgb), 0.2);
}

.blog-comment__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: 14px;
    flex-shrink: 0;
}

.blog-comment__body {
    flex: 1;
    min-width: 0;
}

.blog-comment__header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.blog-comment__name {
    font-size: var(--font-size-sm);
    color: var(--text-heading);
}

.blog-comment__date {
    font-size: 11px;
    color: var(--text-muted);
}

.blog-comment__text {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-featured__body {
        padding: var(--space-md);
    }
    .blog-detail-hero {
        border-radius: 10px;
    }
    .blog-content {
        font-size: 15px;
    }
}

/* ============================
   GALLERY - La Colectiva Style
   ============================ */


/* Sort tabs */
.gallery-sort-tab {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    font-weight: var(--font-weight-medium);
}

.gallery-sort-tab:hover {
    color: var(--text-secondary);
}

.gallery-sort-tab--active {
    color: var(--text-heading);
    border-bottom-color: var(--color-primary);
}

/* Decorative dots */
.gallery-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: 0.5;
}

/* Masonry grid */
.gallery-masonry {
    column-count: 4;
    column-gap: 12px;
}

.gallery-masonry__item {
    break-inside: avoid;
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: var(--bg-card);
}

.gallery-masonry__img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-masonry__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    color: white;
    opacity: 0;
}

.gallery-masonry__item:hover .gallery-masonry__img {
    transform: scale(1.03);
}

.gallery-masonry__item:hover .gallery-masonry__overlay {
    background: rgba(0,0,0,0.25);
    opacity: 1;
}

/* Lightbox */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.gallery-lightbox__img {
    position: relative;
    z-index: 1;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
    user-select: none;
    animation: fadeIn 0.2s ease;
}

.gallery-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.gallery-lightbox__close:hover {
    background: rgba(255,255,255,0.25);
}

.gallery-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.gallery-lightbox__nav:hover {
    background: rgba(255,255,255,0.25);
}

.gallery-lightbox__nav--prev { left: 12px; }
.gallery-lightbox__nav--next { right: 12px; }

.gallery-lightbox__footer {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-lightbox__download {
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.gallery-lightbox__download:hover {
    background: rgba(255,255,255,0.3);
}

.gallery-lightbox__counter {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

/* Responsive masonry */
@media (max-width: 1024px) {
    .gallery-masonry { column-count: 3; }
}
@media (max-width: 768px) {
    .gallery-masonry { column-count: 2; column-gap: 8px; }
    .gallery-masonry__item { margin-bottom: 8px; border-radius: 8px; }
    .gallery-lightbox__nav { width: 36px; height: 36px; }
    .gallery-lightbox__nav--prev { left: 6px; }
    .gallery-lightbox__nav--next { right: 6px; }
}

/* Kept for admin gallery backwards compat */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-md);
}

.gallery-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--color-primary-rgb), 0.2);
}

.gallery-item__image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.gallery-item__info {
    padding: var(--space-md);
}

.gallery-item__name {
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    margin-bottom: 4px;
}

.gallery-item__price {
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}

/* ============================
   QR CODE DISPLAY
   ============================ */

.qr-display {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    max-width: 280px;
    margin: 0 auto;
}

.qr-display__image {
    width: 200px;
    height: 200px;
}

.qr-display__info {
    text-align: center;
    color: #333;
}

.qr-display__name {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
}

.qr-display__detail {
    font-size: var(--font-size-xs);
    color: #666;
}

/* ============================
   WEATHER WIDGET
   ============================ */

.weather-widget {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
}

.weather-widget__temp {
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
}

.weather-widget__desc {
    color: var(--text-muted);
    font-size: var(--font-size-xs);
}

/* ============================
   UPLOAD FIELDS
   ============================ */

.upload-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.upload-preview {
    margin-bottom: var(--space-xs);
}

.upload-preview img {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.upload-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.upload-thumb {
    position: relative;
    display: inline-block;
}

.upload-thumb img {
    border: 1px solid var(--border-color);
}

.upload-thumb-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-error);
    color: white;
    border: 2px solid var(--bg-card);
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.upload-thumb-remove:hover {
    background: #c0392b;
}

/* ============================
   PRODUCT CAROUSEL
   ============================ */

.product-carousel__track {
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.product-carousel__track::-webkit-scrollbar {
    display: none;
}

.product-carousel__dots {
    padding: var(--space-sm) 0;
}

.carousel-dot {
    transition: background var(--transition-fast);
}

.carousel-dot.active {
    transform: scale(1.3);
}

/* ============================
   SETTINGS ROW
   ============================ */

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-light);
    gap: var(--space-md);
    min-height: 44px;
}

.settings-row:last-child {
    border-bottom: none;
}

/* ============================
   TOGGLE SWITCH
   ============================ */

.toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 26px;
    transition: all var(--transition-base);
}

.toggle__slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.toggle input:checked + .toggle__slider {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.toggle input:checked + .toggle__slider::before {
    transform: translateX(22px);
    background: var(--text-on-primary);
}

/* ============================
   RECOMMENDATION LIST
   ============================ */

.recommendation-section__title {
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    color: var(--text-heading);
    margin-bottom: var(--space-md);
}

.recommendation-list {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    scrollbar-width: none;
}

.recommendation-list::-webkit-scrollbar {
    display: none;
}

.recommendation-card {
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: var(--space-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.recommendation-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.recommendation-card__color {
    width: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

.recommendation-card__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: var(--font-size-sm);
}

.recommendation-card__type {
    font-weight: var(--font-weight-semibold);
    color: var(--text-heading);
}

.recommendation-card__date {
    color: var(--text-secondary);
    font-size: var(--font-size-xs);
}

.recommendation-card__seats {
    color: var(--color-success);
    font-size: var(--font-size-xs);
}

/* ============================
   MENU GRID (Más)
   ============================ */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.menu-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    text-decoration: none;
    color: var(--text-heading);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    animation: fadeInUp 0.5s ease backwards;
    animation-delay: var(--card-delay, 0s);
    border: 1px solid var(--border-color);
    position: relative;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-light);
}

.menu-card--highlight {
    background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.04), var(--bg-card));
    border-color: var(--color-primary);
}

.menu-card__icon {
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.menu-card__content h3 {
    font-size: 1rem;
    margin: 0 0 4px 0;
    font-weight: 600;
}

.menu-card__content p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.menu-card__arrow {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.2s;
    color: var(--color-primary);
}

.menu-card:hover .menu-card__arrow {
    opacity: 1;
}

@media (max-width: 576px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }
    .menu-card {
        flex-direction: row;
        text-align: left;
        padding: var(--space-md);
        align-items: center;
    }
    .menu-card__icon {
        margin-bottom: 0;
        margin-right: var(--space-md);
    }
    .menu-card__content {
        flex: 1;
    }
    .menu-card__arrow {
        position: static;
        opacity: 1;
        color: var(--text-muted);
    }
}

/* ============================
   PRODUCT IMAGE FIXES
   ============================ */
.product-card__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Carousel images in product detail */
.product-carousel__track img {
    width: 100%;
    height: 280px;
    object-fit: contain;
    background: var(--bg-elevated);
    border-radius: var(--border-radius);
}

@media (min-width: 768px) {
    .product-carousel__track img {
        height: 400px;
    }
}

/* ============================
   NOTIFICATION PANEL
   ============================ */

#notif-panel {
    display: none;
    position: fixed;
    top: 56px;
    right: 8px;
    width: 360px;
    max-width: calc(100vw - 16px);
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    z-index: 1100;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.notif-item:hover {
    background: var(--bg-elevated);
}

.notif-item--unread {
    background: rgba(var(--primary-rgb, 99,102,241), 0.06);
}

.notif-item__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border-radius: 50%;
}

.notif-item__content {
    flex: 1;
    min-width: 0;
}

.notif-item__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notif-item__msg {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item__time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.notif-item__dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    margin-top: 6px;
}
