/* ============================================================
   Produtos Module - Styles
   ============================================================ */

.produtos-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.produtos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.produtos-card {
    position: relative;
    background-color: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    box-sizing: border-box;
}

.produtos-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/* Stretched link: makes the whole card clickable without nesting anchors */
.produtos-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    border-radius: 8px;
    text-decoration: none;
}

.produtos-card.is-clickable {
    cursor: pointer;
}

.produtos-card-link:focus-visible {
    outline: 3px solid var(--card-color, #0d4ebd);
    outline-offset: -3px;
}

/* Keep links inside the description clickable above the overlay */
.produtos-card-text a {
    position: relative;
    z-index: 3;
}

.produtos-card-header {
    padding: 25px 15px;
    text-align: center;
    background-color: #ffffff;
    flex-shrink: 0;
}

.produtos-card-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.produtos-card-hoverbox {
    background-color: var(--card-color, #0d4ebd);
    height: 8px; /* Collapsed state acts as a thin colored bar below header */
    overflow: hidden;
    transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1), padding 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.produtos-card-text {
    color: #ffffff;
    font-size: 13px;
    line-height: 1.6;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    margin: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.produtos-card-text p {
    color: #ffffff !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
    margin: 0 0 10px 0;
}

.produtos-card-text p:last-child {
    margin-bottom: 0;
}

/* Hover expansions */
.produtos-card.has-hover-effect:hover .produtos-card-hoverbox {
    height: 240px;
    padding: 25px 20px;
}

.produtos-card.has-hover-effect:hover .produtos-card-text {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease 0.15s, visibility 0.3s ease 0.15s;
}

.produtos-card-image-wrap {
    flex-grow: 1;
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    min-height: 0; /* allows child images to shrink in flexbox */
}

.produtos-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.produtos-card-image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #f9f9f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cccccc;
}

.produtos-card-image-placeholder .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
}

/* Tablet & Desktop Grid layout */
@media (min-width: 769px) {
    .produtos-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .produtos-card {
        height: 540px; /* Fixed height on desktop */
    }
}

/* Adjustments for Notebooks and Large Tablets */
@media (max-width: 1200px) and (min-width: 769px) {
    .produtos-card-title {
        font-size: 16px !important;
    }
    
    .produtos-card-text,
    .produtos-card-text p {
        font-size: 11px !important;
    }
    
    .produtos-grid {
        gap: 15px;
    }
    
    .produtos-card-header {
        padding: 20px 10px;
    }
    
    .produtos-card-hoverbox {
        padding: 0 12px;
    }
    
    .produtos-card.has-hover-effect:hover .produtos-card-hoverbox {
        height: 250px;
    }
}


/* Responsive Mobile Layout: Always visible text, no hover animations */
@media (max-width: 768px) {
    .produtos-card {
        height: auto; /* flexible height */
    }
    
    .produtos-card-title {
        font-size: 18px !important;
    }
    
    .produtos-card-hoverbox {
        height: auto; /* auto height to prevent content clipping */
        padding: 25px 20px;
    }
    
    .produtos-card-text {
        opacity: 1;
        visibility: visible;
    }
    
    .produtos-card-text,
    .produtos-card-text p {
        font-size: 13px !important;
    }
    
    .produtos-card-image-wrap {
        height: 280px; /* lock image height so it stays visible */
        flex-grow: 0;
    }
}


