/* ================================================
   BARRIS DO DOURO - ESTILOS PÁGINA CATEGORIA
   ================================================ */

/* Reset Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

html, body {
    background: #000;
    color: #fff;
    font-family: 'Inter', sans-serif;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* ================================================
   CONTAINER PRINCIPAL - SCROLL VERTICAL
   ================================================ */
.products-container {
    height: 100vh;
    height: 100dvh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.products-container::-webkit-scrollbar {
    display: none;
}

/* ================================================
   CARD DE PRODUTO - FULLSCREEN
   ================================================ */
.product-card {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    overflow: hidden;
}

/* Vídeo de Fundo */
.product-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
    animation: none;
    pointer-events: none;
}

/* HIDE ALL DEFAULT VIDEO CONTROLS AND PLAY BUTTONS */
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-play-button,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-current-time-display,
video::-webkit-media-controls-time-remaining-display,
video::-webkit-media-controls-mute-button,
video::-webkit-media-controls-volume-slider,
video::-webkit-media-controls-fullscreen-button {
    display: none !important;
    -webkit-appearance: none;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

video::-moz-media-controls {
    display: none !important;
}

video::media-controls {
    display: none !important;
}

/* iOS Safari specific */
video::-webkit-media-controls-overlay-enclosure {
    display: none !important;
}

*::-webkit-media-controls-overlay-play-button {
    display: none !important;
    opacity: 0 !important;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Overlay Gradient */
.product-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.3) 0%,
        rgba(0,0,0,0.1) 30%,
        rgba(0,0,0,0.5) 70%,
        rgba(0,0,0,0.9) 100%
    );
}

/* ================================================
   HEADER TOP
   ================================================ */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, transparent 100%);
}

.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;
    transition: all 0.2s ease;
    color: #fff;
    flex-shrink: 0;
}

.back-btn:active {
    transform: scale(0.95);
    background: rgba(255,255,255,0.15);
}

.back-btn svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
}

.category-pills {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    padding: 5px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-padding: 0;
    /* Máscara suave para as bordas não ficarem cortadas abruptamente */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 5px, #000 calc(100% - 5px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 5px, #000 calc(100% - 5px), transparent);
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.pill {
    padding: 10px 18px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
}

.pill.active {
    background: #8f633f;
    color: #fff;
    font-weight: 600;
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 4px 12px rgba(143, 99, 63, 0.3);
    transform: translateY(-1px);
}

/* ================================================
   CONTEÚDO DO PRODUTO
   ================================================ */
.product-content {
    position: absolute;
    bottom: 115px;
    left: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    height: auto;
}

.product-info {
    flex: 0 0 auto;
    max-width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px;
}

.product-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.product-price {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 3px;
}

.chef-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(255,193,7,0.12) 0%, rgba(255,193,7,0.08) 100%);
    border: 1px solid rgba(255,193,7,0.25);
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 9px;
    color: #ffc107;
    margin-bottom: 4px;
    width: fit-content;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.chef-badge svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

.product-description {
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}}

.show-more {
    display: inline-block;
    color: #8f633f;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0;
}

/* ================================================
   BOTÕES DE AÇÃO
   ================================================ */
.action-buttons {
    display: flex;
    gap: 8px;
    margin-top: 0;
    justify-content: flex-end;
    flex-shrink: 0;
    align-items: flex-end;
}

.btn-info-elegant {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateZ(0);
    flex-shrink: 0;
}

.btn-info-elegant svg {
    width: 16px;
    height: 16px;
}

.btn-info-elegant:active {
    transform: scale(0.92) translateZ(0);
    background: rgba(255,255,255,0.2);
}

.btn-add-elegant {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #8f633f 0%, #6d452a 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(143, 99, 63, 0.25);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateZ(0);
    height: 40px;
    white-space: nowrap;
}

.btn-add-elegant svg {
    width: 16px;
    height: 16px;
}

.btn-add-elegant:active {
    transform: scale(0.94) translateZ(0);
    box-shadow: 0 2px 8px rgba(143, 99, 63, 0.4);
}

/* ================================================
   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;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    padding-top: 12px;
}

.nav-item.active {
    color: #8f633f;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    transition: transform 0.3s ease;
}

.nav-item.active svg {
    transform: translateY(-2px);
}

/* ================================================
   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-media-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to top, #121212, transparent);
    z-index: 2;
}

.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 100px;
    overflow-y: auto;
    flex: 1;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.2;
}

.modal-description {
    font-size: 15px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    margin-bottom: 12px;
}

.modal-price-tag {
    font-size: 24px;
    color: #fff;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 20px;
}

.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;
    border: none;
    background: #8f633f;
    color: #fff;
    font-size: 24px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

.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;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(143, 99, 63, 0.25);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform, box-shadow, background;
}

.confirm-add-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(143, 99, 63, 0.3);
}

.confirm-add-btn.success {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%) !important;
    color: #fff !important;
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(29, 209, 161, 0.35);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 30px rgba(29, 209, 161, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(29, 209, 161, 0.35);
    }
}

/* ================================================
   GOOGLE TRANSLATE
   ================================================ */
.goog-te-banner-frame { 
    display: none !important; 
    visibility: hidden !important;
}
body { 
    top: 0 !important; 
    position: static !important;
}
.skiptranslate {
    display: none !important;
}
iframe.skiptranslate {
    display: none !important;
    visibility: hidden !important;
}
body > .skiptranslate {
    display: none !important;
}

/* ================================================
   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);
    }
}

/* ================================================
   SKELETON LOADERS - Perceived Performance
   ================================================ */
.skeleton-card {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    scroll-snap-align: start;
    overflow: hidden;
    background: #0d0d0d;
}

.skeleton-video {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 50%, #1a1a1a 100%);
    background-size: 400% 400%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

.skeleton-content {
    position: absolute;
    bottom: 120px;
    left: 20px;
    right: 20px;
}

.skeleton-name {
    width: 60%;
    height: 28px;
    background: linear-gradient(90deg, #222 25%, #333 50%, #222 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.2s ease-in-out infinite;
    border-radius: 6px;
    margin-bottom: 12px;
}

.skeleton-price {
    width: 80px;
    height: 24px;
    background: linear-gradient(90deg, #222 25%, #333 50%, #222 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.2s ease-in-out infinite 0.1s;
    border-radius: 6px;
    margin-bottom: 16px;
}

.skeleton-desc {
    width: 90%;
    height: 16px;
    background: linear-gradient(90deg, #222 25%, #333 50%, #222 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.2s ease-in-out infinite 0.2s;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-desc:nth-child(2) {
    width: 70%;
}

.skeleton-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.skeleton-btn {
    height: 44px;
    background: linear-gradient(90deg, #222 25%, #333 50%, #222 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.2s ease-in-out infinite 0.3s;
    border-radius: 12px;
}

.skeleton-btn:first-child {
    width: 44px;
}

.skeleton-btn:last-child {
    flex: 1;
    max-width: 140px;
}

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

/* Loading state for container */
.products-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.products-container.loading::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #8f633f, transparent);
    background-size: 200% 100%;
    animation: loadingBar 1s ease-in-out infinite;
    z-index: 9999;
}

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

/* Fade in animation for loaded content */
.product-card.fade-in {
    animation: fadeIn 0.3s ease-out;
}

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