body {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    background: #f5f5f5;
    padding-top: 1px;
    padding-bottom: 60px;
}

/* Header */
.header {
    background: #ff5722;
    padding: 10px;
    color: #fff;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
}

/* Global header styles */
.header-wrapper {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
    background: linear-gradient(90deg, #ff5722, #ff7043);
}

/* Top Bar (desktop only) */
.header-top {
    color: #fff;
    font-size: 14px;
    padding: 6px 0;
}

.header-main {
    padding: 15px 0;
    color: #fff;
}

/* Search */
.header-search input {
    border-radius: 5px 0 0 5px;
    border: none;
}

.header-search button {
    border-radius: 0 5px 5px 0;
    background: #ff7043;
    border: 1px solid #fff;
    color: #fff;
}

.header-links a {
    color: #fff;
    text-decoration: none;
    margin-right: 15px;
}
.header-links a:hover {
    text-decoration: underline;
}

/* MOBILE STYLE — LIKE SHOPEE */
@media (max-width: 768px) {

    /* Hide desktop top bar */
    .header-top {
        display: none;
    }

    /* Compact mobile header */
    .header-main {
        padding: 10px 0;
    }

    .shopee-logo {
        font-size: 22px;
    }

    .header-search .input-group {
        height: 32px;
    }

    .header-search input {
        font-size: 13px;
    }

    .header-main .cart-icon {
        font-size: 22px;
    }
}

/* Default: Desktop */
.header-spacer {
    height: 130px;
}

/* Tablet (≤ 992px) */
@media (max-width: 992px) {
    .header-spacer {
        height: 100px;
    }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
    .header-spacer {
        height: 85px;
    }
}

/* Mobile kecil (≤ 576px) */
@media (max-width: 576px) {
    .header-spacer {
        height: 75px;
    }
}

.search-box input {
    border-radius: 20px;
    font-size: 14px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #ddd;
    z-index: 999;
}

.bottom-nav a {
    text-decoration: none;
    color: #444;
}

.bottom-nav .nav-link.active {
    color: #ff5722;
}

.menu-category .icon-box {
    background: #fff;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    font-size: 12px;
}

.menu-category .col-3 {
    padding: 0 5px;
}

.menu-category .icon-box {
    background: #fff;
    border-radius: 10px;
    padding: 12px 5px;
    text-align: center;
    min-height: 90px; /* MENYAMAKAN TINGGI */
    display: flex;
    flex-direction: column;
    justify-content: center; /* rata tengah vertikal */
    align-items: center;     /* rata tengah horizontal */
}

.menu-category i {
    display: block;
    margin-bottom: 6px;
}

.flashsale-wrapper {
  padding: 15px;
  background: #fff;
  margin-top: 60px; /* jika header fixed-top */
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

.banner-wrapper {
    width: 100%;
    overflow: hidden;
}

.banner-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 10px;
}

.banner-item {
    min-width: 90%;
    scroll-snap-align: start;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
}

.banner-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Desktop */
@media (min-width: 768px) {
    .banner-item {
        min-width: 48%;
    }
}

.banner-img {
  border-radius: 14px;
  object-fit: cover;
  height: 220px;
}

/* Tablet */
@media (max-width: 768px) {
  .banner-img {
    height: 160px;
  }
}

/* Smartphone */
@media (max-width: 480px) {
  .banner-img {
    height: 120px;
  }
}

.product-slider-container {
    position: relative;
    margin-bottom: 20px;
}

.product-slider {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
}

.product-slider::-webkit-scrollbar {
    display: none;
}

.product-card {
    min-width: 160px;
    background: #fff;
    border-radius: 8px;
    position: relative;
}

.badge-top {
    position: absolute;
    left: 8px;
    top: 8px;
    background: orange;
    color: #fff;
    font-size: 12px;
    padding: 3px 7px;
    border-radius: 4px;
    font-weight: bold;
}

.prod-img {
    width: 100%;
    border-radius: 6px;
}

.sold-text {
    font-size: 12px;
    margin-top: 3px;
}

.prod-title {
    font-weight: bold;
    font-size: 14px;
    margin-top: 5px;
}

.slider-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    background: white;
    border: 1px solid #ddd;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
}

.slider-btn:hover {
    background: #f5f5f5;
}

.prev-btn { left: -10px; }
.next-btn { right: -10px; }

/* HP mode — tombol hilang */
@media (max-width: 576px) {
    .slider-btn {
        display: none;
    }
    .product-card {
        min-width: 150px;
    }
}

/* Pembungkus rekomendasi */
.rekomen-section {
    position: relative;
    margin-top: 20px;
}

/* Judul rekomendasi seperti Shopee */
.rekomen-title {
    font-weight: bold;
    color: #ff5722;
    text-align: center;
    margin-bottom: 10px;
    position: relative;
}

/* Garis kiri-kanan */
.rekomen-title:before,
.rekomen-title:after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    height: 2px;
    background: #ff5722;
}

.rekomen-title:before {
    left: 0;
}

.rekomen-title:after {
    right: 0;
}

/* Mode handphone — biar tidak nabrak tulisan */
@media (max-width: 480px) {
    .rekomen-title::before,
    .rekomen-title::after {
        width: 60px;
    }

    .rekomen-title::before {
        left: 0;
    }
    .rekomen-title::after {
        right: 0;
    }
}

/* Saat menjadi sticky */
.rekomen-sticky {
    position: fixed;
    top: var(--header-height, 60px);
    left: 0;
    width: 100%;
    background: #fff;
    padding: 8px 0;
    z-index: 998;
    border-bottom: 1px solid #ffd5c4;
    text-align: center;
    font-weight: bold;
    color: #ff5722;
}

.product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: .2s;
    background: #fff;
}
.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.product-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.badge-discount{
    background: #ff4242;
    font-size: 12px;
}
.badge-star{
    background: #ffcc00;
    color: #000;
    font-size: 12px;
}
.product-title{
    font-size: 14px;
    line-height: 1.2;
    min-height: 34px;
}
.price{
    color: #ff4d4d;
    font-size: 15px;
    font-weight: 600;
}
.old-price{
    text-decoration: line-through;
    color: #888;
    font-size: 12px;
}

/* Samakan tinggi card */
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Area badge diskon biar tingginya sama meski kosong */
.product-card .badge-discount,
.product-card .mt-2 {
    min-height: 22px; /* biar tidak berubah-ubah */
    display: flex;
    align-items: center;
}

/* Judul minimal 2 baris */
.product-title {
    min-height: 36px; /* 14px font = 2 baris pas */
}

/* Area rating */
.product-card .d-flex.align-items-center {
    min-height: 22px;
}

/* Harga selalu di bawah */
.price {
    margin-top: auto;
}

.user-dropdown {
    position: relative;
    display: inline-block;
}

/* Tambahkan padding/buffer agar hover tidak putus */
.user-dropdown:hover .dropdown-menu-custom {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-area {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Dropdown dengan animasi dan buffer */
.dropdown-menu-custom {
    position: absolute;
    top: 45px;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 180px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);

    /* Trik: jangan tampilkan langsung */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: .2s ease;
    z-index: 999;
}

.dropdown-menu-custom a {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
}

.dropdown-menu-custom a:hover {
    background: #f5f5f5;
}

footer a:hover {
    color: #ff5722 !important;
}