/* ===== Products Page Styles ===== */

/* ---------- Container Full Width ---------- */
.container-full {
    max-width: 1490px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== PRODUCTS SECTION ==================== */
.prod-section {
    padding: 50px 0 60px;
    background: #fff;
}

/* ---- Section Title Row ---- */
.prod-title-row {
    display: flex;
    align-items: center;
    gap: 172px;
    margin-bottom: 35px;
}

.prod-title-row h2 {
    font-size: 22px;
    font-weight: 700;
    color: #7F7F7F;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.title-line {
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

/* ---- Category Row ---- */
.cat-row {
    display: flex;
    align-items: stretch;
    padding: 20px 0 60px;
    gap: 40px;
}

.cat-left {
    flex: 0 0 240px;
    width: 240px;
    flex-shrink: 0;
    padding-top: 4px;
}

.cat-right {
    flex: 1;
    min-width: 0;
}

/* Category Header */
.cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    cursor: pointer;
    user-select: none;
    font-size: 15px;
    font-weight: 600;
    color: #7F7F7F;
    transition: color 0.2s;
}

.cat-header:hover {
    color: #7F7F7F;
}

.cat-header i {
    font-size: 12px;
    color: #999;
    transition: transform 0.3s ease;
}

.cat-row.open .cat-header i {
    transform: rotate(180deg);
}

/* Sub items list */
.cat-sub {
    list-style: disc;
    padding: 6px 0 0 30px;
}

.cat-sub li {
    font-size: 13px;
    color: #777;
    line-height: 2.5;
    transition: color 0.2s;
}

/* Collapse animation */
.cat-row:not(.open) .cat-sub {
    display: none;
}
.cat-row.open .cat-sub {
    display: block;
}

/* Product grid inside right area */
.prod-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    height: 100%;
}

/* Override for rows with fewer than 3 items */
#row-facial,
#row-custom {
    grid-template-columns: repeat(4, 1fr);
}

/* Hide when collapsed */
.cat-right.prod-row:not(.active) {
    display: none;
}
.cat-right.prod-row.active {
    display: grid;
}

/* Product item card */
.prod-item {
    background: #f5f5f5;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 260px;
    position: relative;
}

.prod-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
}

.prod-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.prod-item .img-container {
    width: 100%;
    height: 100%;
}

.cert-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    min-height: 280px;
}

.cert-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.cert-item .img-container {
    width: 100%;
    height: 100%;
    min-height: inherit;
}

.cert-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Certificate placeholder styles */
.cert-grid .cert-item:nth-child(n+1):nth-last-child(-n+4) {
    min-height: 280px;
    background: linear-gradient(to bottom, #fff 60%, #f0f4f8 100%);
    position: relative;
}

/* ==================== CERTIFICATE SECTION ==================== */
.cert-section {
    padding: 0 0 80px 0;
    background: #fff;
}

.cert-section  .prod-title-row {
   gap: 152px;
}

.cert-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.cert-sidebar {
    flex: 0 0 240px;
    width: 240px;
    flex-shrink: 0;
}

.cert-sidebar .cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    cursor: pointer;
    user-select: none;
    font-size: 15px;
    font-weight: 600;
    color: #7F7F7F;
}

.cert-sidebar .cat-header i {
    font-size: 12px;
    color: #999;
}

.cert-sidebar .cat-group.open .cat-header i {
    transform: rotate(180deg);
}

.cert-sidebar .cat-sub {
    list-style: none;
    padding: 6px 0 16px 4px;
}

.cert-sidebar .cat-group:not(.open) .cat-sub {
    display: none;
}

.cert-sidebar .cat-sub li {
    font-size: 13px;
    color: #777;
    line-height: 2.6;
    display: flex;
    align-items: center;
}

.cert-sidebar .cert-badge {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #2196F3;
    border-radius: 2px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Certificate content area */
.cert-content {
    flex: 1;
    min-width: 0;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cert-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cert-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.cert-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Certificate placeholder styles */
.cert-grid .cert-item:nth-child(n+1):nth-last-child(-n+4) {
    min-height: 280px;
    background: linear-gradient(to bottom, #fff 60%, #f0f4f8 100%);
    position: relative;
}
.cert-grid .cert-item:nth-child(1)::after {
    content: 'SGS';
    position: absolute;
    top: 12px; right: 12px;
    font-size: 11px; font-weight: 700; color: #999; letter-spacing: 1px;
}

.cert-grid .cert-item:nth-child(5),
.cert-grid .cert-item:nth-child(6) {
    min-height: 320px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    position: relative;
}
.cert-grid .cert-item:nth-child(5)::after,
.cert-grid .cert-item:nth-child(6)::after {
    content: '';
    position: absolute;
    bottom: 30px; left: 50%; transform: translateX(-50%);
    width: 36px; height: 36px;
    border: 2px solid rgba(21,101,192,0.4); border-radius: 50%;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .prod-title-row {
        gap: 18px;
    }
    .prod-title-row h2 {
        font-size: 19px;
    }

    .cat-row {
        flex-direction: column;
        min-height: auto;
        gap: 16px;
        margin-bottom: 30px;
    }

    .cat-left {
        flex: none;
        width: 100%;
        padding-top: 0;
    }

    .cat-right.prod-row {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    #row-facial,
    #row-custom {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .prod-item {
        height: 220px;
    }

    /* Certificate responsive */
    .cert-layout {
        flex-direction: column;
        gap: 25px;
    }
    .cert-sidebar {
        flex: none; width: 100%;
    }
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
        border-top: none;
        border-bottom: 1px solid #e5e5e5;
    }
    .cert-sidebar .cat-group {
        border-right: 1px solid #e5e5e5;
        border-bottom: none;
        flex: 1; min-width: 140px;
    }
    .cert-sidebar .cat-group:last-child { border-right: none; }
    .cert-sidebar .cat-header {
        justify-content: center; padding: 12px 8px; font-size: 13px; text-align: center;
    }
    .cert-sidebar .cat-header i { display: none; }
    .cert-sidebar .cat-sub { display: none !important; }
    .cert-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .prod-section {
        padding: 30px 0 40px;
    }
    .cert-section {
        padding: 30px 0 50px;
    }
    .container-full { padding: 0 15px; }

    .prod-title-row h2 {
        font-size: 17px;
    }

    .cat-row {
        gap: 12px;
        margin-bottom: 24px;
    }

    .cat-header {
        font-size: 14px;
    }

    .cat-right.prod-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }
    #row-towel .prod-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .prod-item {
        height: 180px;
    }

    /* Certificate mobile */
    .cert-grid {
        grid-template-columns: repeat(2, 1fr); gap: 12px;
    }
    .sidebar-menu {
        flex-direction: column; border-right: none; border-bottom: 1px solid #e5e5e5;
    }
    .cert-sidebar .cat-group {
        border-right: none; border-bottom: 1px solid #e5e5e5;
    }
    .cert-sidebar .cat-header {
        justify-content: space-between; padding: 14px 0; font-size: 14px; text-align: left;
    }
    .cert-sidebar .cat-header i { display: inline-block; }
    .cert-sidebar .cat-sub {
        display: block !important; max-height: none !important; opacity: 1 !important;
        padding: 0 0 10px 4px !important;
    }
    .cert-sidebar .cat-group:not(.open) .cat-sub {
        max-height: 0 !important; overflow: hidden; opacity: 0 !important; padding: 0 !important;
    }
}

@media (max-width: 480px) {
    .cat-right.prod-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
    }
    .cert-grid {
        grid-template-columns: 1fr 1fr; gap: 10px;
    }
    .prod-title-row h2 {
        font-size: 16px;
    }
    .sidebar-title {
        font-size: 18px; margin-bottom: 16px;
    }
}
