/* ================================================
   BARRIS DO DOURO - ESTILOS MENU
   ================================================ */

/* Google Translate Override */
.skiptranslate { display: none !important; }
body { top: 0 !important; }

/* Reset Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

html {
    background: #0a0f0d;
    scroll-behavior: auto;
}

body {
    background: #0a0f0d;
    color: #fff;
    font-family: 'Inter', sans-serif;
    min-height: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* ================================================
   HEADER
   ================================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 68px;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    background: #0a0f0d;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    color: #fff;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.back-btn:active {
    transform: scale(0.95);
    background: rgba(255,255,255,0.15);
}

.back-btn svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    color: #8f633f;
}

/* ================================================
   PILLS DE NAVEGAÇÃO
   ================================================ */
.category-pills-wrapper {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    z-index: 99;
    background: #0a0f0d;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin: 0;
}

.category-pills {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.pill {
    padding: 10px 20px;
    border-radius: 20px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.pill.active {
    background: #8f633f;
    color: #fff;
}

/* ================================================
   CONTAINER PRINCIPAL
   ================================================ */
.container {
    padding: 128px 0 90px;
    min-height: 100vh;
}

.category-separator {
    padding: 20px 20px 12px;
    border-bottom: 2px solid #8f633f;
    margin-bottom: 0;
    background: #0a0f0d;
}

.category-separator h2 {
    font-size: 18px;
    font-weight: 600;
    color: #8f633f;
    text-align: center;
    margin: 0;
}

/* ================================================
   PRODUTO ITEM
   ================================================ */
.product-item {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
    background: #0a0f0d;
}

.product-item:active {
    background: rgba(255,255,255,0.03);
}

.shimmer {
    background: #1a1a1a;
    background-image: linear-gradient(
        90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.05) 50%, 
        rgba(255,255,255,0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.product-image {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: #1a1a1a;
    cursor: pointer;
    aspect-ratio: 1 / 1; /* Prevent layout shift */
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    aspect-ratio: 1 / 1;
}

.product-image img.loaded {
    opacity: 1;
}

/* Performance: render off-screen items lazily */
.product-item {
    content-visibility: auto;
    contain-intrinsic-size: auto 100px;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 6px;
}

.product-name {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    flex: 1;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    margin-left: 12px;
}

.chef-badge-menu {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,193,7,0.12);
    border: 1px solid rgba(255,193,7,0.3);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    color: #ffc107;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
}

.product-description {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    line-height: 1.4;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-description.expanded {
    -webkit-line-clamp: unset;
    display: block;
}

.show-more-menu {
    color: #8f633f;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
    display: inline-block;
    text-decoration: underline;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.btn-info-menu {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #fff;
    transform: translateZ(0);
}

.btn-info-menu:active {
    transform: scale(0.92) translateZ(0);
    background: rgba(255,255,255,0.15);
}

.btn-info-menu svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

.btn-add-menu {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #8f633f 0%, #6d452a 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(143, 99, 63, 0.25);
}

/* ================================================
   BOTTOM NAVIGATION
   ================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(75px + env(safe-area-inset-bottom));
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 12px env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    font-weight: 500;
    flex: 1;
    padding-top: 12px;
}

.nav-item.active {
    color: #8f633f;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

/* ================================================
   MODAL DE QUANTIDADE
   ================================================ */
.quantity-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    display: none;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quantity-modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #121212;
    width: 100%;
    border-radius: 30px 30px 0 0;
    padding: 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 1px solid rgba(255,255,255,0.1);
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.quantity-modal.show .modal-content {
    transform: translateY(0);
}

.modal-media-container {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
    border-radius: 30px 30px 0 0;
}

.modal-video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    border: none;
    color: #fff;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px 24px;
    margin-bottom: 80px;
}

.modal-title {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.modal-description {
    font-size: 15px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    margin-bottom: 16px;
}

.modal-price-tag {
    font-size: 24px;
    color: #fff;
    font-weight: 700;
}

.modal-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 24px 30px;
    background: #121212;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 20;
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: #252525;
    border-radius: 12px;
    padding: 5px;
    height: 56px;
}

.qty-btn {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: #8f633f;
    color: #fff;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-value {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    width: 40px;
    text-align: center;
}

.confirm-add-btn {
    flex: 1;
    height: 56px;
    background: linear-gradient(135deg, #8f633f 0%, #6d452a 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-add-btn.success {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%) !important;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* ================================================
   LANGUAGE SELECTOR
   ================================================ */
.lang-selector {
    position: relative;
}

.current-lang {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.15);
    cursor: pointer;
    transition: all 0.2s ease;
}

.current-lang:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.current-lang .flag-icon {
    font-size: 20px;
    border-radius: 2px;
    width: 26px;
    line-height: 20px;
}

.lang-dropdown {
    position: absolute;
    top: 55px;
    right: 0;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 16px;
    width: 240px;
    display: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 1000;
}

.lang-dropdown.show {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.lang-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.lang-grid .flag-icon {
    font-size: 24px;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.2s ease;
    width: 100%;
    aspect-ratio: 4/3;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.lang-grid .flag-icon:hover {
    transform: scale(1.2);
    z-index: 10;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================================
   LOAD MORE
   ================================================ */
.load-more-trigger.hidden { 
    display: none !important; 
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { 
    to { transform: rotate(360deg); } 
}
