/* ============================================================
   TEIXEIRA STYLE — Estilos de Carrinho, Checkout e Pedidos
   ============================================================ */

/* ---- Header ações ---- */
.navbar__actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; padding-right: 2.5rem; }
.navbar__icon-btn { position: relative; background: transparent; border: none; color: rgba(255,255,255,0.75); width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: color .2s; }
.navbar__icon-btn:hover { color: #fff; }
.navbar__icon-btn svg { width: 26px; height: 26px; }
.cart-count { position: absolute; top: -3px; right: -3px; background: #C9A66B; color: #0B0B0F; border-radius: 50%; width: 14px; height: 14px; font-size: .58rem; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.navbar__user-name { color: rgba(255,255,255,0.65); font-size: .78rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.navbar__google-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: #fff; color: #3c3c3c; border: none; border-radius: 4px; padding: 0.4rem 0.9rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; cursor: pointer; white-space: nowrap; transition: box-shadow .2s, background .2s; font-family: inherit; }
.navbar__google-btn:hover { background: #f5f5f5; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.navbar__logout-btn { display: inline-flex; align-items: center; gap: 0.4rem; background: transparent; color: rgba(255,255,255,0.6); border: none; padding: 0.3rem 0.2rem; font-size: 0.72rem; font-weight: 500; cursor: pointer; transition: opacity .2s; font-family: inherit; }
.navbar__logout-btn:hover { opacity: 0.8; }
.auth-btn__avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.2); flex-shrink: 0; }
.auth-btn__avatar--initials { display: inline-flex; align-items: center; justify-content: center; background: #C9A66B; color: #0B0B0F; font-size: 0.72rem; font-weight: 700; }
/* Oculta o botão de login/logout enquanto a sessão do Firebase ainda é verificada,
   evitando o "flash" de Entrar→Sair durante o carregamento. */
.auth-loading .auth-btn { opacity: 0; pointer-events: none; transition: opacity .15s ease; }
body:not(.auth-loading) .auth-btn { opacity: 1; transition: opacity .15s ease; }

.auth-btn__name { font-weight: 600; color: #fff; font-size: 0.82rem; }
.auth-btn__sair { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.55); font-size: 0.62rem; font-weight: 500; padding: 0.15rem 0.5rem; border-radius: 20px; letter-spacing: 0.03em; }
.navbar__panel-link { display: inline-flex; align-items: center; color: rgba(255,255,255,0.6); font-size: 0.72rem; font-weight: 500; padding: 0.4rem 0.6rem; border-radius: 4px; transition: color .2s, background .2s; font-family: inherit; }
.navbar__panel-link:hover { color: #fff; background: rgba(255,255,255,0.08); }

/* ---- Modal de confirmação de logout ---- */
#logoutModal { display: none; position: fixed; inset: 0; z-index: 9999; align-items: center; justify-content: center; }
#logoutModal.logout-modal--visible { display: flex; }
.logout-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); }
.logout-modal__box { position: relative; background: #17171D; border: 1px solid rgba(255,255,255,0.1); border-radius: 10px; padding: 2rem 2.5rem; text-align: center; min-width: 280px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.logout-modal__msg { color: #fff; font-size: 1rem; font-weight: 500; margin-bottom: 1.5rem; font-family: 'Inter', sans-serif; }
.logout-modal__actions { display: flex; gap: 0.75rem; justify-content: center; }
.logout-modal__btn { padding: 0.55rem 1.5rem; border-radius: 5px; font-size: 0.82rem; font-weight: 600; cursor: pointer; font-family: 'Inter', sans-serif; transition: all .2s; border: none; }
.logout-modal__btn--cancel { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.15); }
.logout-modal__btn--cancel:hover { background: rgba(255,255,255,0.14); color: #fff; }
.logout-modal__btn--confirm { background: #e53e3e; color: #fff; }
.logout-modal__btn--confirm:hover { background: #c53030; }

/* ---- Modal produto ---- */
.product-modal { background: #17171D; border: 1px solid #2a2a32; border-radius: 8px; width: 90%; max-width: 900px; max-height: 90vh; overflow-y: auto; position: relative; display: grid; }
.product-modal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2rem; }
.product-modal__img-wrap { background: #0B0B0F; border-radius: 8px; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.product-modal__img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.product-modal__close { position: absolute; top: 1rem; right: 1rem; background: transparent; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; z-index: 2; }
.product-modal__cat { color: #C9A66B; text-transform: uppercase; font-size: .8rem; letter-spacing: 1px; }
.product-modal__title { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; color: #fff; margin: .25rem 0; }
.product-modal__price { font-size: 1.4rem; color: #C9A66B; font-weight: 700; margin: .5rem 0; }
.product-modal__rating { display: flex; align-items: center; gap: .5rem; margin: .25rem 0 .75rem; }
.product-modal__stars { color: #C9A66B; font-size: 1rem; letter-spacing: 2px; }
.product-modal__rating-count { color: #777; font-size: .78rem; }
.product-modal__label { color: #aaa; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .5rem; }
.product-modal__desc { color: #aaa; line-height: 1.5; margin-bottom: 1rem; }
.product-modal__specs { border-top: 1px solid #2a2a32; margin: 1rem 0; padding-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.product-modal__spec-item { display: flex; justify-content: space-between; font-size: .82rem; }
.product-modal__spec-label { color: #666; }
.product-modal__spec-value { color: #ccc; text-align: right; }
.product-modal__sizes { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.modal-size { background: transparent; border: 1px solid #444; color: #fff; padding: .5rem 1rem; cursor: pointer; border-radius: 4px; }
.modal-size.selected { border-color: #C9A66B; background: #C9A66B; color: #0B0B0F; }
.product-modal__actions { display: flex; gap: .75rem; }
.product-modal__add { flex: 1; padding: .75rem .5rem; font-weight: 700; font-size: .9rem; border-radius: 4px; cursor: pointer; }
.product-modal__add:disabled { opacity: .5; cursor: not-allowed; }
.modal-toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); background: #C9A66B; color: #0B0B0F; padding: .75rem 1.5rem; border-radius: 4px; font-weight: 600; z-index: 200; }

/* ---- Carrinho ---- */
.cart-page, .checkout-page, .orders-page { padding: 6rem 4% 4rem; max-width: 1200px; margin: 0 auto; color: #fff; }
.cart-page__title, .checkout-page__title, .orders-page__title { font-family: 'Bebas Neue', sans-serif; font-size: 2.5rem; margin-bottom: 1.5rem; }
.cart-page__content { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.cart-items { display: flex; flex-direction: column; gap: 1rem; }
.cart-item { background: #17171D; border: 1px solid #2a2a32; border-radius: 8px; padding: 1rem; display: grid; grid-template-columns: 100px 1fr auto; gap: 1rem; align-items: center; }
.cart-item__img { width: 100px; height: 100px; object-fit: cover; border-radius: 4px; }
.cart-item__name { font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem; margin-bottom: .25rem; }
.cart-item__size, .cart-item__price { color: #aaa; font-size: .9rem; margin: .15rem 0; }
.cart-item__price { color: #C9A66B; font-weight: 700; }
.cart-item__qty { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; }
.qty-btn { width: 28px; height: 28px; background: #2a2a32; border: none; color: #fff; font-size: 1rem; cursor: pointer; border-radius: 4px; }
.cart-item__remove { background: transparent; border: none; color: #e74c3c; font-size: 1.2rem; cursor: pointer; }
.cart-summary, .checkout-summary { background: #17171D; border: 1px solid #2a2a32; border-radius: 8px; padding: 1.5rem; height: fit-content; }
.cart-summary h2, .checkout-summary h2 { margin-bottom: 1rem; font-family: 'Bebas Neue', sans-serif; }
.summary-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid #2a2a32; color: #aaa; }
.summary-row--total { font-size: 1.2rem; font-weight: 700; color: #fff; border-bottom: none; }
.btn { display: inline-block; padding: .75rem 1.5rem; border-radius: 4px; text-align: center; text-decoration: none; font-weight: 600; cursor: pointer; transition: .2s; }
.btn--gold { background: #C9A66B; color: #0B0B0F; }
.btn--gold:hover { background: #b08b50; }
.btn--outline { background: transparent; color: #fff; border: 1px solid #fff; }
.btn--outline:hover { background: #fff; color: #0B0B0F; }
.btn--full { width: 100%; margin-top: 1rem; }
.cart-page__empty { text-align: center; padding: 4rem; color: #aaa; }
.cart-page__empty .btn { margin-top: 1rem; }
.hidden { display: none !important; }

/* ---- Checkout ---- */
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.checkout-form h2, .checkout-summary h2 { font-family: 'Bebas Neue', sans-serif; margin-bottom: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; color: #aaa; margin-bottom: .35rem; font-size: .9rem; }
.form-input { width: 100%; padding: .75rem; background: #17171D; border: 1px solid #2a2a32; color: #fff; border-radius: 4px; }
.payment-methods { display: flex; flex-direction: column; gap: .75rem; margin: 1rem 0; }
.payment-option { display: flex; align-items: center; gap: .5rem; color: #fff; cursor: pointer; }
.pix-box { background: #0B0B0F; border: 1px solid #2a2a32; border-radius: 4px; padding: 1rem; word-break: break-all; }
.pix-key { font-size: .8rem; color: #aaa; margin: .5rem 0; }
.checkout-items { margin-bottom: 1rem; }
.checkout-item { display: flex; justify-content: space-between; padding: .35rem 0; color: #aaa; font-size: .9rem; }
.checkout-note { color: #777; font-size: .8rem; margin-top: .75rem; text-align: center; }
.payment-option--soon { opacity: .55; cursor: not-allowed; }
.badge-soon { display: inline-block; background: #C9A66B20; color: #C9A66B; border: 1px solid #C9A66B55; font-size: .65rem; padding: .1rem .45rem; border-radius: 20px; margin-left: .4rem; vertical-align: middle; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.whatsapp-info-box { background: #25D36615; border: 1px solid #25D36640; border-radius: 6px; padding: .75rem 1rem; margin-top: .75rem; color: #aaa; font-size: .9rem; }
#mp-button { margin-top: 1rem; }

/* ---- Pedidos ---- */
.orders-list { display: grid; gap: 1rem; }
.order-card { background: #17171D; border: 1px solid #2a2a32; border-radius: 8px; padding: 1.25rem; }
.order-card__header { display: flex; justify-content: space-between; margin-bottom: .5rem; }
.order-card__id { font-family: 'Bebas Neue', sans-serif; font-size: 1.4rem; color: #C9A66B; }
.order-card__status { padding: .25rem .5rem; border-radius: 4px; font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.order-card__status--aguardando_confirmacao { background: #f39c1220; color: #f39c12; }
.order-card__status--aguardando_pagamento { background: #f1c40f20; color: #f1c40f; }
.order-card__status--pago { background: #2ecc7120; color: #2ecc71; }
.order-card__status--enviado { background: #3498db20; color: #3498db; }
.order-card__status--entregue { background: #9b59b620; color: #9b59b6; }
.order-card__meta { color: #777; font-size: .85rem; margin-bottom: .75rem; }
.order-card__meta span { margin-right: 1rem; }
.order-card__items p { color: #aaa; margin: .15rem 0; font-size: .9rem; }
.order-card__total { margin-top: .75rem; color: #C9A66B; font-weight: 700; }
.orders-empty { color: #aaa; text-align: center; padding: 3rem; }

@media (max-width: 900px) {
  .product-modal__grid, .cart-page__content, .checkout-grid { grid-template-columns: 1fr; }
}

/* ---- Responsivo Carrinho / Checkout / Pedidos ---- */
@media (max-width: 768px) {
  /* Navbar actions: sem padding excessivo */
  .navbar__actions {
    padding-right: 0.75rem;
    gap: 0.35rem;
  }
  /* Oculta nome do usuário — economiza espaço */
  .navbar__user-name { display: none; }
  /* Google btn: apenas ícone */
  .navbar__google-btn {
    font-size: 0;
    padding: 0.4rem 0.55rem;
    gap: 0;
    min-width: 36px;
    justify-content: center;
  }
  .navbar__google-btn svg { width: 18px; height: 18px; }

  /* Páginas internas: padding compensa topbar + navbar da home */
  .cart-page, .checkout-page, .orders-page {
    padding: 6rem 1rem 3rem;
  }
  .cart-page__title, .checkout-page__title, .orders-page__title {
    font-size: 1.8rem;
  }
  .cart-item {
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto;
  }
  .cart-item__remove {
    grid-column: 2;
    justify-self: end;
    margin-top: -1.5rem;
  }
  .checkout-grid { gap: 1.5rem; }
  .pix-box { word-break: break-all; font-size: 0.75rem; }
  .product-modal {
    width: 95%;
    max-height: 95vh;
  }
  .product-modal__grid {
    grid-template-columns: 1fr;
    padding: 1.25rem;
    gap: 1.25rem;
  }
  .product-modal__img-wrap { min-height: 220px; }
}

@media (max-width: 480px) {
  .navbar__actions { padding-right: 0.5rem; }
  .cart-page, .checkout-page, .orders-page {
    padding: 5.5rem 0.75rem 2.5rem;
  }
  .cart-item {
    grid-template-columns: 72px 1fr;
  }
  .cart-item__img { width: 72px; height: 72px; }
  .cart-summary, .checkout-summary { padding: 1rem; }
  .auth-btn__name { display: none; }
  .auth-btn__sair { display: none; }
}
