/* =========================================
   BASE
========================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #f6f7f8;
  color: #333;
  scroll-behavior: smooth;
  font-size: 14px;
}

/* =========================================
   BOTÃO FLUTUANTE + MODAL DE COMPARTILHAMENTO
========================================= */

.share-btn {
  position: relative;
  top: 0;
  right: 0;
  margin-left: 10px;
  background: #fff;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 10000;
}

.share-btn img {
  width: 22px;
  height: 22px;
}

.share-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.25);
}

.share-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.share-modal.show {
  display: flex;
  opacity: 1;
  animation: zoomIn 0.25s ease forwards;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.share-content {
  position: relative;
  background: #fff;
  border-radius: 14px;
  padding: 8px 20px 18px;
  text-align: center;
  width: 90%;
  max-width: 360px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.close-share {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 22px;
  color: #666;
  cursor: pointer;
  transition: color 0.2s ease;
  user-select: none;
}

.close-share:hover {
  color: #e17f4a;
}

.share-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.share-icons a {
  background: #f7f7f7;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.share-icons a:hover {
  transform: scale(1.08);
  background: #fbe3d2;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.share-icons img {
  width: 22px;
  height: 22px;
}

.share-content input[type="text"] {
  width: 70%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 8px 0 0 8px;
  font-size: 14px;
  outline: none;
  color: #333;
  background-color: #fafafa;
}

.share-content button {
  background-color: #e17f4a;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 0 8px 8px 0;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

/* =========================================
   HEADER NOVO
========================================= */

.medoli-header {
  background: #F0D2C3;
  height: 90px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 9500;
}

.medoli-header-inner {
  width: 100%;
  max-width: 1050px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  margin: 0 auto;
}

.menu-hamburger {
  font-size: 28px;
  color: #2C3E50;
  background: none;
  border: none;
  cursor: pointer;
  margin-right: 8px;
}

.header-logos {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logos img.logo-symbol {
  height: 90px;
  width: 90px;
  border-radius: 0%;
}

.header-logos img.logo-text {
  height: 55px;
}

.header-search {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
}

.header-search input {
  width: 100%;
  max-width: 550px;
  border-radius: 8px;
  border: none;
  padding: 14px 45px 14px 16px;
  font-size: 16px;
  outline: none;
}

/* =========================================
   MENU LATERAL
========================================= */

.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100%;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.25);
  padding: 20px;
  z-index: 15000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.side-menu.open {
  transform: translateX(0);
}

.side-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-btn {
  font-size: 32px;
  background: none;
  border: none;
  cursor: pointer;
}

.side-links {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.side-links li a {
  display: block;
  padding: 10px 0;
  color: #333;
  text-decoration: none;
  font-size: 16px;
}

.side-links li a:hover {
  color: #e17f4a;
}

.side-socials {
  margin-top: 30px;
  display: flex;
  gap: 12px;
}

.side-socials img {
  width: 28px;
}

/* =========================================
   BARRA DE ORDENACAO (ALINHADA AO GRID)
========================================= */

.products-topbar {
  width: 100%;
  max-width: 1000px;   /* 👉 igual ao grid */
  margin: 15px auto 10px; /* 👉 centraliza */
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  font-size: 14px;
}

.products-count {
  font-weight: 600;
  color: #444;
}

.order-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.order-wrapper label {
  color: #333;
}

#orderSelect {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

/* =========================================
   GRID DE PRODUTOS
========================================= */

/* =========================================
   FILTRO — VISÍVEL SÓ NO DESKTOP
========================================= */

/* MOBILE: esconder o filtro */
@media (max-width: 768px) {
  .products-topbar {
    display: none !important;
  }
}

/* DESKTOP: mostrar o filtro */
@media (min-width: 769px) {
  .products-topbar {
    display: flex !important;
  }
}

/* Container da imagem */
.product-card .thumb {
  width: 100%;
  height: 150px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Imagem preenchendo o container */
.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* 👉 não distorce */
  background: #fff;
  transition: transform 0.25s ease;
}

/* ===============================
   DESKTOP – sem distorção
================================ */
@media (min-width: 769px) {
  .product-card .thumb img {
    object-fit: contain !important;  /* mantém proporção */
    background: transparent;         /* remove fundo branco */
  }
}

.product-grid {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
  padding: 10px 20px 0;
  box-sizing: border-box;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
}

/* Cards de produto */
.product-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #a3a3a3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
  width: 100%;
  opacity: 0;
  transform: translateY(25px);
  position: relative;
}

.product-card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.4s ease-out;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.product-card img {
  width: 100%;
  background: #fff;
  transition: transform 0.25s ease;
}

.product-card:hover img {
  transform: scale(1.03);
  filter: brightness(1.08);
}

/* FAVORITOS — 100% RESTAURADO */
.product-card.favorite-card {
  border: 2px solid #e17f4a;
  box-shadow: 0 0 14px rgba(225, 127, 74, 0.4);
  position: relative;
}

.product-card.favorite-card::before {
  content: "⭐";
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 20px;
  color: #e17f4a;
  text-shadow: 0 0 2px #fff, 1px 1px 1px #fff, -1px -1px 1px #fff;
  z-index: 10;
}

.product-card p {
  font-size: 14px;
  margin: 8px 0 12px;
  padding: 0 6px;
  color: #222;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 32px;
}

.product-card .price {
  font-size: 13px;
  font-weight: 700;
  color: #e17f4a;
  margin: -4px 0 10px;
}

.price-badge {
  position: absolute;
  top: 5px;
  left: 6px;
  background: #e17f4a;
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 3px;
  z-index: 20;

  /* 🔥 Sombra branca curta, forte e inclinada para a direita */
box-shadow: 2px 2px 0px #2C3E50;
}

/* =========================================
   PAGINAÇÃO
========================================= */

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 40px 0;
}

.page-btn {
  background: #e17f4a;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.3s ease;
}

/* =========================================
   RODAPÉ
========================================= */

.footer {
  background: #F0D2C3;
  color: #333;
  text-align: center;
  padding: 15px 0;
  font-size: 12.5px;
  margin-top: 0;
  border-top: 1px solid rgba(225, 127, 74, 0.2);
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ===============================
   DESKTOP – sem distorção
================================ */
@media (min-width: 769px) {
  .product-card .thumb img {
    object-fit: contain !important;  /* mantém proporção */
    background: transparent;         /* remove fundo branco */
  }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 768px) {

  html,
  body {
    overflow-x: hidden !important;
  }

  /* Grid de produtos */
  .product-card .thumb {
  height: 110px;   /* altura menor no mobile */
  }

  .product-card .thumb img {
  object-fit: cover !important;
  }

  .product-grid {
    width: 98%;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 15px 8px 20px;
  }

  .product-card {
    margin-bottom: 5px;
    border-radius: 6px;
  }

  .product-card img {
    height: 110px;
  }

  .product-card p {
    font-size: 12px;
    margin: 4px 0 8px;
    padding: 2px;
    line-height: 1.25;
    min-height: 20px;
  }

  .product-card .price {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .price-badge {
    font-size: 11px;
    padding: 3px 6px;
  }

  /* Botão de compartilhar menor */
  .share-btn {
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
  }

  .share-btn img,
  .share-icons img {
    width: 20px;
    height: 20px;
  }

  .share-icons a {
    width: 38px;
    height: 38px;
  }

  .share-content {
    max-width: 92%;
    padding: 12px 16px 20px;
  }

  .share-content input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 8px 0 0 8px;
    font-size: 13px;
  }

  .share-content button {
    flex-shrink: 0;
    padding: 8px 12px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
  }

  /* Header mobile */
  .mobile-header {
    background: #F0D2C3;
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    z-index: 9999;
  }

  .mobile-header-top {
    display: flex;
    justify-content: lex-start;
    align-items: center;
    width: 100%;
  }

  .mobile-header .menu-hamburger {
    font-size: 32px;
    color: #2C3E50;
    border: none;
    background: none;
    padding: 0;
  }

  .mobile-logos {
    display: flex;
    align-items: left;
    margin-left: 10px;
    gap: 6px;
    position: relative;
    left: 0;
    transform: none;
  }

  .mobile-logos .logo-text {
    height: 40px;
  }

  .share-btn-top {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    margin-left: auto;
    border: none;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 0;
  }

  .share-btn-top img {
    width: 20px;
    opacity: .8;
  }

  .mobile-search-bar {
    margin-top: 12px;
    width: 100%;
  }

  .mobile-search-bar input {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 15px 17px;
    font-size: 15px;
  }

  /* Esconde o header desktop no mobile */
  .medoli-header-inner {
    display: none !important;
  }
}

/* =========================================
   VISIBILIDADE ENTRE MOBILE E DESKTOP
========================================= */

@media (min-width: 769px) {
  .mobile-header { 
    display: none !important; 
  }
  .medoli-header { 
    display: flex !important; 
  }
}

@media (max-width: 768px) {
  .mobile-header { 
    display: flex !important; 
  }
  .medoli-header { 
    display: none !important; 
  }
}