/* --- RESET & VARIABEL --- */
:root {
    --primary: #C0568A;
    --secondary: #FFC4E3;
    --bg-light: #FFEAF3;
    --text-dark:#7A2E6D;
    --white: #ffffff;
    --shadow: 0 4px 15px rgba(255, 105, 180, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border_box;
    font-family: 'Quicksand', sans-serif;
}

body {
    background-color: #FFEAF3;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* --- HEADER & NAVIGASI --- */
header {
    background: var(--white);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

hr {
    border-top: 1px solid var(--text-dark);
    height: 0
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Pacifico', cursive;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

nav { flex-grow: 1; margin: 0 50px; }

nav ul {
    display: flex;
    list-style: none;
    width: 100%;
    justify-content: space-evenly;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: bold;
    padding: 10px 15px;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-block;
}

nav a.active {
    color: var(--primary);
    font-weight: bolder;
    background: #d19bb8;
    border-radius:20px ;
    color: #7a2e6d
}
nav a:hover {
    transform:scale(1.3);
    background: #7a2e6d;
    border-radius: 20px;
    color: white;
}
.dropdown {
    padding-left: 0;
    padding-right:10%;
    position: relative;
    display: inline-block;
    background-color: transparent;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1; /* Ensures it appears above other elements */
}

.dropdown-content a {
  padding: 12px 16px;
  text-decoration: none;
  display: block;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: larger;
    color:#ddd;
}

.dropdown:hover .dropdown-content {
  display: block;
  background-color: #7A2E6D;
}

.dropbtn {
    background: transparent;
    border: transparent;
    font-family: 'Quicksand', sans-serif;
    font-weight: 1000;
    font-size: larger;
    color: #7A2E6D;
}

.dropbtn:hover {
    cursor: pointer;
}

.double_container{
    background-color:transparent;
    display: flex;
    justify-content: center;
    padding-left: 5%;
    padding-right: 5%;
    gap: 2%;
}

.cont-left {
    width: 50%;
    background-color:var(--secondary);
    justify-content: center;
    text-align:left;
    padding: 2%;
    border-radius: 25pt;
    box-shadow: 0 2px 10px#7A2E6D;
}

.cont-right {
    width: 50%;
    background-color:var(--secondary) ;
    justify-content: center;
    text-align: left;
    padding: 2%;
    border-radius: 25pt;
    box-shadow:0 2px 10px #7A2E6D;
}

.cont-title {
    cursor: pointer;
}

.cart-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.cart-icon:hover {
    transform:scale(1.3);
    background:#d19bb8;
    border-radius: 40px;
}


.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff0000;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- HALAMAN (SECTIONS) --- */
.page-section {
    display: none; /* Disembunyikan secara default */
    /* padding: 40px 50px; */
    animation: fadeIn 0.5s ease;
    margin: 0 auto;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

h1, h2 {
    font-family: 'Pacifico', cursive;
    color: var(--primary);
    margin-bottom: 20px;
}

/* Tombol Global */
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-weight:bolder;
    font-size:large;
    transition: transform 0.2s, background 0.2s;
    text-decoration: none;
    display: inline-block;
    box-shadow:0 0px 5px #7a2e6d;
}

.btn:hover {
    transform: scale(1.05);
    background: #e05297;
}

/* --- HOME PAGE --- */
.hero {
    background:linear-gradient(var(--bg-light),var(--secondary));
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 40px;
    padding-right: 80px;
}

.hero-text h1 {
    font-size: 3rem;
    line-height: 1.2;
}

.hero-img img {
    max-width: 500px;
    padding-right: 70px;
}

.popular-section {
    padding: 60px 8%;
    background: #fff;
}

.section-title {
    font-family: var(--font-hand);
    color: #8e24aa;
    font-size: 2rem;
    border-bottom: 2px solid #eee;
    margin-bottom: 80px; /* Jarak ekstra untuk overlap gambar */
    text-transform: uppercase;

}

.section-title:hover {
    cursor: pointer;
}
.cupcake-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* CARD DESIGN */
.cupcake-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    flex-grow: 1;
}

.cupcake-card {
    position: relative;
    text-align: center;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cupcake-card img {
    width: 150px;
    height: auto;
    z-index: 2; /* Gambar di atas lengkungan pink */
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

.cupcake-card h3 {
    font-family: var(--font-hand);
    font-size: 1.3rem;
    color: #a34b8c;
    margin: 10px 0 5px;
    z-index: 2;
}

/* Tombol Harga Lonjong */
.btn-price {
    background: white;
    border: 1px solid #d19bb8;
    color: #4a4a4a;
    padding: 3px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 2;
    transition: 0.3s;
    font-weight: bolder;
}

.btn-price:hover {
    background:#a34b8c;
    color: #eee;
    transform: translateY(-2px);
    transform: scale(1.2);
}

/* Tombol More di Samping */
.btn-more-side {
    background: #fbcce1;
    color: #a34b8c;
    border: none;
    padding: 10px 25px;
    border-radius: 15px;
    font-family: var(--font-hand);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 0px #e0a3c2;
    height: fit-content;
}

.promo-banner {
    background: var(--secondary);
    color: white;
    padding: 10px;
    border-radius: 15px;
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- CUPCAKE MENU PAGE --- */
.menu-header {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

/* --- MODAL (POPUP) --- */
/* MODAL OVERLAY - Latar belakang gelap */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none; /* Dikontrol via JS (flex/none) */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(3px); /* Efek blur di belakang pop-up */
}

/* MODAL CONTENT - Kotak putih pop-up */
.modal-content {
    background: white;
    padding: 40px;
    border-radius: 30px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Close Button (X) */
.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    cursor: pointer;
    color: #ccc;
    transition: 0.3s;
}

.close-btn:hover {
    color: var(--primary);
}

/* --- MODAL (POPUP) --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: center;
    display: flex;
    gap: 20px;
    align-items: center;
}

.modal-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.modal-img {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
}

/* RESPONSIVE: Jadi 1 kolom di HP */
@media (max-width: 600px) {
    .modal-body {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-right {
        align-items: center;
    }
}

/* --- CART PAGE --- */
.cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fdf2f7;
    padding: 5px 10px;
    border-radius: 20px;
}

.qty-btn {
    background: none;
    border: none;
    color: #a34b8c;
    font-weight: bold;
    cursor: pointer;
    width: 25px;
    height: 25px;
    font-size: 1.2rem;
}

.total-section {
    text-align: right;
    font-size: 1.4rem;
    font-family: var(--font-hand);
    font-weight: bold;
    color: #a34b8c;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #fbcce1;
}

/* --- CHECKOUT / ADDRESS PAGE --- */
.checkout-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    background: white;
    padding: 30px;
    border-radius: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
    font-weight: bold;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: var(--bg-light);
}

/* --- SUCCESS PAGE --- */
.success-box {
    text-align: center;
    background: white;
    padding: 50px;
    border-radius: 20px;
    border: 2px dashed var(--primary);
}

/* --- FOOTER --- */
footer {
    position:sticky; 
    background: var(--white);
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    color: #888;
    font-size: 0.8rem;
}

.footer-icon:hover {
    transform:scale(1.3);
    background:#d19bb8;
    border-radius: 40px;
}

/* Responsive Fix */
@media (max-width: 768px) {
    .hero, .checkout-form { flex-direction: column; text-align: center; grid-template-columns: 1fr; }
    nav ul { display: none; } /* Simplified for demo */
    .modal-content { flex-direction: column; }
}