:root {
    --primary: #e91e63;
    --background: #f8f9fa;
    --surface: #ffffff;
    --text: #1d1d1f;
    --text-light: #86868b;
    --whatsapp: #25D366;
    --border: rgba(0,0,0,0.05);
    --shadow: 0 4px 20px rgba(0,0,0,0.04);
}

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

body {
    background-color: var(--background);
    color: var(--text);
    overflow-x: hidden;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface);
    min-height: 100vh;
    box-shadow: 0 0 30px rgba(0,0,0,0.05);
    position: relative;
    padding-bottom: 80px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border);
}

.app-header .menu-icon {
    font-size: 20px;
    color: var(--text);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: background 0.2s;
}

.app-header .menu-icon:active {
    background: var(--border);
}

.app-header .logo {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
}

.app-header .actions {
    display: flex;
    gap: 15px;
}

.app-header .actions i {
    font-size: 20px;
    color: var(--text);
    position: relative;
}

.badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Banner */
.banner {
    width: 100%;
    padding: 15px;
}

.banner-placeholder {
    width: 100%;
    height: 140px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.2);
}

/* Categories */
.categories-section {
    padding: 0 15px 20px;
}

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

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

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.category-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff0f4;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

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

.category-icon-wrapper i {
    font-size: 24px;
    color: var(--primary);
}

.category-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--text);
    text-align: center;
    line-height: 1.2;
}

/* Loader */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Products Grid */
.products-view {
    min-height: 60vh;
}

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

.product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:active {
    transform: scale(0.98);
}

.product-image-container {
    width: 100%;
    aspect-ratio: 1;
    background: #fcfcfc;
    position: relative;
    padding: 10px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.no-image {
    width: 100%;
    height: 100%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 32px;
}

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

.product-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.btn-whatsapp {
    width: 100%;
    padding: 10px;
    background: #f0fdf4;
    color: var(--whatsapp);
    border: 1px solid #dcfce7;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-large {
    padding: 14px;
    font-size: 15px;
    border-radius: 12px;
}

.btn-whatsapp i {
    font-size: 16px;
}

.btn-whatsapp:active {
    background: #dcfce7;
    transform: scale(0.98);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.modal-close i {
    font-size: 16px;
    color: var(--text);
}

/* Image Zoom Wrapper */
.modal-image-wrapper {
    width: 100%;
    aspect-ratio: 1;
    background: #f9f9f9;
    overflow: scroll; /* Allows zooming implicitly on mobile if image is larger */
    position: relative;
    touch-action: pan-x pan-y pinch-zoom; /* Enable native browser pinch zoom */
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-details {
    padding: 20px;
    background: #fff;
    border-top: 1px solid var(--border);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.4;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Brands Bottom Bar */
.brands-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    padding: 12px 15px;
    z-index: 99;
}

.brands-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 5px;
    /* Hide scrollbar for clean look on mobile initially, or keep thin */
    scrollbar-width: none; /* Firefox */
}

.brands-scroll::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.brand-badge {
    padding: 8px 16px;
    background: #f0f0f0;
    color: var(--text);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.brand-badge.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(233, 30, 99, 0.25);
}

.brand-badge:active {
    transform: scale(0.95);
}
