:root {
    --primary-color: #03a9f4; /* Sky blue */
    --secondary-color: #ff9800; /* Orange */
    --light-bg: #f5f5f5; /* Background terang */
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Bayangan lembut */
    --card-radius: 12px; /* Border radius lebih lembut */
    --discount-color: #e91e63; /* Warna diskon pink */
    --text-muted: #757575; /* Teks muted */
    --danger-color: #dc3545; /* Warna danger */
}

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background-color: #fafafa;
    padding-bottom: 80px;
}

/* Navbar */
.navbar-brand {
    font-weight: 700;
    color: #111827;
}

/* Search Bar */
.search-bar {
    background-color: white;
    border-radius: 24px;
    padding: 8px 16px;
    box-shadow: var(--card-shadow);
}
.search-input {
    border: none;
    outline: none;
    width: 100%;
}
.search-input:focus {
    box-shadow: none;
}

/* Tab Bar */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 8px 0;
    min-height: 64px;
    display: flex;
    align-items: center;
}
.tab-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    height: 100%;
    position: relative;
}
.tab-item .badge {
    top: 4px;
    left: 60%;
    transform: translate(50%, -50%);
    font-size: 10px;
    z-index: 10;
    padding: 4px 6px;
    min-width: 16px;
    height: 16px;
    line-height: 1;
}
.tab-item.active {
    color: var(--primary-color);
}
.tab-icon {
    font-size: 24px;
    line-height: 1;
}

/* Slider */
.slider-container {
    position: relative;
    border-radius: var(--card-radius);
    overflow: hidden;
    margin-bottom: 20px;
}
.slider-img {
    height: 160px;
    object-fit: cover;
}

/* Section Title */
.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    position: relative;
    padding-left: 12px;
    color: #111827;
}
.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 4px;
}

/* Category Chips */
.category-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 8px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.category-container::-webkit-scrollbar {
    height: 6px;
}
.category-container::-webkit-scrollbar-thumb {
    background-color: var(--text-muted);
    border-radius: 6px;
}
.category-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    font-size: 13px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.category-chip:hover {
    transform: translateY(-2px);
}
.category-chip.active {
    background-color: var(--primary-color);
    color: white;
}
.category-chip:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Product Card */
.product-card {
    border: none;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s;
    margin-bottom: 16px;
    cursor: pointer;
    position: relative;
}
.product-card:hover {
    transform: translateY(-4px);
}
.product-img-wrapper {
    /*position: relative;*/
    aspect-ratio: 1 / 1;
    width: 100%;
    overflow: hidden;
}
.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@supports not (aspect-ratio: 1 / 1) {
    .product-img-wrapper { padding-bottom: 100%; }
    .product-img { position: absolute; top: 0; left: 0; }
}
.product-title {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    color: #111827;
}
.product-price {
    font-weight: 700;
    font-size: 16px;
    color: var(--secondary-color);
}
.original-price {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 8px;
}
.discount-badge {
    font-size: 12px;
    background-color: var(--discount-color);
    padding: 5px 8px;
    color: #ffffff;
    font-weight: 500;
    border-radius: 0 0 10px 0;
}

/* Cart Item */
.cart-item {
    background: white;
    border-radius: var(--card-radius);
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--card-shadow);
}
.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}
.quantity-control {
    display: flex;
    align-items: center;
}
.quantity-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-bg);
    cursor: pointer;
}
.quantity-value {
    margin: 0 12px;
    font-weight: 500;
    min-width: 24px;
    text-align: center;
}

/* Account Tab */
/*.tab-pane#account {*/
/*    display: flex;*/
/*    flex-direction: column;*/
/*    justify-content: center;*/
/*    align-items: center;*/
/*    min-height: calc(100vh - 64px);*/
/*}*/
/*.tab-pane#account.authenticated {*/
/*    display: block;*/
/*    justify-content: flex-start ;*/
/*    align-items: stretch;*/
/*}*/
@keyframes slideIn {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.auth-card {
    animation: slideIn 0.5s ease forwards;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: none;
    /*max-width: 400px;*/
    width: 100%;
    margin-bottom: 0;
}
.auth-card.hidden {
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}
.form-control {
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    box-sizing: border-box;
}
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Profile */
.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    padding: 3px;
}
.profile-details {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 16px;
}
.profile-details label {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}
.profile-details p {
    font-size: 16px;
    color: #111827;
}
.profile-details .form-control,
.profile-details .form-control:focus {
    width: 100%;
    box-sizing: border-box;
}
#editMap {
    width: 100%;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: #0288d1;
    border-color: #0288d1;
}
.btn-warning {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}
.btn-outline-danger {
    border-color: var(--danger-color);
    color: var(--danger-color);
}
.btn-outline-danger:hover {
    background-color: var(--danger-color);
    color: #fff;
}
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Current Location Button */
#currentLocationBtn,
#editCurrentLocationBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s;
}
#currentLocationBtn:hover,
#editCurrentLocationBtn:hover {
    transform: scale(1.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
}
.empty-icon {
    font-size: 64px;
    color: #e0e0e0;
    margin-bottom: 16px;
}

/* Product Detail */
.product-detail-img {
    height: 300px;
    object-fit: cover;
    border-radius: var(--card-radius);
}
.product-detail-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}
.product-detail-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary-color);
}
.product-detail-desc {
    font-size: 14px;
    color: #424242;
    line-height: 1.6;
}
.back-btn {
    font-size: 24px;
    color: var(--primary-color);
}

/* Media Queries */
@media (min-width: 768px) {
    .tab-bar { min-height: 72px; }
    .tab-icon { font-size: 28px; }
    .tab-item { font-size: 14px; }
    .tab-item .badge { font-size: 12px; min-width: 20px; height: 20px; padding: 5px 8px; }
    .slider-img { height: 250px; }
    .product-card { margin-bottom: 24px; }
    .category-chip { font-size: 14px; padding: 8px 16px; }
}

@media (max-width: 576px) {
    .slider-img { height: 150px; }
    .section-title { font-size: 16px; }
    .product-title { font-size: 13px; }
    .product-price { font-size: 14px; }
    .cart-item-img { width: 60px; height: 60px; }
    .user-avatar { width: 60px; height: 60px; }
    .profile-details { padding: 0 8px; }
    .profile-details p { font-size: 14px; }
    .profile-details .form-control { font-size: 13px; }
    .btn { font-size: 14px; padding: 8px 16px; }
    .tab-pane#account { min-height: calc(100vh - 64px); }
    .auth-card { max-width: 100%; }
}

.profile-edit{
    width: 372px;

}
.toast-container {
    z-index: 1050;
}
.toast {
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
}
.text-bg-success {
    background-color: var(--primary-color) !important;
}
.text-bg-danger {
    background-color: var(--danger-color) !important;
}


.cart-item-img {
    border: 1px solid #e9ecef;
}
.badge {
    font-size: 0.800rem;
    padding: 0.5em 1em;
}


.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 1000;
    cursor: move;
    touch-action: none;
}

.whatsapp-float img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.whatsapp-float img:hover {
    transform: scale(1.1);
}

/* Menangani batasan geser */
.whatsapp-float.dragging {
    opacity: 0.8;
}
