/* ============================= */
/* General Page Container Styling */
/* ============================= */
.container-page {
    margin-top: 0;
    margin-bottom: 100px;
    padding: 0;
    background-color: #ffffff;
}

/* ============================= */
/* Slide Styling */
/* ============================= */
.slide {
    top: 0;
    margin: 0;
    padding-top: 0;
    z-index: 5;
}

/* ============================= */
/* Gallery Styling */
/* ============================= */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 30px;
    width: auto;
    max-width: 100%;
    margin: 30px;
}

@media (max-width: 700px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 10px;
    }
}

/* ============================= */
/* Gallery Item (Card) Styling */
/* ============================= */
.gallery-item {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 10px 10px 0 0; /* hanya kiri atas dan kanan atas */
    background-color: #fff;
    padding: 0; /* item-info di luar card */
    overflow: hidden;
    border: 1px solid #ddd; /* border tipis abu-abu lembut */
}


/* Gambar hanya melengkung di atas */
.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2),
                0 -2px 4px rgba(0, 0, 0, 0.15),
                2px 0 4px rgba(0, 0, 0, 0.15),
                -2px 0 4px rgba(0, 0, 0, 0.15);
}

/* ============================= */
/* Title & Price Below Card */
/* ============================= */
.gallery-item .item-info {
    position: relative;
    width: 100%;
    background: none;
    color: #333;
    padding: 8px 5px;
    margin-top: 6px; /* memberi jarak dari gambar */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.gallery-item .item-info .item-price {
    font-size: 17px;
    font-weight: 600; /* <-- bikin lebih tebal */
    margin-bottom: 4px; /* jarak antara harga dan judul */
    color: #333;
}

.gallery-item .item-info .item-title {
    font-size: 13.5px;
    font-weight: normal;
    line-height: 1.2;
    
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Batas 2 baris */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(1.2em * 2); /* line-height * 2 */
}

@media (max-width: 768px) {
    .gallery-item .item-info {
        padding: 6px 4px;
    }

    .gallery-item .item-info .item-price {
        font-size: 15px;
        font-weight: 600; /* tetap tebal di mobile */
    }

    .gallery-item .item-info .item-title {
        font-size: 12px;
        line-height: 1.2;

        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        max-height: calc(1.2em * 2);
    }
}

@media (max-width: 480px) {
    .gallery-item .item-info {
        padding: 4px 3px;
    }

    .gallery-item .item-info .item-price {
        font-size: 12px;
        font-weight: 600; /* tetap tebal */
    }

    .gallery-item .item-info .item-title {
        font-size: 10px;
        line-height: 1.2;

        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        max-height: calc(1.2em * 2);
    }
}

/* ============================= */
/* Pinned Label */
/* ============================= */
.pinned-label {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: #ffcc00;
    color: #354a5f;
    padding: 3px 6px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    z-index: 10;
    display: flex;
    align-items: center;
}

.pinned-label img.rekomendasi-icon {
    width: 14px;
    height: auto;
    margin-right: 3px;
    vertical-align: middle;
}

.gallery-item.pinned { border: 2px solid #ffcc00; }

@media (max-width: 768px) {
    .pinned-label { font-size: 10px; padding: 2px 5px; }
    .pinned-label img.rekomendasi-icon { width: 12px; }
}

@media (max-width: 480px) {
    .pinned-label { font-size: 8px; padding: 2px 4px; }
    .pinned-label img.rekomendasi-icon { width: 10px; }
}

/* ============================= */
/* Type Label (Putra / Putri / Lain) */
/* ============================= */
.type-label {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #fff;
    padding: 3px 6px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
    z-index: 10;
    display: flex;
    align-items: center;
}

.type-putra { background-color: #007bff; } /* biru */
.type-putri { background-color: #e83e8c; } /* pink */
.type-lain { background-color: #28a745; }   /* hijau */

@media (max-width: 768px) { .type-label { font-size: 10px; padding: 2px 5px; } }
@media (max-width: 480px) { .type-label { font-size: 8px; padding: 2px 4px; } }

/* ============================= */
/* Watermark overlay CSS */
.image-wrapper {
    position: relative;
    display: block;
}

.image-wrapper img {
    display: block;
    width: 100%;
    border-radius: 10px 10px 0 0;
}

.image-wrapper .watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    color: rgba(255, 255, 255, 0.4);
    font-size: 24px;
    font-weight: bold;
    pointer-events: none; /* supaya watermark tidak mengganggu klik */
    user-select: none;
    text-align: center;
}

/* ============================= */
/* Filter Menu Styling */
/* ============================= */
.filter-menu {
    display: flex;
    justify-content: space-around;
    background-color: #fff;
    padding: 10px 0;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

/* Dropdown Styling */
.dropdown {
    position: relative;
}

.dropbtn {
    background-color: #fff;
    color: #333;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
    border: none;
}

.dropbtn:hover {
    background-color: #f0f0f0;
}

.arrow {
    margin-left: 8px;
    fill: #333;
    transition: transform 0.3s ease;
    width: 16px;
    height: 16px;
}

/* Dropdown content (awal disembunyikan) */
.dropdown-content {
    position: absolute;
    background-color: white;
    min-width: 120px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 20;
    display: block;
    opacity: 0;
    transform: translateY(-5px);
    pointer-events: none;
    transition: all 0.25s ease;
}

/* Saat dropdown aktif (klik) */
.dropdown.open .dropdown-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s ease;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* Divider */
.divider {
    margin: 0 10px;
    color: #ccc;
    font-size: 18px;
}

.divider-line {
    border: 0;
    height: 1px;
    background-color: #ccc;
}

/* Responsif */
@media (max-width: 768px) {
    .dropbtn {
        font-size: 12px;
        padding: 5px;
    }

    .arrow {
        width: 14px;
        height: 14px;
    }

    .dropdown-content a {
        font-size: 12px;
    }
}

/* Animasi panah saat terbuka */
.dropdown.open .arrow {
    transform: rotate(180deg);
}
