/* ==========================================================
   PayyCoffee - style.css
   Tugas 4 - BSD113 Web Programming
   ========================================================== */

/* Gaya umum halaman */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #fdf6ee;
    color: #3b2417;
    margin: 0;
    padding: 0;
}

/* Header */
header {
    background-color: #532a10;
    color: white;
    padding: 20px;
    text-align: center;
}

header img {
    width: 80px;
    height: 80px;
}

header h1 {
    margin: 10px 0 5px 0;
    letter-spacing: 1px;
}

header p {
    margin: 0 auto;
    max-width: 700px;
    color: #e6d5c3;
}

/* Navigasi */
nav {
    background-color: #c9a27e;
    text-align: center;
    padding: 12px;
    color: #532a10;
    font-weight: bold;
}

nav a {
    text-decoration: none;
    color: #532a10;
    font-weight: bold;
    margin: 0 8px;
}

nav a:hover {
    color: white;
}

/* Judul halaman */
h2 {
    color: #532a10;
}

h3 {
    color: #532a10;
}

/* Layout konten dan sidebar */
body > table {
    max-width: 1100px;
    margin: 30px auto;
    border-spacing: 20px 0;
}

body > table > tbody > tr > td:first-child {
    padding: 0 10px;
}

body > table > tbody > tr > td:last-child {
    background-color: #f3e6d6;
    border-top: 5px solid #532a10;
    border-radius: 8px;
    padding: 15px 20px;
}

section {
    margin-bottom: 25px;
}

/* Teks */
mark {
    background-color: #f2c14e;
}

a {
    color: #75401b;
}

/* Gambar */
img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Tabel produk */
table[border="1"] {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
}

table[border="1"] th,
table[border="1"] td {
    border: 1px solid #ccc;
    padding: 12px;
    text-align: left;
}

table[border="1"] th {
    background-color: #eee;
}

/* Iframe peta */
iframe {
    max-width: 100%;
    border: 0;
    border-radius: 8px;
}

/* Form kontak */
form {
    max-width: 500px;
    background-color: #f4f4f4;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

form br {
    display: none;
}

form input[type="text"],
form input[type="number"],
form select,
form textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #bbb;
    border-radius: 5px;
    margin: 5px 0 15px 0;
    font-size: 1rem;
}

form input[type="submit"] {
    background-color: #532a10;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
}

form input[type="submit"]:hover {
    background-color: #75401b;
}

/* Footer */
footer {
    background-color: #532a10;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Layar kecil */
@media (max-width: 768px) {
    body > table,
    body > table > tbody,
    body > table > tbody > tr,
    body > table > tbody > tr > td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
}
/* ==========================================================
   GALERI (Tugas 5 dan 6) - Flexbox dan Media Query
   ========================================================== */

main {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Container galeri dengan Flexbox */
.galeri {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

/* Card untuk setiap gambar */
.card {
    flex: 1 1 250px;
    max-width: 300px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding: 10px;
}

.card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

.card h3 {
    margin: 10px 0 5px 0;
}

.card p {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
}

/* Responsif untuk layar kecil */
@media (max-width: 768px) {
    .galeri {
        flex-direction: column;
        align-items: center;
    }

    .card {
        flex: 0 1 auto;
        width: 90%;
        max-width: 90%;
    }

    /* Menu menjadi daftar vertikal; tanda | disembunyikan */
    nav {
        display: flex;
        flex-direction: column;
        font-size: 0;
        padding: 6px 0;
    }

    nav a {
        display: block;
        font-size: 1rem;
        text-align: center;
        margin: 0;
        padding: 10px;
    }
}
/* TUGAS 8 - Hasil JavaScript pada halaman produk */

.hasil {
    display: none;
    max-width: 500px;
    margin-top: 15px;
    padding: 12px 16px;
    background-color: #fff;
    border-left: 5px solid #532a10;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.hasil.tampil {
    display: block;
}

.hasil.sukses {
    background-color: #edf7ee;
    border-left-color: #2e7d32;
}

.hasil.error {
    background-color: #fdecea;
    border-left-color: #c62828;
}

.testimoni {
    background-color: #fff;
    border: 1px solid #ddd;
    border-left: 5px solid #f2c14e;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.testimoni h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
}

.testimoni .bintang {
    color: #f2a900;
    letter-spacing: 2px;
}

.testimoni p {
    margin: 6px 0 0 0;
    font-style: italic;
}
/* TUGAS 9 - Form kontak yang lebih menarik */

#formKontak {
    border-top: 5px solid #532a10;
}

form label {
    display: block;
    font-weight: bold;
    color: #532a10;
}

form label.inline {
    display: inline;
    font-weight: normal;
    color: #3b2417;
}

form input[type="email"],
form input[type="tel"] {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #bbb;
    border-radius: 5px;
    margin: 5px 0 15px 0;
    font-size: 1rem;
}

form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: #532a10;
    box-shadow: 0 0 0 3px rgba(83, 42, 16, 0.15);
}

.baris-tombol {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

form button {
    background-color: #532a10;
    color: white;
    border: none;
    padding: 10px 22px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}

form button:hover {
    background-color: #75401b;
}

form button.btn-clear {
    background-color: transparent;
    color: #532a10;
    border: 2px solid #532a10;
}

form button.btn-clear:hover {
    background-color: #532a10;
    color: white;
}