/**
 * Cerama Categorie Fondamentali Block Styles
 * Scoped to .cerama-cat-cards-wrap
 */

.cerama-cat-cards-wrap {
    box-sizing: border-box;
    width: 100%;
    margin: 40px auto;
    font-family: inherit;
}

.cerama-cat-cards-wrap * {
    box-sizing: border-box;
}

/* Background Variations */
.cerama-cat-cards--bg-transparent {
    background: transparent;
}

.cerama-cat-cards--bg-warm {
    background: #FBF9F5;
    border: 1px solid #E8DFD8;
    border-radius: 24px;
    padding: 40px 28px;
}

.cerama-cat-cards--bg-subtle {
    background: #F8F9FA;
    border: 1px solid #ECECEC;
    border-radius: 24px;
    padding: 40px 28px;
}

/* Header */
.cerama-cat-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 36px auto;
}

.cerama-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFFFFF;
    color: #CB6843;
    border: 1px solid #E8DFD8;
    padding: 5px 16px;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.cerama-cat-header-title {
    color: #385D6B;
    font-size: clamp(24px, 3.2vw, 32px);
    font-weight: 800;
    margin: 0 0 10px 0;
    line-height: 1.25;
}

.cerama-cat-header-subtitle {
    color: #666666;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* Grid Layout */
.cerama-cat-grid {
    display: grid;
    gap: 24px;
    align-items: stretch;
}

.cerama-cat-grid--cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cerama-cat-grid--cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.cerama-cat-grid--cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* 1. Card Container */
.cerama-cat-card {
    background: #FFFFFF;
    border: 1px solid #E8DFD8;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none !important;
    color: inherit !important;
}

.cerama-cat-card:hover {
    transform: translateY(-4px);
    border-color: #CB6843;
    box-shadow: 0 12px 28px rgba(56, 93, 107, 0.1);
}

/* Thumbnail Box - Proporzione compatta */
.cerama-cat-thumb-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7.5;
    max-height: 135px;
    overflow: hidden;
    background: #F0EDE8;
    display: block;
}

.cerama-cat-cards--ratio-compact .cerama-cat-thumb-box {
    aspect-ratio: 16 / 7.5;
    max-height: 135px;
}

.cerama-cat-cards--ratio-panoramic .cerama-cat-thumb-box {
    aspect-ratio: 21 / 9;
    max-height: 115px;
}

.cerama-cat-cards--ratio-standard .cerama-cat-thumb-box {
    aspect-ratio: 16 / 9;
    max-height: 160px;
}

.cerama-cat-thumb-img,
.cerama-cat-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.cerama-cat-card:hover .cerama-cat-thumb-img,
.cerama-cat-card:hover .cerama-cat-thumb-box img {
    transform: scale(1.05);
}

/* Card Body */
.cerama-cat-body {
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.cerama-cat-content-top {
    margin-bottom: 16px;
}

.cerama-cat-card-title {
    margin: 0 0 8px 0;
    font-size: 18.5px;
    font-weight: 800;
    color: #385D6B;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.cerama-cat-card:hover .cerama-cat-card-title {
    color: #CB6843;
}

.cerama-cat-card-desc {
    margin: 0;
    font-size: 13px;
    color: #555555;
    line-height: 1.5;
}

/* Action Button per Singola Card (Micro-CTA) */
.cerama-cat-action {
    margin-top: auto;
}

.cerama-cat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    min-height: 40px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    width: 100%;
    cursor: pointer;
    line-height: 1.2;
}

.cerama-cat-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    transition: transform 0.2s ease;
}

/* Card Button Style: Solid Terracotta (Default) */
.cerama-cat-cards--btn-solid .cerama-cat-btn,
.cerama-cat-btn {
    background: #CB6843;
    color: #FFFFFF !important;
    box-shadow: 0 2px 6px rgba(203, 104, 67, 0.2);
    border: none;
}

.cerama-cat-cards--btn-solid .cerama-cat-btn:hover,
.cerama-cat-cards--btn-solid .cerama-cat-card:hover .cerama-cat-btn,
.cerama-cat-card:hover .cerama-cat-btn {
    background: #B35532;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(203, 104, 67, 0.35);
}

/* Card Button Style: Soft / Light Background */
.cerama-cat-cards--btn-soft .cerama-cat-btn {
    background: #FBF4EE;
    color: #CB6843 !important;
    border: 1px solid #EEDBD0;
    box-shadow: none;
}

.cerama-cat-cards--btn-soft .cerama-cat-card:hover .cerama-cat-btn {
    background: #CB6843;
    color: #FFFFFF !important;
    border-color: #CB6843;
    box-shadow: 0 3px 10px rgba(203, 104, 67, 0.25);
}

/* Card Button Style: Outline */
.cerama-cat-cards--btn-outline .cerama-cat-btn {
    background: transparent;
    color: #CB6843 !important;
    border: 1.5px solid #CB6843;
    box-shadow: none;
}

.cerama-cat-cards--btn-outline .cerama-cat-card:hover .cerama-cat-btn {
    background: #CB6843;
    color: #FFFFFF !important;
}

.cerama-cat-card:hover .cerama-cat-btn svg {
    transform: translateX(3px);
}

/* 2. Enclosed Thumbnail Style (Inset with rounded thumb) */
.cerama-cat-cards--style-inset .cerama-cat-card {
    padding: 14px;
}

.cerama-cat-cards--style-inset .cerama-cat-thumb-box {
    border-radius: 10px;
}

.cerama-cat-cards--style-inset .cerama-cat-body {
    padding: 14px 2px 2px 2px;
}

/* ==========================================================================
   PULSANTE INFERIORE CATALOGO / SHOP (Macro-CTA Distintivo)
   ========================================================================== */

.cerama-cat-bottom-action {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.cerama-cat-bottom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 38px;
    min-height: 48px;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    line-height: 1.2;
}

.cerama-cat-bottom-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.cerama-cat-bottom-icon svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.cerama-cat-bottom-arrow svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    transition: transform 0.2s ease;
}

/* Stile 1: Blu Petrolio Cerama (#385D6B) - Massimo stacco rispetto al terracotta delle card */
.cerama-cat-bottom-btn--petrolio,
.cerama-cat-bottom-btn--primary {
    background: #385D6B;
    color: #FFFFFF !important;
    border: none;
    box-shadow: 0 4px 16px rgba(56, 93, 107, 0.25);
}

.cerama-cat-bottom-btn--petrolio:hover,
.cerama-cat-bottom-btn--primary:hover {
    background: #25414B;
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(56, 93, 107, 0.35);
}

.cerama-cat-bottom-btn--petrolio:hover .cerama-cat-bottom-arrow svg,
.cerama-cat-bottom-btn--primary:hover .cerama-cat-bottom-arrow svg {
    transform: translateX(4px);
}

/* Stile 2: Contorno Blu Petrolio (Outline) */
.cerama-cat-bottom-btn--outline {
    background: transparent;
    color: #385D6B !important;
    border: 2px solid #385D6B;
    box-shadow: none;
}

.cerama-cat-bottom-btn--outline:hover {
    background: #385D6B;
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(56, 93, 107, 0.2);
}

.cerama-cat-bottom-btn--outline:hover .cerama-cat-bottom-arrow svg {
    transform: translateX(4px);
}

/* Stile 3: Terracotta (#CB6843) con Bordo Inverso */
.cerama-cat-bottom-btn--terracotta {
    background: #CB6843;
    color: #FFFFFF !important;
    border: none;
    box-shadow: 0 4px 16px rgba(203, 104, 67, 0.28);
}

.cerama-cat-bottom-btn--terracotta:hover {
    background: #B35532;
    color: #FFFFFF !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(203, 104, 67, 0.4);
}

.cerama-cat-bottom-btn--terracotta:hover .cerama-cat-bottom-arrow svg {
    transform: translateX(4px);
}

/* Stile 4: Sabbia Caldo con Bordo */
.cerama-cat-bottom-btn--soft {
    background: #F5EFE6;
    color: #385D6B !important;
    border: 1px solid #E8DFD8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.cerama-cat-bottom-btn--soft:hover {
    background: #385D6B;
    color: #FFFFFF !important;
    border-color: #385D6B;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(56, 93, 107, 0.2);
}

.cerama-cat-bottom-btn--soft:hover .cerama-cat-bottom-arrow svg {
    transform: translateX(4px);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .cerama-cat-grid--cols-3,
    .cerama-cat-grid--cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 600px) {
    .cerama-cat-cards-wrap {
        margin: 24px auto;
    }

    .cerama-cat-cards--bg-warm,
    .cerama-cat-cards--bg-subtle {
        padding: 22px 14px;
        border-radius: 16px;
    }

    .cerama-cat-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .cerama-cat-thumb-box {
        aspect-ratio: 16 / 7.5;
        max-height: 120px;
    }

    .cerama-cat-body {
        padding: 16px 14px;
    }

    .cerama-cat-card-title {
        font-size: 17px;
    }

    .cerama-cat-card-desc {
        font-size: 12.5px;
    }

    .cerama-cat-bottom-action {
        margin-top: 24px;
    }

    .cerama-cat-bottom-btn {
        width: 100%;
        padding: 13px 20px;
        font-size: 13px;
        min-height: 44px;
    }
}
