:root {
    --header-height: 50px;
    --banner-height: 110px;
    --mobile-width: min(100vw, 390px);
    --sidebar-width: clamp(68px, 20vw, 80px);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #b1b1b1;
    min-height: 100vh;
}

.app-shell {
    width: var(--mobile-width);
    max-width: var(--mobile-width);
    min-height: 100vh;
    margin: 0 auto;
    position: relative;
}

/* Main container with 390px constraints */
.main-container {
    width: 100%;
    max-width: 100% !important;
    min-width: 100% !important;
    margin: 0;
    background: #fff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Mobile-first: 390px fixed width */
@media (min-width: 1px) {
    .main-container {
        max-width: 100% !important;
        min-width: 100% !important;
    }
}

/* Header */
.header {
    background: #FFBC0D;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: var(--mobile-width);
    height: var(--header-height);
    margin: 0 auto;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.banner-container {
    width: 100%;
    padding-top: var(--header-height);
}

.banner {
    width: 100%;
    height: var(--banner-height);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 12px;
}

.banner-image-wrap {
    width: 100%;
    height: 100%;
    border-radius: 9px;
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
    cursor: grab;
}

.banner-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.45s ease;
}

.banner-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.banner-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-image-wrap:active {
    cursor: grabbing;
}

.banner-indicators-wrap {
    display: flex;
    justify-content: center;
    padding: 0 12px 8px;
    background: #ffffff;
}

.banner-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 10px;
}

.banner-indicator {
    width: 7px;
    height: 7px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.18);
    padding: 0;
    transition: width 0.2s ease, background 0.2s ease;
}

.banner-indicator.is-active {
    width: 12px;
    background: #ffbc0d;
}

.app-loading .banner-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(237, 237, 237, 0.95) 0%,
        rgba(248, 248, 248, 0.95) 45%,
        rgba(230, 230, 230, 0.95) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
    z-index: 2;
}

.app-loading .banner-image {
    opacity: 0;
}

.logo h1 {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.nav {
    display: flex;
    align-items: center;
    gap: -0.55rem;
}

.cart-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: 10px;
    transition: background 0.3s ease;
    -webkit-tap-highlight-color: transparent;

}

.cart-btn:hover {
    background: rgba(255,255,255,0.1);
}

.message-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.message-btn:hover {
    background: rgba(255,255,255,0.1);
}

.cart-icon {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
    -webkit-tap-highlight-color: transparent;

}

.message-icon {
    display: block;
    width: 27px;
    height: 26px;
    object-fit: contain;
    -webkit-tap-highlight-color: transparent;
}

#message-count {
    position: absolute;
    top: -2px;
    right: -5px;
    display: none;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e60023;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #FFBC0D;
}

#cart-count {
    position: absolute;
    top: -2px;
    right: -5px;
    display: none;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e60023;
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #FFBC0D;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #D2691E, #A0522D);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    max-width: 360px;
    margin: 0 auto;
    margin-top: 80px;
}

.hero-content h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.cta-button {
    background: #8B4513;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cta-button:hover {
    background: #654321;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 50%;
    transform: translateX(calc(var(--mobile-width) / -2));

    top: calc(var(--header-height) + var(--banner-height));
    height: calc(100vh - var(--header-height) - var(--banner-height));

    width: var(--sidebar-width);
    background: #ffffff;
    padding: 1rem 0.5rem;
    z-index: 99;

    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-btn {
    background: rgba(156 156 156 / 10%);
    color: rgb(34, 34, 34);
    border: none;
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 10px;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;

}

.sidebar-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(2px);
}

.sidebar-settings-btn {
    margin-top: auto;
    background: rgb(156, 156, 156, 0.1);
    color: rgb(34, 34, 34);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 10px;
    font-weight: bold;
    min-height: 42px;
    padding: 0.75rem 0.5rem;
    -webkit-tap-highlight-color: transparent;
}

/* Main Content */
.main-content {
    margin-left: 0;
    padding-left: 0;
}

/* Featured Products Section */
.featured-products {
    padding: 0rem 1rem 6rem;
    max-width: calc(var(--mobile-width) - var(--sidebar-width));
    margin: 0 0 0 var(--sidebar-width);
    margin-top: 10px;
}

.featured-products h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #8B4513;
}

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

.product-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.product-card.is-out-of-stock {
    background: #e9e9e9;
}

.product-card.is-skeleton {
    pointer-events: none;
}

.product-card.is-skeleton .product-image-wrap,
.product-card.is-skeleton .skeleton-line {
    position: relative;
    overflow: hidden;
    background: #ececec;
}

.product-card.is-skeleton .product-image-wrap::after,
.product-card.is-skeleton .skeleton-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(236, 236, 236, 0.9) 0%,
        rgba(248, 248, 248, 0.95) 45%,
        rgba(228, 228, 228, 0.9) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
}

.product-image-wrap {
    position: relative;
    margin-bottom: 0.75rem;
}

.product-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    margin: 0 auto;
}

.out-of-stock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(90, 90, 90, 0.2);
    border-radius: 10px;
}

.out-of-stock-badge {
    width: 100%;
    max-width: 88px;
    object-fit: contain;
}

.product-card h4 {
    font-size: .8rem;
    margin-bottom: 0.25rem;
    color: #8B4513;
}

.skeleton-line {
    border-radius: 8px;
}

.skeleton-line-title {
    height: 14px;
    margin-bottom: 0.45rem;
}

.skeleton-line-price {
    width: 55%;
    height: 14px;
    margin-bottom: 0.6rem;
}

.skeleton-line-button {
    height: 32px;
}

.product-card .price {
    font-size: 1rem;
    font-weight: bold;
    color: #3a3a3a;
    margin-bottom: 0.5rem;
}

.add-to-cart {
    background: #FFBC0D;
    font-weight: bold;
    color: rgb(0, 0, 0);
    border: none;
    padding: 0.5rem .5rem;
    font-size: 11px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
    /*-webkit-tap-highlight-color: transparent;*/

}

.add-to-cart:disabled {
    background: #bdbdbd;
    color: #5a5a5a;
    cursor: not-allowed;
}



/* Cart Section */
.inventory-section,
.cart-section {
    display: none;
    padding: calc(var(--header-height) + 1rem) 1rem 1rem;
    max-width: var(--mobile-width);
    margin: 0;
    background: #ffffff;
    min-height: calc(100vh - var(--header-height));
}

.inventory-header,
.cart-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.inventory-back-btn,
.back-to-menu {
    background: rgba(156 156 156 / 12%);
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    padding: 0.55rem 0.75rem;
}

.inventory-section h3,
.cart-section h3 {
    color: #333;
    font-size: 1.15rem;
    line-height: 1;
}

.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.inventory-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 0.75rem;
}

.inventory-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
}

.inventory-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.inventory-item-name {
    color: #333;
    font-size: 0.82rem;
    font-weight: bold;
    line-height: 1.25;
}

.inventory-item-price,
.inventory-item-price-label {
    color: #8B4513;
    font-size: 0.82rem;
    font-weight: bold;
}

.inventory-price-editor {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.inventory-price-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.2rem;
}

.inventory-currency {
    color: #333;
    font-size: 0.82rem;
    font-weight: bold;
}

.inventory-price-input {
    width: 60%;
    height: 80%;
    min-width: 0;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: 80%;
    outline: none;
    padding: 0.45rem 0.55rem;
}

.inventory-toggle-btn {
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.74rem;
    font-weight: bold;
    min-width: 90px;
    padding: 0.6rem 0.7rem;
}

.inventory-toggle-btn.is-on {
    background: #daf5de;
    color: #196b2d;
}

.inventory-toggle-btn.is-off {
    background: #f1d7dc;
    color: #9a1f33;
}

.cart-item {
    display: grid;
    grid-template-columns: 58px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 58px;
    height: 58px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.cart-item-name {
    color: #333;
    font-size: 0.82rem;
    font-weight: bold;
    line-height: 1.25;
}

.cart-item-price {
    color: #8B4513;
    font-size: 0.85rem;
    font-weight: bold;
}

.quantity-control {
    display: grid;
    grid-template-columns: 28px 26px 28px;
    align-items: center;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-control button {
    width: 28px;
    height: 30px;
    background: #FFBC0D;
    color: #111;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.quantity-control span {
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
}

.empty-cart {
    background: #f8f9fa;
    border-radius: 10px;
    color: #777;
    font-size: 0.9rem;
    padding: 2rem 1rem;
    text-align: center;
}

.cart-total {
    display: flex;
    justify-content: flex-end;
    margin: 1.25rem 0;
    font-size: 1.15rem;
    color: #333;
}

.checkout-btn {
    background: #8B4513;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s ease;
    -webkit-tap-highlight-color: transparent;

}

.checkout-btn:hover {
    background: #654321;
}

.bottom-cart-bar {
    position: fixed;
    left: 50%;
    bottom: 26px;
    z-index: 120;
    width: calc(var(--mobile-width) - 24px);
    min-height: 58px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    background: #111111;
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, calc(100% + 24px));
    transition: transform 0.28s cubic-bezier(0.2, 0.85, 0.25, 1), opacity 0.2s ease;
}

.bottom-cart-bar.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.bottom-cart-summary {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.2;
}

.bottom-cart-items {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: bold;
}

.bottom-cart-price {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 800;
}

.bottom-checkout-btn {
    background: #FFBC0D;
    color: #111111;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 0.7rem 0.9rem;
    -webkit-tap-highlight-color: transparent;
}

/* Stats Section */
.stats-section {
    background: #8B4513;
    color: white;
    padding: 2rem 1rem;
    max-width: 280px;
    margin: 0 auto;
    margin-left: 90px;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    max-width: 330px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #D2691E;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: #8B4513;
    color: white;
    padding: 1rem;
    text-align: center;
    max-width: 280px;
    margin: 0 auto;
    margin-left: 90px;
}

.footer-content p {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Modal */
.order-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.48);
}

.order-modal.is-open {
    display: flex;
    animation: modalFadeIn 0.18s ease-out;
}

.developer-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.48);
}

.developer-modal.is-open {
    display: flex;
    animation: modalFadeIn 0.18s ease-out;
}

.message-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.48);
}

.message-modal.is-open {
    display: flex;
    animation: modalFadeIn 0.18s ease-out;
}

.developer-modal-panel,
.order-modal-panel {
    width: min(330px, 100%);
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    text-align: center;
    animation: modalPopIn 0.22s cubic-bezier(0.2, 0.85, 0.3, 1.2);
}

.message-modal-panel {
    width: min(340px, calc(100vw - 2rem));
    background: #ffffff;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    animation: modalPopIn 0.22s cubic-bezier(0.2, 0.85, 0.3, 1.2);
}

.developer-modal-panel h3,
.order-modal-panel h3 {
    color: #333;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.message-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.message-modal-header h3 {
    color: #333;
    font-size: 1rem;
    line-height: 1.3;
    margin: 0 0 0.2rem;
}

.message-modal-subtitle {
    color: #777;
    font-size: 0.82rem;
    line-height: 1.3;
}

.message-header-actions {
    display: flex;
    align-items: center;
    gap: 0rem;
}

.message-header-profile {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.message-header-avatar-wrap {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    overflow: hidden;
    flex: 0 0 auto;
    background: #ececec;
}

.message-header-avatar-wrap.is-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(228, 228, 228, 0.95) 0%,
        rgba(247, 247, 247, 0.95) 45%,
        rgba(224, 224, 224, 0.95) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.2s linear infinite;
    z-index: 1;
}

.message-header-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: cover;
    display: block;
    opacity: 1;
    transition: opacity 0.18s ease;
}

.message-header-avatar-wrap.is-loading .message-header-avatar {
    opacity: 0;
}

.message-header-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.message-header-name {
    color: #333;
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1;
}

.message-header-badge {
    width: 13px;
    height: 13px;
    object-fit: contain;
}

.message-close-btn {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    border-radius: 999px;
    cursor: pointer;
    padding: 0;
}

.message-close-icon {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.message-chat-thread {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 150px;
    background: #f8f4f0 url('img/chat/chat_background.jpg') center / cover no-repeat;
    border-radius: 12px;
    padding: 1rem .7rem;
    margin-bottom: 0.85rem;
    position: relative;
    overflow: hidden;
}

.message-chat-thread::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #f8f4f0 url('img/chat/chat_background.jpg') center / cover no-repeat;
    opacity: 0;
    z-index: 0;
}

.message-modal.is-open .message-chat-thread::before {
    animation: chatBackgroundFadeIn 0.45s ease-out forwards;
}

.message-chat-thread > * {
    position: relative;
    z-index: 1;
}

.message-agent-row {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

.message-agent-row-response {
    display: none;
}

.message-agent-row-response.is-visible {
    display: flex;
}

.message-bubble {
    position: relative;
}

.message-bubble-reply {
    align-self: auto;
    max-width: 100%;
    background: #ffffff;
    border-radius: 7px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
    color: #333;
    font-size: 0.88rem;
    line-height: 1.45;
    padding: 0.35rem 0.65rem;
    margin-bottom: 0;
}

.message-bubble-reply::after {
    content: '';
    position: absolute;
    left: -6px;
    bottom: 10px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.message-bubble-hint {
    max-width: 98%;
    background: #fff3c4;
    border-radius: 16px;
    color: #775b00;
    font-size: 0.62rem;
    line-height: 1.4;
    padding: 0.3rem 0.8rem;
    text-align: center;
    margin-bottom: .8rem;
}

.message-bubble-user {
    display: none;
    align-self: flex-end;
    max-width: 78%;
    background: #dcf8c6;
    border-radius: 7px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
    color: #23401a;
    font-size: 0.82rem;
    line-height: 1.35;
    padding: 0.4rem 0.7rem;
}

.message-bubble-user.is-visible {
    display: block;
}

.message-bubble-user::after {
    content: '';
    position: absolute;
    right: -6px;
    bottom: 10px;
    width: 12px;
    height: 12px;
    background: #dcf8c6;
    clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.message-service-options {
    position: relative;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 100%;
    background: #ffffff;
    border-radius: 7px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
    margin: -0.2rem 0 0.25rem 0;
    padding: 0.25rem 0;
}

.message-service-options::after {
    content: '';
    position: absolute;
    left: -6px;
    bottom: 10px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.message-service-title {
    color: #666;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.35;
    padding: 0.2rem 0.85rem 0.45rem;
}

.message-service-btn {
    width: 100%;
    border: none;
    background: transparent;
    color: #111111;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: bold;
    padding: 0.58rem 0.85rem;
    text-align: center;
    border-top: 1px solid #eeeeee;
    -webkit-tap-highlight-color: transparent;

}

.message-service-btn.is-selected {
    background: #f6f6f6;
}

.message-service-btn + .message-service-btn {
    border-top: 1px solid #eeeeee;
}

.message-input-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.7rem;
    align-items: end;
}

.message-input {
    width: 100%;
    min-height: 42px;
    max-height: 42px;
    border: 1px solid #dddddd;
    border-radius: 10px;
    color: #333;
    font-size: 16px;
    line-height: 1.2;
    outline: none;
    resize: none;
    padding: 0.72rem 0.95rem;
    overflow: hidden;
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}

.message-input:focus {
    border-color: #FFBC0D;
    box-shadow: 0 0 0 3px rgba(255, 188, 13, 0.18);
}

.message-send-btn {
    min-width: 74px;
    border: none;
    border-radius: 10px;
    background: #25D366;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 0.75rem 1rem;
}

.message-bubble-typing {
    display: none;
    align-self: flex-end;
    gap: 0.28rem;
    background: #dcf8c6;
    border-radius: 7px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
    padding: 0.8rem 0.7rem;
}

.message-bubble-typing.is-visible {
    display: inline-flex;
    animation: typingBubbleIn 0.22s ease-out;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.message-bubble-typing::after {
    content: '';
    position: absolute;
    right: -6px;
    bottom: 10px;
    width: 12px;
    height: 12px;
    background: #dcf8c6;
    clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.message-bubble-typing span {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #4f7f3a;
    animation: typingDot 1s infinite ease-in-out;
}

.message-bubble-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.message-bubble-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

.developer-modal-text {
    color: #666;
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
}

.order-modal-location {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.developer-password-input {
    width: 100%;
    border: 1px solid #dddddd;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    padding: 0.8rem 0.9rem;
}

.developer-password-error {
    min-height: 1.2rem;
    color: #c1263f;
    font-size: 0.8rem;
    margin: 0.6rem 0 0.9rem;
}

.developer-modal-actions,
.order-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.location-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.48);
}

.location-modal.is-open {
    display: flex;
    animation: modalFadeIn 0.18s ease-out;
}

.location-modal-panel {
    width: min(340px, calc(100vw - 2rem));
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    animation: modalPopIn 0.22s cubic-bezier(0.2, 0.85, 0.3, 1.2);
}

.location-modal-panel h3 {
    color: #333;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    text-align: center;
}

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.location-option-btn {
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.55rem;
    text-align: left;
}

.location-option-btn.is-selected {
    border-color: #FFBC0D;
    box-shadow: inset 0 0 0 1px #FFBC0D;
}

.location-option-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}

.location-option-name {
    color: #333;
    font-size: 0.82rem;
    font-weight: bold;
    line-height: 1.2;
}

.location-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.location-other-btn {
    width: 100%;
    display: block;
    background: #f4f4f4;
    color: #333;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    cursor: pointer;
    padding: 0.9rem 1rem 1rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.location-other-label {
    display: block;
    font-size: 0.95rem;
    font-weight: bold;
    line-height: 1.2;
}

.location-other-btn.is-selected {
    background: #fff7da;
    border-color: #FFBC0D;
    box-shadow: inset 0 0 0 1px #FFBC0D;
}

.location-other-input-wrap {
    display: none;
    margin-top: 0.75rem;
    width: 100%;
}

.location-other-input-wrap.is-visible {
    display: block;
    animation: modalFadeIn 0.16s ease-out;
}

.location-other-input {
    display: block;
    width: 100%;
    min-height: 45px;
    border: 1px solid #dddddd;
    border-radius: 7px;
    color: #333;
    font-size: 16px;
    outline: none;
    padding: 0.82rem 0.9rem;
    background: #ffffff;
    -webkit-appearance: none;
    appearance: none;
}

.location-other-input:focus {
    border-color: #FFBC0D;
    box-shadow: 0 0 0 3px rgba(255, 188, 13, 0.18);
}

.location-other-input::placeholder {
    color: #9a9a9a;
}

.location-cancel-btn,
.location-confirm-btn {
    background: #eeeeee;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 0.75rem 1rem;
}

.location-confirm-btn {
    background: #25D366;
    color: #ffffff;
}

.option-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.48);
}

.option-modal.is-open {
    display: flex;
    animation: modalFadeIn 0.18s ease-out;
}

.option-modal-panel {
    width: min(340px, 100%);
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    animation: modalPopIn 0.22s cubic-bezier(0.2, 0.85, 0.3, 1.2);
}

.option-modal-panel h3 {
    color: #333;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    text-align: center;
}

.option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.option-choice-btn {
    min-height: 108px;
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    color: #333;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.7rem;
    padding: 1rem;
}

.option-choice-image-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.option-choice-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.option-choice-label {
    display: block;
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.2;
}

.option-choice-btn.is-selected {
    background: #fff7da;
    border-color: #FFBC0D;
    box-shadow: inset 0 0 0 1px #FFBC0D;
}

.option-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.option-cancel-btn,
.option-confirm-btn {
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 0.75rem 1rem;
}

.option-cancel-btn {
    background: #eeeeee;
    color: #333;
}

.option-confirm-btn {
    background: #25D366;
    color: #ffffff;
}

.developer-cancel-btn,
.developer-confirm-btn,
.modal-cancel-btn,
.modal-ok-btn {
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 0.75rem 1rem;
    -webkit-tap-highlight-color: transparent;
}

.developer-cancel-btn,
.modal-cancel-btn {
    background: #eeeeee;
    color: #333;
}

.developer-confirm-btn,
.modal-ok-btn {
    background: #25D366;
    color: #ffffff;
}

@keyframes modalFadeIn {
    from {
        background: rgba(0, 0, 0, 0);
    }
    to {
        background: rgba(0, 0, 0, 0.48);
    }
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes typingDot {
    0%,
    60%,
    100% {
        opacity: 0.45;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-2px);
    }
}

@keyframes typingBubbleIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes modalPopIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Desktop styles */
@media (min-width: 769px) {
    .app-shell {
        width: var(--mobile-width);
        max-width: var(--mobile-width);
    }

    .main-container {
        max-width: 100% !important;
        min-width: 100% !important;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
    
    .header {
        width: var(--mobile-width);
        max-width: var(--mobile-width);
    }
    
    .sidebar {
        transform: translateX(calc(var(--mobile-width) / -2));
        width: var(--sidebar-width);
    }
    
    .sidebar-btn {
        font-size: 10px;
        padding: 0.75rem 0.5rem;
    }
    
    .hero-section,
    .featured-products,
    .stats-section,
    .footer {
        max-width: calc(var(--mobile-width) - var(--sidebar-width));
        margin-left: var(--sidebar-width);
    }

    .cart-section {
        max-width: 100%;
        margin-left: 0;
    }

    .bottom-cart-bar {
        width: calc(var(--mobile-width) - 24px);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .modal-content {
        max-width: 500px;
    }
}
