/**
 * Riedmair KDW Standalone - Frontend Styles
 * Krapfen der Woche Übersicht für Elementor
 */

/* ================================
   CONTAINER
   ================================ */
.rkdws-container {
    width: 100%;
    box-sizing: border-box;
}

/* ================================
   HERO BEREICH (Bild + Text)
   ================================ */
.rkdws-hero {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    align-items: stretch;
}

.rkdws-main-image {
    flex-shrink: 0;
}

.rkdws-main-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.rkdws-placeholder {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 60px 40px;
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.rkdws-placeholder span {
    font-size: 80px;
    display: block;
    margin-bottom: 15px;
}

.rkdws-placeholder p {
    color: #8b4513;
    font-size: 16px;
    margin: 0;
}

/* ================================
   CONTENT (Textbereich)
   ================================ */
.rkdws-content {
    flex: 1;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.rkdws-main-title {
    font-size: 32px;
    font-weight: 400;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.rkdws-sub-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.rkdws-description {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.rkdws-description p {
    margin: 0 0 15px 0;
}

.rkdws-description p:last-child {
    margin-bottom: 0;
}

.rkdws-promo {
    font-size: 15px;
    margin: 20px 0;
}

.rkdws-additional {
    font-size: 14px;
    color: #666;
    margin: 15px 0;
}

.rkdws-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.rkdws-links a {
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.rkdws-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ================================
   GALERIE
   ================================ */
.rkdws-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}

.rkdws-gallery[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.rkdws-gallery[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.rkdws-gallery[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.rkdws-gallery[data-columns="6"] {
    grid-template-columns: repeat(6, 1fr);
}

/* ================================
   GALERIE ITEMS
   ================================ */
.rkdws-gallery-item {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1;
}

.rkdws-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.rkdws-gallery-item:hover img {
    transform: scale(1.05);
}

/* Status-Klassen */
.rkdws-gallery-item.is-past {
    /* Opacity wird über Elementor gesteuert */
}

.rkdws-gallery-item.is-grayscale img {
    filter: grayscale(100%);
}

.rkdws-gallery-item.is-current {
    border: 3px solid;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.rkdws-gallery-item.is-future {
    /* Zukünftige haben volle Farbe */
}

.rkdws-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 48px;
    background: #f0f0f0;
}

/* Custom Images in Gallery */
.rkdws-custom-image {
    /* Same styling as KDW items */
}

.rkdws-custom-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================
   DATUM BADGE
   ================================ */
.rkdws-date-badge {
    position: absolute;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    z-index: 2;
}

.rkdws-date-badge.top-left {
    top: 10px;
    left: 10px;
}

.rkdws-date-badge.top-right {
    top: 10px;
    right: 10px;
}

/* ================================
   PRODUKTNAME
   ================================ */
.rkdws-product-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    padding: 30px 12px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* ================================
   LABEL KACHEL (KDW Logo)
   ================================ */
.rkdws-label-tile {
    background: #FFD700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rkdws-label-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rkdws-label-default {
    text-align: center;
    padding: 20px;
    color: #333;
}

.rkdws-label-badge {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
    background: #333;
    color: #FFD700;
    padding: 4px 8px;
}

.rkdws-label-kdw {
    display: block;
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
    margin: 10px 0;
}

.rkdws-label-slogan {
    display: block;
    font-size: 14px;
    font-style: italic;
    line-height: 1.3;
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
    .rkdws-gallery[data-columns="6"],
    .rkdws-gallery[data-columns="5"] {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .rkdws-hero {
        flex-direction: column;
    }
    
    .rkdws-main-image {
        width: 100% !important;
    }
    
    .rkdws-main-title {
        font-size: 26px;
    }
    
    .rkdws-sub-title {
        font-size: 18px;
    }
    
    .rkdws-gallery,
    .rkdws-gallery[data-columns="3"],
    .rkdws-gallery[data-columns="4"],
    .rkdws-gallery[data-columns="5"],
    .rkdws-gallery[data-columns="6"] {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .rkdws-date-badge {
        font-size: 9px;
        padding: 5px 8px;
    }
    
    .rkdws-product-name {
        font-size: 10px;
        padding: 20px 8px 8px;
    }
    
    .rkdws-label-kdw {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .rkdws-gallery,
    .rkdws-gallery[data-columns="3"],
    .rkdws-gallery[data-columns="4"],
    .rkdws-gallery[data-columns="5"],
    .rkdws-gallery[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rkdws-main-title {
        font-size: 22px;
    }
    
    .rkdws-sub-title {
        font-size: 16px;
    }
    
    .rkdws-description {
        font-size: 14px;
    }
}

/* ================================
   ELEMENTOR EDITOR STYLES
   ================================ */
.elementor-editor-active .rkdws-placeholder {
    min-height: 200px;
}

.elementor-editor-active .rkdws-gallery-item {
    min-height: 150px;
}

