/* ================================================
   CART ICON NO NAVBAR
================================================ */
.cart-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: #e2e8f0;
  text-decoration: none;
  flex-shrink: 0;
  border-radius: 8px;
  transition: background 0.2s;
}
.cart-icon:hover { background: rgba(255,255,255,0.08); }
.cart-icon svg { width: 22px; height: 22px; }

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #6d28d9;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #0f172a;
}

/* ================================================
   OVERLAY
================================================ */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 998;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.cart-overlay.open { display: block; }

/* navbar fica atrás e inutilizável quando carrinho abre */
body.cart-open { overflow: hidden; }
body.cart-open .site-header {
  z-index: 10 !important;
  pointer-events: none !important;
  opacity: 0.4;
  transition: opacity 0.3s;
}

/* ================================================
   DRAWER
================================================ */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -440px;
  width: 400px;
  max-width: 100vw;
  height: 100dvh;
  background: #111827;
  z-index: 999;
  transition: right 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 50px rgba(0,0,0,0.6);
  border-left: 1px solid rgba(148,163,184,0.1);
}
.cart-drawer.open { right: 0; }

.cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(148,163,184,0.1);
  flex-shrink: 0;
}
.cart-drawer__title {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}
.cart-drawer__close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(148,163,184,0.15);
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.cart-drawer__close:hover { background: rgba(255,255,255,0.12); color: #f1f5f9; }

.cart-drawer__items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overscroll-behavior: contain;
}

.cart-drawer__empty {
  text-align: center;
  color: #475569;
  padding: 4rem 1rem;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.cart-drawer__empty::before {
  content: "🛒";
  font-size: 2.5rem;
  opacity: 0.4;
}

/* ================================================
   CART ITEMS
================================================ */
.cart-item {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 0.85rem;
  border: 1px solid rgba(148,163,184,0.08);
  transition: border-color 0.2s;
}
.cart-item:hover { border-color: rgba(109,40,217,0.25); }

.cart-item__img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #1e293b;
}

.cart-item__info { flex: 1; min-width: 0; }

.cart-item__name {
  font-size: 0.85rem;
  font-weight: 500;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.15rem;
}
.cart-item__price {
  font-size: 0.82rem;
  color: #fbbf24;
  font-weight: 600;
}
.cart-item__qtd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.cart-item__qtd button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(148,163,184,0.2);
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.cart-item__qtd button:hover { background: rgba(109,40,217,0.35); border-color: #6d28d9; }
.cart-item__qtd span {
  font-size: 0.85rem;
  min-width: 22px;
  text-align: center;
  color: #f1f5f9;
  font-weight: 600;
}
.cart-item__del {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
  opacity: 0.5;
  padding: 0.25rem;
  border-radius: 6px;
  transition: all 0.2s;
}
.cart-item__del:hover { opacity: 1; background: rgba(239,68,68,0.1); }

/* ================================================
   FOOTER DO DRAWER
================================================ */
.cart-drawer__footer {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid rgba(148,163,184,0.1);
  flex-shrink: 0;
  background: #111827;
}
.cart-drawer__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.08);
}
.cart-drawer__total span:first-child { color: #94a3b8; }
.cart-drawer__total span:last-child { color: #fbbf24; font-size: 1.1rem; }

.btn--checkout {
  width: 100%;
  padding: 0.95rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  letter-spacing: -0.01em;
}
.btn--checkout:hover { opacity: 0.9; transform: translateY(-1px); }
.btn--checkout:active { transform: translateY(0); }

/* ================================================
   MOBILE — HEADER
================================================ */
@media (max-width: 768px) {
  .site-header__inner {
    padding: 0 1rem;
    height: 56px;
    min-height: 56px;
  }

  .site-header__logo-img { height: 30px !important; }
  .site-header__logo-mark { font-size: 1.1rem !important; }
  .site-header__logo-text { font-size: 0.85rem !important; }

  /* botão hamburguer */
  .site-header__toggle {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 200;
  }
  .site-header__toggle-line {
    display: block;
    width: 22px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: all 0.25s;
  }

  /* menu mobile fullscreen */
  .site-header__nav {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(10, 15, 30, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.25s !important;
    z-index: 150 !important;
  }
  .site-header__nav.is-open {
    opacity: 1 !important;
    pointer-events: all !important;
  }
  .site-header__menu {
    flex-direction: column !important;
    align-items: center !important;
    gap: 2rem !important;
    list-style: none;
    padding: 0;
    margin: 0;
  }
  .site-header__link {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em;
  }

  /* carrinho fica visível no header mobile */
  .cart-icon {
    width: 36px;
    height: 36px;
  }

  /* ================================================
     MOBILE — HERO
  ================================================ */
  .hero { min-height: auto !important; }
  .hero__content {
    flex-direction: column !important;
    padding: 5rem 1rem 3rem !important;
    gap: 2rem !important;
    align-items: stretch !important;
  }
  .hero__text { text-align: center; }
  .hero__eyebrow { font-size: 0.8rem; }
  .hero__title {
    font-size: clamp(1.5rem, 7vw, 2.2rem) !important;
    line-height: 1.2 !important;
  }
  .hero__subtitle { font-size: 0.88rem !important; }
  .hero__actions {
    flex-direction: column !important;
    gap: 0.75rem !important;
    width: 100%;
  }
  .hero__actions .btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 0.85rem !important;
    font-size: 0.95rem !important;
  }
  .hero__meta {
    justify-content: center;
    font-size: 0.8rem;
  }
  .hero__highlight { width: 100% !important; }
  .hero-card {
    padding: 1.25rem !important;
    border-radius: 16px !important;
  }
  .hero-card__title { font-size: 1.1rem !important; }
  .hero-card__price { font-size: 1.3rem !important; }

  /* ================================================
     MOBILE — SECTIONS
  ================================================ */
  .section {
    padding: 2.5rem 0 !important;
  }
  .section__header { margin-bottom: 1.5rem !important; }
  .section__title { font-size: clamp(1.3rem, 5vw, 1.8rem) !important; }
  .section__subtitle { font-size: 0.88rem !important; }

  /* ================================================
     MOBILE — GRIDS DE PRODUTOS
  ================================================ */
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  .products-page__grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
  .collections-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  /* cards menores no mobile */
  .product-card__name { font-size: 0.82rem !important; }
  .product-card__price { font-size: 0.9rem !important; }
  .product-card__body { padding: 0.6rem 0.75rem 0.75rem !important; }
  .product-card__buy,
  .product-card .btn {
    font-size: 0.78rem !important;
    padding: 0.5rem 0.5rem !important;
  }

  /* ================================================
     MOBILE — PRODUCT DETAIL
  ================================================ */
  .product-detail {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    padding: 1.5rem 0 3rem !important;
  }
  .product-detail__gallery { position: static !important; }
  .product-detail__main-img {
    border-radius: 12px !important;
    max-height: 300px !important;
    object-fit: cover !important;
    width: 100% !important;
  }
  .product-detail__thumbs {
    gap: 0.4rem !important;
  }
  .product-detail__thumb {
    width: 52px !important;
    height: 52px !important;
  }
  .product-detail__nome { font-size: 1.3rem !important; }
  .product-detail__preco { font-size: 1.5rem !important; }
  .product-detail__actions {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  .product-detail__actions .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.85rem !important;
  }

  /* ================================================
     MOBILE — ABOUT
  ================================================ */
  .about {
    flex-direction: column !important;
    gap: 1.5rem !important;
    text-align: center;
  }
  .about__image-wrapper {
    width: 100% !important;
    max-width: 280px !important;
    margin: 0 auto !important;
  }

  /* ================================================
     MOBILE — NEWSLETTER
  ================================================ */
  .newsletter {
    flex-direction: column !important;
    gap: 2rem !important;
  }
  .newsletter__form {
    flex-direction: column !important;
  }
  .newsletter__input,
  .newsletter__submit,
  .newsletter-strip__input,
  .newsletter-strip__submit {
    width: 100% !important;
  }
  .newsletter-strip__inner {
    flex-direction: column !important;
    gap: 1.5rem !important;
    text-align: center;
  }

  /* ================================================
     MOBILE — FOOTER
  ================================================ */
  .site-footer__inner {
    flex-direction: column !important;
    gap: 2rem !important;
    padding: 2rem 1rem !important;
  }
  .site-footer__info {
    flex-direction: column !important;
    gap: 1.5rem !important;
  }
  .site-footer__bottom-inner {
    flex-direction: column !important;
    gap: 0.5rem !important;
    text-align: center !important;
  }

  /* ================================================
     MOBILE — SEARCH BAR
  ================================================ */
  .products-page__header .container { padding: 0 1rem !important; }
  .search-bar-wrapper { margin-top: 1rem !important; }
  .search-bar__input {
    font-size: 1rem !important;
    padding: 0.8rem 1rem !important;
  }
  .products-page__heading {
    flex-direction: column !important;
    gap: 0.75rem !important;
    align-items: flex-start !important;
  }
  .products-page__title { font-size: 1.5rem !important; }

  /* ================================================
     MOBILE — BREADCRUMB
  ================================================ */
  .breadcrumb__list { font-size: 0.8rem; }

  /* ================================================
     MOBILE — CARRINHO
  ================================================ */
  .cart-drawer {
    width: 100vw !important;
    border-left: none !important;
  }
  .cart-drawer__header { padding: 1rem 1.25rem; }
  .cart-drawer__items { padding: 0.75rem 1rem; }
  .cart-drawer__footer { padding: 0.75rem 1rem 2rem; }
}

/* ================================================
   MOBILE PEQUENO (< 400px)
================================================ */
@media (max-width: 400px) {
  .products-grid,
  .products-page__grid,
  .collections-grid {
    grid-template-columns: 1fr !important;
  }

  .hero__title { font-size: 1.4rem !important; }

  .collections-header__title { font-size: 1.3rem !important; }
}

/* ================================================
   TABLET (769px — 1024px)
================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .products-page__grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .collections-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .hero__content {
    gap: 2rem !important;
  }
}