:root {
    --primary-red: #ff3b30;
    --primary-green: #34c759;
    --primary-yellow: #ffcc00;
    --bg-light: #f7f9fa;
    --card-bg: #ffffff;
    --text-main: #1c1c1e;
    --text-muted: #8e8e93;
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.05);
    --shadow-bold: 0 12px 30px rgba(0, 0, 0, 0.1);
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

/* App Container (Simulating Mobile viewport) */
.app-container {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background-color: var(--bg-light);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-bottom: 20px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--card-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    position: relative;
    font-size: 20px;
    color: var(--text-main);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f2f7;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.icon-btn:active {
    transform: scale(0.9);
}

.notification-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--primary-red);
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-yellow);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
}

.profile-pic:hover {
    transform: scale(1.05);
    background-color: #fff9db;
    border-color: var(--primary-red);
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Search Section */
.search-section {
    padding: 10px 20px;
    background-color: var(--card-bg);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #f2f2f7;
    border-radius: var(--border-radius-sm);
    padding: 6px 12px;
    gap: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: var(--primary-green);
    background-color: var(--card-bg);
    box-shadow: 0 0 10px rgba(52, 199, 89, 0.1);
}

.search-icon {
    color: var(--text-muted);
    font-size: 16px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: linear-gradient(135deg, var(--primary-green), #2db34f);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.search-btn:active {
    transform: scale(0.95);
}

/* Banner Section */
.banner-section {
    padding: 20px;
    position: relative;
}

.banner-slider-container {
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-soft);
}

.banner-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 200%; /* for 2 slides */
}

.banner-slide {
    width: 50%;
    flex-shrink: 0;
    position: relative;
    height: 180px;
    background-color: #000;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.banner-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.banner-badge {
    background-color: var(--primary-red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.banner-content h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.banner-btn {
    background-color: var(--primary-yellow);
    color: var(--text-main);
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.banner-btn:active {
    transform: scale(0.95);
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
    opacity: 0.3;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dot.active {
    background-color: var(--primary-green);
    width: 20px;
    border-radius: 4px;
    opacity: 1;
}

/* Category Section */
.category-section {
    display: flex;
    gap: 12px;
    padding: 10px 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}

.category-section::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.category-item {
    padding: 10px 18px;
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid #e5e5ea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-item:active {
    transform: scale(0.95);
}

.category-item.active {
    background-color: var(--primary-yellow);
    border-color: var(--primary-yellow);
    color: var(--text-main);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3);
}

/* Product Section */
.product-section {
    padding: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

.see-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-green);
    text-decoration: none;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid #f2f2f7;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-bold);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background-color: #f9f9fc;
    overflow: hidden;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.1);
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}

.badge.new {
    background-color: var(--primary-green);
}

.badge.hot {
    background-color: var(--primary-red);
}

.badge.sale {
    background-color: var(--primary-yellow);
    color: var(--text-main);
}

.product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-rating {
    font-size: 10px;
    color: var(--primary-yellow);
    font-weight: 600;
    margin-bottom: 4px;
}

.product-rating i {
    margin-right: 2px;
}

.product-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary-red);
}

.product-price .strike {
    font-size: 10px;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 500;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: 75px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.03);
    z-index: 999;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
}

.nav-item i {
    font-size: 20px;
}

.nav-item.active {
    color: var(--primary-green);
}

/* Center elevated Brand Logo Button */
.logo-nav {
    position: relative;
    top: -15px;
    overflow: visible;
}

.logo-btn-wrapper {
    position: relative;
}

.logo-btn-inner {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-red), #e0241b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(255, 59, 48, 0.4);
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
    border: 4px solid var(--bg-light);
}

.logo-nav:active .logo-btn-inner {
    transform: scale(0.9) rotate(-15deg);
}

/* Floating WhatsApp Button */
.wa-popup {
    position: fixed;
    bottom: 95px;
    right: calc(50% - 220px); /* Positioned relative to app container max-width */
    width: 50px;
    height: 50px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
    color: white;
    font-size: 26px;
    text-decoration: none;
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

/* Adjust WhatsApp position if screen is narrower than 480px */
@media (max-width: 480px) {
    .wa-popup {
        right: 20px;
    }
}

.wa-popup:hover {
    transform: scale(1.1);
}

.wa-popup:active {
    transform: scale(0.9);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Profile Page Styling */
.profile-section {
    padding: 0 0 20px 0;
}

.profile-hero {
    position: relative;
    width: 100%;
    height: 180px;
    background-color: #e5e5ea;
}

.profile-hero-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-container {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 5px solid var(--card-bg);
    box-shadow: var(--shadow-bold);
    overflow: hidden;
    background-color: #f2f2f7;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-meta {
    margin-top: 60px;
    text-align: center;
    padding: 0 20px;
}

.profile-owner-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 2px;
}

.profile-role-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-yellow), #ffa700);
    color: var(--text-main);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(255, 167, 0, 0.2);
}

.profile-biz-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 16px;
    margin: 15px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid #f2f2f7;
}

.profile-biz-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-biz-title i {
    color: var(--primary-red);
}

.profile-biz-text {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

.profile-details-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-md);
    padding: 16px;
    margin: 15px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid #f2f2f7;
}

.profile-details-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.profile-details-title i {
    color: var(--primary-green);
}

.profile-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.profile-detail-item:last-child {
    margin-bottom: 0;
}

.profile-detail-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.profile-detail-icon.wa {
    background-color: rgba(37, 211, 102, 0.1);
    color: #25d366;
}

.profile-detail-icon.loc {
    background-color: rgba(255, 59, 48, 0.1);
    color: var(--primary-red);
}

.profile-detail-info {
    display: flex;
    flex-direction: column;
}

.profile-detail-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.profile-detail-value {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.4;
}

.profile-detail-value a {
    color: inherit;
    text-decoration: none;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.15); }
    28% { transform: scale(1); }
    42% { transform: scale(1.15); }
    70% { transform: scale(1); }
}

/* Circular Categories with Image for Menu Page */
.category-section-vertical {
    display: flex;
    gap: 16px;
    padding: 15px 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    align-items: flex-start;
    justify-content: center;
}

.category-section-vertical::-webkit-scrollbar {
    display: none;
}

.category-item-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-item-vertical:active {
    transform: scale(0.95);
}

.category-img-circle {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background-color: var(--card-bg);
    border: 2px solid #e5e5ea;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2px;
}

.category-img-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.category-item-vertical span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    text-align: center;
}

.category-item-vertical.active .category-img-circle {
    border-color: var(--primary-yellow);
    background-color: var(--primary-yellow);
    box-shadow: 0 6px 16px rgba(255, 204, 0, 0.4);
    transform: translateY(-3px);
}

.category-item-vertical.active span {
    color: var(--text-main);
    font-weight: 700;
}

/* Horizontal List Layout for Menu Page */
.product-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-card.list-layout {
    flex-direction: row;
    height: 120px;
    width: 100%;
    align-items: center;
}

.product-card.list-layout .product-img-wrapper {
    width: 120px;
    height: 120px;
    padding-top: 0;
    flex-shrink: 0;
}

.product-card.list-layout .product-info {
    padding: 12px 14px;
    height: 100%;
    justify-content: space-between;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card.list-layout .product-name {
    font-size: 14px;
    margin-bottom: 2px;
}

.product-card.list-layout .product-desc {
    margin-bottom: auto;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.product-card.list-layout .product-price-row {
    margin-top: 0;
}

/* Modal Overlay styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background-color: var(--card-bg);
    width: 90%;
    max-width: 380px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #f2f2f7;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: var(--primary-red);
}

.modal-body {
    padding: 24px;
    text-align: center;
}

.modal-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.4;
}

.qr-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* QRIS Card Layout */
.qris-card {
    background-color: #ffffff;
    border: 1px solid #e5e5ea;
    border-radius: 16px;
    padding: 16px;
    width: 260px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.qris-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 6px;
    margin-bottom: 12px;
}

.qris-brand {
    font-size: 18px;
    font-weight: 800;
    color: #111;
    letter-spacing: 0.5px;
}

.qris-sub {
    font-size: 11px;
    font-weight: 700;
    color: #34c759;
}

.qris-qr-wrapper {
    background-color: #f7f9fa;
    padding: 12px;
    border-radius: 8px;
    border: 1px dashed #c7c7cc;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-svg {
    width: 170px;
    height: 170px;
}

.qris-footer {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.merchant-name {
    font-size: 12px;
    font-weight: 800;
    color: #1c1c1e;
}

.nmid {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
}

.modal-instruction {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}
