
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background: #f7f7f4;
    color: #222;
}

.header {
    background: #fff;
    padding: 16px 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    background: #f5c928;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 900;
}

.brand h2 {
    font-size: 18px;
    font-weight: 900;
}

.brand small {
    color: #888;
    letter-spacing: 2px;
}

.cart {
    border: none;
    background: #202020;
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
}

.cart span {
    color: #f5c928;
    font-weight: bold;
}

.hero {
    background: linear-gradient(120deg, #f8d94c, #f4bd16);
    margin: 24px auto;
    width: 90%;
    max-width: 1200px;
    border-radius: 25px;
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.hero-text {
    max-width: 580px;
}

.tag {
    background: #252525;
    color: #f5c928;
    padding: 9px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

.hero h1 {
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.1;
    margin: 22px 0 14px;
}

.hero p {
    line-height: 1.7;
    max-width: 420px;
    margin-bottom: 25px;
}

.hero-button {
    display: inline-block;
    background: #222;
    color: white;
    text-decoration: none;
    padding: 14px 22px;
    border-radius: 12px;
    font-weight: bold;
}

.hero-image {
    font-size: 130px;
    padding: 10px 40px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.search-box {
    background: white;
    padding: 15px 20px;
    border-radius: 14px;
    display: flex;
    gap: 12px;
    border: 1px solid #eee;
}

.search-box input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 15px;
}

.section {
    margin-top: 35px;
}

.section-title {
    margin-bottom: 18px;
}

.section-title h2 {
    font-size: 23px;
}

.section-title p {
    color: #888;
    margin-top: 6px;
    font-size: 13px;
}

.categories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.category {
    border: 1px solid #eee;
    background: white;
    padding: 12px 18px;
    border-radius: 12px;
    white-space: nowrap;
    cursor: pointer;
}

.category.active,
.category:hover {
    background: #f5c928;
    border-color: #f5c928;
    font-weight: bold;
}

.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #eee;
    transition: transform .2s;
}

.product:hover {
    transform: translateY(-4px);
}

.product-image {
    height: 160px;
    background: #f6edd7;
    display: grid;
    place-items: center;
    font-size: 75px;
}

.product-info {
    padding: 16px;
}

.stock {
    color: #888;
    font-size: 11px;
}

.product-info h3 {
    margin: 10px 0;
    font-size: 16px;
}

.product-info p {
    color: #999;
    font-size: 12px;
}

.product-info strong {
    display: block;
    color: #a77c00;
    font-size: 19px;
    margin: 10px 0;
}

.product-info button {
    background: #f5c928;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
}

.delivery {
    margin: 40px 0;
    background: #fff;
    padding: 22px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 18px;
    border: 1px solid #eee;
}

.delivery div:first-child {
    font-size: 35px;
}

.delivery p {
    color: #888;
    font-size: 13px;
    margin-top: 6px;
}

footer {
    background: #222;
    color: white;
    text-align: center;
    padding: 35px 15px;
    line-height: 2;
}

footer small {
    color: #aaa;
}

@media (max-width: 700px) {
    .hero {
        padding: 28px 22px;
    }

    .hero-image {
        font-size: 65px;
        padding: 0;
    }

    .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-image {
        height: 125px;
    }

    .product-info {
        padding: 12px;
    }

    .brand h2 {
        font-size: 15px;
    }

    .hero p {
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .hero-image {
        display: none;
    }
}

/* Admin product management */
.cart-form label { font-weight: 600; font-size: 14px; }
.cart-form input[type="file"] { background: #fff; }
#adminProductList button { border: 1px solid #ddd; border-radius: 7px; background: #fff; cursor: pointer; }
#adminProductList button:hover { background: #f5c928; }
@media(max-width:600px) {
  #adminProductList > div { flex-wrap: wrap; }
  #adminProductList > div > div { min-width: 55%; }
}


/* PERBAIKAN: tampilkan seluruh kemasan foto produk, jangan dipotong */
.product-image {
    height: 230px !important;
    min-height: 230px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
    overflow: hidden !important;
    background: #fff !important;
}

.product-image img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 214px !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
}

@media (max-width: 700px) {
    .product-image {
        height: 190px !important;
        min-height: 190px !important;
    }
    .product-image img {
        max-height: 174px !important;
    }
}


/* Pemilihan lokasi dan estimasi ongkir */
.shipping-picker { display:grid; gap:9px; padding:14px; border:1px solid #e5e5e5; border-radius:12px; background:#fafafa; }
.shipping-picker p { color:#666; font-size:13px; line-height:1.5; }
#deliveryMap { width:100%; height:300px; border-radius:10px; z-index:1; background:#e8e8e8; }
.location-button { border:0; border-radius:8px; padding:11px 14px; background:#202020; color:#fff; font-weight:bold; cursor:pointer; }
.shipping-status { padding:8px 10px; background:#fff8d9; border-radius:8px; }
.shipping-total { display:flex; justify-content:space-between; gap:12px; padding:5px 0; }
.grand-total { border-top:1px solid #ddd; padding-top:12px; font-size:16px; }
.grand-total strong { color:#14834a; }
