.mdw-blog-section {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.mdw-blog-item {
    cursor: pointer;
}

.mdw-novedad-card,
.mdw-tip-card,
.mdw-seccion-card {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.mdw-novedad-card:hover,
.mdw-tip-card:hover,
.mdw-seccion-card:hover {
    transform: translateY(-4px);
}

.mdw-card-image {
    width: 100%;
    flex-shrink: 0;
}

.mdw-card-image img {
    width: 100%;
    height: auto;
    display: block;
}

.mdw-tip-card h3,
.mdw-seccion-card h3 {
    margin: 15px 15px 8px !important;
    font-size: 1.2em !important;
    color: #fff !important;
}

.mdw-tip-card p,
.mdw-seccion-card p {
    margin: 0 15px 15px !important;
    color: #fff !important;
    font-size: 0.9em !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    flex: 1 1 auto !important;
}

.mdw-novedad-card {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.mdw-novedad-card h3 {
    margin: 10px 0 0 !important;
    font-size: 1.1em !important;
    color: #fff !important;
}



.mdw-novedad-card a:hover {
    text-decoration: underline;
}

.mdw-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.mdw-popup.active {
    display: flex;
}

.mdw-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
}

.mdw-popup-content {
    position: relative;
    background: var(--mdw-popup-color, #fff);
    border-radius: 12px;
    max-width: 960px;
    width: 95%;
    max-height: 60vh;
    padding: 0;
    overflow: hidden;
}

.mdw-popup-content .mdw-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: rgba(255,255,255,0.9);
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: #333;
    line-height: 1;
    z-index: 20;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.mdw-popup-content .mdw-popup-close:hover {
    background: #fff;
}

.mdw-popup-columns {
    display: flex;
    height: 55vh;
    max-height: 55vh;
}

@media (max-height: 700px) {
    .mdw-popup-content {
        max-height: 85vh;
    }
    .mdw-popup-columns {
        height: 80vh;
    max-height: 55vh;
    }
}

.mdw-popup-left {
    flex: 0 0 35%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    overflow: hidden;
}

.mdw-popup-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 16px 18px 12px 14px;
    overflow: hidden;
    box-sizing: border-box;
}

.mdw-popup-right h2 {
    margin: 0 0 6px;
    font-size: 3em;
    font-weight: 700;
    color: #000;
    line-height: 1.2;
    flex-shrink: 0;
}

.mdw-popup-right .mdw-popup-description {
    color: #555;
    font-size: 0.85em;
    line-height: 1.5;
    margin-bottom: 8px;
    flex-shrink: 0;
    max-height: 40vh;
    overflow-y: auto;
    box-sizing: border-box;
    overflow-wrap: break-word;
}

.mdw-popup-right .mdw-popup-product {
    margin-bottom: 8px;
    padding: 6px 10px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 0.85em;
    flex-shrink: 0;
    width: 100%;
}

.mdw-popup-video {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mdw-popup-color, #fff);
    padding: 12px;
    box-sizing: border-box;
}

.mdw-popup-video iframe,
.mdw-popup-video video,
.mdw-popup-video embed {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: contain;
}

.mdw-popup-video video {
    display: block;
}

.mdw-popup-video .mdw-embed-loading {
    color: #888;
    font-size: 0.9em;
}

.mdw-popup-video .mdw-embed-fallback {
    text-align: center;
    padding: 30px;
}

.mdw-popup-video .mdw-embed-fallback a {
    display: inline-block;
    margin-top: 8px;
    color: #0073aa;
    word-break: break-all;
}

.mdw-comments-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.mdw-comment-form {
    flex-shrink: 0;
    padding-bottom: 8px;
}

.mdw-comment-form-ajax .mdw-comment-form-row {
    margin-bottom: 6px;
}

.mdw-comment-form-ajax .mdw-comment-form-row {
    margin-bottom: 6px;
}

.mdw-comment-form-ajax textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 12px;
    border-top-left-radius: 0;
    font-size: 0.82em;
    box-sizing: border-box;
    background: #f0f0f0;
    min-height: 42px;
    resize: vertical;
}

.mdw-comment-form-ajax button {
    background: #000;
    color: #fff;
    border: none;
    padding: 6px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.82em;
    font-weight: 600;
}

.mdw-comment-form-ajax button:hover {
    background: #333;
}

.mdw-inline-reply {
    margin-top: 8px;
    padding-left: 0;
}

.mdw-inline-reply .mdw-comment-form-ajax textarea {
    min-height: 36px;
    font-size: 0.8em;
    margin-bottom: 4px;
}

.mdw-inline-reply .mdw-comment-form-ajax button {
    padding: 4px 14px;
    font-size: 0.78em;
}

.mdw-comments-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
}

.mdw-comments-scroll::-webkit-scrollbar {
    width: 5px;
}

.mdw-comments-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.mdw-comment {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.mdw-comment .mdw-comment-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
}

.mdw-comment .mdw-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mdw-comment .mdw-comment-body {
    flex: 1;
    min-width: 0;
}

.mdw-comment .mdw-comment-bubble {
    background: #f0f0f0;
    border-radius: 12px;
    border-top-left-radius: 0;
    padding: 6px 10px;
    overflow-wrap: break-word;
}

.mdw-comment .mdw-comment-author {
    font-weight: 700;
    font-size: 0.78em;
    color: #333;
    margin-bottom: 2px;
    overflow-wrap: break-word;
}

.mdw-comment .mdw-comment-content {
    font-size: 0.82em;
    color: #555;
    line-height: 1.35;
    overflow-wrap: break-word;
}

.mdw-comment .mdw-comment-content p {
    margin: 0 0 3px;
}

.mdw-comment .mdw-comment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 3px;
    padding-left: 4px;
}

.mdw-comment .mdw-comment-date {
    font-size: 0.68em;
    color: #999;
}

.mdw-comment .mdw-comment-reply-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.72em;
    color: #555;
    padding: 2px 0;
    font-weight: 600;
}

.mdw-comment .mdw-comment-reply-btn:hover {
    color: #000;
    text-decoration: underline;
}

.mdw-comment-replies {
    margin-top: 8px;
    padding-left: 0;
}

.mdw-comment-replies {
    padding-left: 8px;
}

.mdw-comment-replies .mdw-comment {
    margin-bottom: 8px;
    width: 100%;
}

.mdw-comment-replies .mdw-comment .mdw-comment-avatar {
    width: 26px;
    height: 26px;
}

.sabias-flip-card {
    perspective: 1000px;
    cursor: pointer;
}

.sabias-flip-inner {
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.sabias-flip-card:hover .sabias-flip-inner {
    transform: rotateY(180deg);
}

.sabias-flip-front,
.sabias-flip-back {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.sabias-flip-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
}

.sabias-back-text {
    background: #fff;
    color: #000;
    font-weight: 700;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
    flex-shrink: 0;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sabias-flip-front h3,
.sabias-flip-front p {
    color: #fff !important;
}

.sabias-flip-front h3 {
    margin: 15px 15px 8px !important;
    font-size: 1.2em !important;
}

.sabias-flip-front p {
    margin: 0 15px 15px !important;
    font-size: 0.9em !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
}

.sabias-flip-back h3 {
    margin: 15px 15px 8px;
    font-size: 1.2em;
    color: #fff;
}

.sabias-flip-back p {
    margin: 0 15px 15px;
    color: #fff;
    font-size: 0.9em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex: 1 1 auto;
}

.sabias-popup-content {
    background: var(--sabias-popup-bg, #FFD700);
    display: flex;
    flex-direction: column;
    padding: 0;
    max-height: 50vh;
}

.sabias-popup-row-top {
    display: flex;
    gap: 24px;
    padding: 24px;
    flex-shrink: 0;
    align-items: center;
}

.sabias-popup-row-top .sabias-popup-reverso {
    background: #fff;
    font-weight: 700;
    font-size: 1.1em;
    line-height: 1.5;
    color: #000;
    padding: 40px 20px;
    flex: 0 0 40%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
}

.sabias-popup-row-top h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 700;
    color: #000;
    flex: 1;
    min-width: 0;
}



.sabias-popup-row-bottom {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.sabias-popup-row-bottom .sabias-popup-description {
    color: #000;
    font-size: 0.95em;
    line-height: 1.6;
}

.mdw-carousel {
    position: relative;
}

.mdw-carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mdw-carousel-track::-webkit-scrollbar {
    display: none;
}

.mdw-carousel-track .mdw-blog-item {
    flex: 0 0 calc((100% - 60px) / 4);
    min-width: 0;
}

.mdw-carousel-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-bottom: 10px;
}

.mdw-carousel-arrow {
    width: 40px;
    height: 40px;
    border: none;
    cursor: pointer;
    background: transparent;
    padding: 0;
    transition: opacity 0.2s;
}

.mdw-carousel-arrow img {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.mdw-carousel-arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

@media (max-width: 1200px) {
    .mdw-carousel-track .mdw-blog-item {
        flex: 0 0 calc((100% - 20px) / 2);
    }
}

@media (max-width: 768px) {
    .mdw-popup-columns {
        flex-direction: column;
        height: auto;
        max-height: none;
    }

    .mdw-popup-left {
        flex: none;
        height: 250px;
    }

    .mdw-popup-right {
        flex: none;
        padding: 16px;
    }

    .mdw-popup-content {
        max-height: 90vh;
    }

    .mdw-carousel-track .mdw-blog-item {
        flex: 0 0 100%;
    }
}
