/* ============================================
   Product Showcase Boxes — Core Styles
   ============================================ */

/* Container */
.psb-container {
    width: 100%;
    box-sizing: border-box;
}

/* Grid */
.psb-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 15px;
    row-gap: 15px;
}

/* ============================================
   Box (Card)
   ============================================ */
.psb-box {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.18);
    position: relative;
}



/* ============================================
   Image
   ============================================ */
.psb-image-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

.psb-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: block;
}

/* Zoom on hover */
.psb-box:hover .psb-image-wrapper img {
    transform: scale(1.15);
}

/* ============================================
   Thai Title
   ============================================ */
.psb-title-th {
    width: 100%;
    text-align: center;
    margin: 10px 0 6px 0;
    padding: 0 8px;
    box-sizing: border-box;
    line-height: 1.4;
}

.psb-title-th a {
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: block;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.psb-title-th a:hover {
    opacity: 0.75;
}

/* ============================================
   English Button
   ============================================ */
.psb-en-wrapper {
    width: 100%;
    text-align: center;
    padding: 0;
    box-sizing: border-box;
    margin-top: auto;  /* push to bottom */
}

.psb-title-en {
    display: block;
    width: 100%;
    background-color: #FF6128;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 8px 14px;
    box-sizing: border-box;
    border-radius: 0 0 10px 10px;
    transition: filter 0.25s ease, transform 0.25s ease;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.psb-title-en:hover {
    filter: brightness(1.12);
}

/* ============================================
   View All — Desktop Link (bottom-right)
   ============================================ */
.psb-view-all-desktop {
    text-align: right;
    margin-top: 14px;
    padding-right: 4px;
}

.psb-view-all-desktop a {
    color: #FF6128;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: opacity 0.25s ease;
    display: inline-block;
}

.psb-view-all-desktop a:hover {
    opacity: 0.72;
}

/* ============================================
   View All — Mobile Card (fills odd cell)
   ============================================ */
.psb-view-all-card {
    display: none !important;  /* hidden by default (desktop + editor) */
    border-radius: 10px;
    overflow: hidden;
    background-color: #FF6128;
    min-height: 100%;
}

.psb-view-all-card a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
    text-decoration: none;
    color: #FFFFFF;
    padding: 20px 14px;
    box-sizing: border-box;
    gap: 12px;
    transition: filter 0.3s ease;
}

.psb-view-all-card a:hover {
    filter: brightness(1.1);
}

.psb-va-text {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
}

.psb-va-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2.5px solid #FFFFFF;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.psb-view-all-card a:hover .psb-va-arrow {
    transform: translateX(4px);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .psb-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .psb-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .psb-image-wrapper {
        height: 140px;
    }
    
    .psb-title-th a {
        font-size: 13px;
    }
    
    .psb-title-en {
        font-size: 11px;
        padding: 6px 8px;
    }

    /* Show mobile card, hide desktop link */
    .psb-view-all-card {
        display: flex !important;
    }

    .psb-view-all-desktop {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .psb-grid {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 8px;
        row-gap: 8px;
    }

    .psb-image-wrapper {
        height: 110px;
    }

    .psb-va-text {
        font-size: 15px;
    }

    .psb-va-arrow {
        width: 34px;
        height: 34px;
        font-size: 17px;
    }
}
