/* ======================= VARIÁVEIS ======================= */
:root {
  --bg: #fdf8f5;
  --text: #333;
  --primary: #eec6ba;
  --secondary: #d49a89;
  --accent: #e2b3a3;
  --radius: 12px;
  --max-w: 1200px;
  --muted: #bfbfbf;
  --card-bg: rgba(255, 255, 255, 0.03);
  --glass: rgba(255, 255, 255, 0.04);
  --radius: 12px;
  --max-w: 1200px;
}

/* ======================= RESET ======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
}

/* ======================= WRAP ======================= */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px;
}

/* ======================= HEADER ======================= */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(
    180deg,
    rgba(184, 125, 107, 0) 0%,
    rgba(226, 179, 163, 0) 30%
  );
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--primary);
  padding: 5px 0;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo-mark {
  width: 130px;
  margin-top: -4rem;
  margin-bottom: -2rem;
  height: 130px;
  display: flex;
  z-index: -1;
  align-items: center;
  justify-content: center;
}

.search-bar {
  position: relative;
  flex: 1;
  max-width: 400px;
  margin-bottom: 50px;
}

.search-bar input {
  width: 100%;
  padding: 10px 45px 10px 15px;
  border-radius: 10px;
  border: 1px solid var(--primary);
  background: var(--black);
  color: var(--white);
}

.search-bar .lupa {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.cart-header {
  height: 40px;
  background-color: #1f1f1f00;
  margin-right: -5px;
}

.cart-btn {
  background: #19181800;
  color: var(--gold);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.cart-header:hover {
  box-shadow: var(--primary) 1px 1px 5px;
  padding: 5px;
}

.seu-carrinho {
  text-align: center;
  margin-top: -20px;
}

/* ======================= HERO ======================= */
.hero {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 30px;
  align-items: center;
  margin-right: 0;
  padding: 48px 0;
  background-color: var(--accent);
  border-radius: var(--radius);
}

.hero-left .kicker {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  margin-left: 5px;
  background: var(--secondary);
  color: var(--bg);
  font-weight: 700;
  font-size: 13px;
}

.hero-left h2 {
  font-family: "Playfair Display", serif;
  font-size: 46px;
  margin: 20px 0 12px;
  margin-left: 10px;
}

.hero-left p {
  color: var(--text);
  margin-bottom: 20px;
  margin-left: 10px;
}

.hero-right {
  background-image: url("/assets/freepik__upload__13405.png");
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  min-height: 300px;
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.hero-right .badge {
  position: absolute;
  left: 16px;
  top: 16px;
  background: rgba(75, 70, 70, 0.623);
  padding: 9px 10px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--bg);
}

.img-destaque {
  border: solid 5px #444;
  box-shadow: #19181886 1px 1px 5px;
  width: 450px;
  height: 350px;
  border-radius: 10px;
}

/* ======================= CATEGORIAS ======================= */
.categories {
  margin-top: -80px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  overflow-x: auto;
  padding-bottom: 10px;
}

.categories button {
  flex-shrink: 0;
  padding: 8px 18px;
  border: 1px solid var(--primary);
  background: var(--bg);
  color: var(--gold);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 300;
  transition: 0.3s;
}

.categories button:hover,
.categories button.active {
  background: var(--secondary);
  color: var(--text);
}

.promo-bar {
  background: #000;
  color: #fff;
  padding: 10px 0;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.promo-text {
  display: inline-block;
  padding-left: 100%;
  width: max-content;
  animation: scroll-left 160s linear infinite;
  font-size: 16px;
  font-family: "poppins";
  font-weight: 600;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* ======================= GRID DE PRODUTOS ======================= */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.product-card {
  background: var(--card-bg);
  padding: 15px;
  border: var(--primary) 1px solid;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(244, 211, 66, 0.2);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: pointer;
}

.product-card h3 {
  margin-top: 10px;
  font-size: 1.5rem;
  font-weight: 400;
  font-family: "playfair display", serif;
}

.product-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.product-card strong {
  color: var(--gold);
  font-size: 1.1rem;
  margin: 5px 0;
}

.product-card button {
  background: var(--primary);
  color: var(--black);
  border: var(--text) 1px solid;
  padding: 10px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  transition: 0.2s;
}

.product-card button:hover {
  background: var(--accent);
}

/* ======================= TOAST ======================= */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(-10px);
  pointer-events: auto;
}

/* ======================= MODAL CARRINHO ======================= */
.cart-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  max-height: 600px;
  background: #d49a89ec;
  backdrop-filter: blur(5px);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px;
  display: none;
  flex-direction: column;
  gap: 15px;
  z-index: 1000;
}

.cart-modal.active {
  display: flex;
}

.close-cart {
  align-self: flex-end;
  background: #19181800;
  border: none;
  color: var(--gold);
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
}

.cart-items {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #444;
  padding-bottom: 5px;
}

.cart-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
}

.item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #000000;
}

.item-name {
  font-weight: bold;
  color: var(--text);
}

.item-quantity {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
}

.item-quantity button {
  padding: 2px 6px;
  border: none;
  border-radius: 3px;
  background: var(--primary);
  color: var(--text);
  cursor: pointer;
}

.item-price {
  font-weight: bold;
  color: var(--text);
}

.cart-summary {
  text-align: right;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text);
}

.cart-payment {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-payment input[type="text"],
.cart-payment select {
  width: 100%;
  padding: 8px;
  border-radius: 5px;
  border: 1px solid var(--text);
  background: var(--primary);
  color: #fff;
}

.finalize-btn {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: var(--radius);
  background-color: var(--accent);
  color: var(--text);
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.2s;
}

.finalize-btn:hover {
  background: var(--secondary);
}

footer {
  background-color: var(--text);
  color: #fff9f969;
  text-align: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* ======================= RESPONSIVO ======================= */
@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-right {
    margin-top: 20px;
  }

  .img-destaque {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 560px) {
  .header-top {
    flex-direction: row; /* mantém em linha */
    justify-content: space-between; /* carrinho à esquerda, logo centralizado, hamburger à direita */
    align-items: center;
    padding: 0 10px;
  }

  .logo {
    order: 2; /* logo no centro */
    flex: 1;
    text-align: center;
    margin-top: -2rem;
  }

  .cart-btn {
    order: 1; /* carrinho à esquerda */
    margin-top: 0;
    margin-right: -20rem;
  }

  /* Se for colocar hamburger futuramente */
  .hamburger-btn {
    order: 3; /* canto direito */
    display: flex;
  }

  .search-bar {
    order: 4; /* abaixo */
    width: 100%;
    margin-top: 10px;
    margin-bottom: 70px;
  }
}

@media (max-width: 768px) {
  .cart-modal {
    width: 95%;
    padding: 15px;
  }

  .cart-item img {
    width: 40px;
    height: 40px;
  }

  .item-quantity button {
    padding: 2px 5px;
  }
}

@media (max-width: 560px) {
  .header-top {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .search-bar input {
    width: 100%;
    margin-top: 10px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .categories {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .categories button {
    flex-shrink: 0;
  }
}

/* Para telas menores que 768px, dois produtos por linha */
@media (max-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

/* Para telas bem pequenas (até 480px), um produto por linha */
@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
