* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* PALETA – estética de perfumaria */
:root {
  --primary-color: #C6426E;
  /* rose wine */
  --accent-color: #7A1E57;
  /* ameixa */
  --secondary-color: #1F2232;
  /* grafite elegante */
  --text-color: #2C2C35;
  --linght-gray: #F7F7FA;
  --border-color: #E9E8EF;
  --success-color: #2ecc71;
  --error-color: #e74c3c;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  background: var(--linght-gray);
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

/* HEADER */
header {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 990;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .05);
}

.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
}

.logo i {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.logo h1 {
  font-size: 1.6rem;
  color: var(--primary-color);
  font-weight: 800;
  letter-spacing: .3px;
}

.search-container {
  width: 100%;
  max-width: 520px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: .55rem .9rem;
  order: 3;
  flex-basis: 100%;
}

.search-container input {
  width: 100%;
  border: none;
  background: none;
  outline: none;
  padding: .35rem .25rem;
  font-size: 1rem;
}

.search-container i {
  color: var(--primary-color);
  cursor: pointer;
}

/* CATEGORIAS */
.categories-container {
  background: var(--secondary-color);
  display: flex;
  overflow-x: auto;
}

.categories-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: .6rem 1rem;
  gap: .5rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.category-btn {
  display: flex;
  gap: .5rem;
  align-items: center;
  border: 1px solid transparent;
  color: #fff;
  border-radius: 999px;
  padding: .5rem 1rem;
  cursor: pointer;
  background: none;
  white-space: nowrap;
  font-size: .92rem;
  transition: .2s ease;
}

.category-btn i {
  font-size: .95rem;
}

.category-btn:hover {
  border-color: rgba(255, 255, 255, .25);
}

.category-btn.active {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

/* HERO */
.hero-section {
  position: relative;
  color: #fff;
  text-align: center;
  padding: 2.4rem 1rem;
  background:
    radial-gradient(1200px 500px at 80% -20%, rgba(255, 255, 255, .15), transparent 40%),
    linear-gradient(160deg, #ff6f91 0%, #9b287b 50%, #3a2b5f 100%);
}

.hero-inner {
  max-width: 980px;
  margin: 0 auto;
}

.hero-section h2 {
  font-size: 2.1rem;
  margin-bottom: .45rem;
  font-weight: 800;
}

.hero-section p {
  font-size: 1.08rem;
  opacity: .95;
}

.hero-tags {
  margin-top: 1rem;
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-tags span {
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .25);
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .9rem;
}

/* FOOTER */
footer {
  background: var(--secondary-color);
  color: #fff;
  text-align: center;
  padding: 2rem;
}

.FooterLink {
  text-decoration-line: none;
  color: white;
  font-weight: 500;
}

/* LISTAGEM DE PRODUTOS */
.products {
  width: 100%;
  max-width: 1200px;
  padding: 1rem;
  margin: 0 auto;
}

.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.product-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: .3s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, .05);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}

.product-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.product-info {
  padding: 1rem;
}

.product-name {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: .35rem;
  color: var(--text-color);
}

.product-description {
  font-size: .92rem;
  margin-bottom: 1rem;
  color: #6c6f78;
}

.product-price {
  font-size: 1.35rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 800;
}

.product-button {
  width: 100%;
  border: none;
  padding: .75rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: .5rem;
  color: #fff;
  cursor: pointer;
  transition: .25s;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}

.product-button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* CARRINHO */
.cart-icon {
  position: relative;
  cursor: pointer;
  padding: .5rem;
  order: 2;
}

.cart-icon i {
  font-size: 1.8rem;
  color: var(--secondary-color);
}

.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--primary-color);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: .8rem;
  font-weight: 800;
  transform: translate(25%, -25%);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}

.cart-overlay.show {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 15px rgba(0, 0, 0, .1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.25, .46, .45, .94);
}

.cart-sidebar.show {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.cart-header h3 {
  font-size: 1.4rem;
  color: var(--secondary-color);
}

.close-cart-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-color);
}

.cart-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex-shrink: 1;
}

.cart-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--linght-gray);
  overflow-y: auto;
  flex-grow: 1;
}

.finish-order-btn-container {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: #fff;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, .05);
}

/* scrollbars */
.cart-body::-webkit-scrollbar,
.cart-footer::-webkit-scrollbar {
  width: 6px;
}

.cart-body::-webkit-scrollbar-track,
.cart-footer::-webkit-scrollbar-track {
  background: var(--linght-gray);
}

.cart-body::-webkit-scrollbar-thumb,
.cart-footer::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
  border: 2px solid var(--linght-gray);
}

.cart-empty {
  text-align: center;
  padding-top: 4rem;
  color: #999;
}

.cart-empty i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--border-color);
}

.cart-empty p {
  font-size: 1.2rem;
  font-weight: 600;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cart-item-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: .5rem;
  border: 1px solid var(--border-color);
}

.cart-item-info {
  flex-grow: 1;
}

.cart-item-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .25rem;
}

.cart-item-price {
  font-size: .95rem;
  color: var(--primary-color);
  font-weight: 800;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
}

.quantity-btn {
  background: var(--linght-gray);
  border: 1px solid var(--border-color);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 800;
  transition: background .2s;
}

.quantity-btn:hover {
  background: #e9e9f0;
}

.remove-item-btn {
  background: none;
  border: none;
  color: #f44336;
  font-size: 1.8rem;
  cursor: pointer;
  margin-left: auto;
  transition: color .2s;
}

.remove-item-btn:hover {
  color: #c23126;
}

.product-image-fly {
  position: fixed;
  z-index: 1001;
  border-radius: 50%;
  transition: all .7s cubic-bezier(.55, .055, .675, .19);
  object-fit: cover;
}

/* ENTREGA/RETIRADA E FORM */
.options-toggle {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.2rem;
}

.delivery-btn {
  flex: 1;
  padding: .75rem;
  border: none;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-color);
  transition: background .3s;
}

.delivery-btn.active {
  background: var(--secondary-color);
  color: #fff;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: .5rem;
  font-weight: 700;
  font-size: .9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .75rem;
  border: 1px solid var(--border-color);
  border-radius: .5rem;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(198, 66, 110, .15);
  outline: none;
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
  border-color: var(--error-color) !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, .2) !important;
}

.form-group input:read-only {
  background: #eee;
  cursor: not-allowed;
  opacity: .85;
}

.payment-options-container {
  border-top: 1px solid var(--border-color);
  margin-top: 1.2rem;
  padding-top: 1.2rem;
}

.payment-options-container h4 {
  font-size: 1rem;
  margin: 0 0 1rem;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  border: 1px solid var(--border-color);
  border-radius: .5rem;
  margin-bottom: .5rem;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.payment-option:hover {
  background: #fff;
}

.payment-option input[type="radio"] {
  width: auto;
}

.payment-option.selected {
  border-color: var(--primary-color);
  background: #fff3f7;
}

#troco-container {
  display: none;
  margin-top: 1rem;
  padding: 1rem;
  background: #fff;
  border-radius: .5rem;
  border: 1px solid var(--border-color);
}

.delivery-fee-notice {
  font-size: .8rem;
  text-align: center;
  color: #777;
  background: #fff;
  padding: .5rem;
  border-radius: .5rem;
  margin: 1.2rem 0;
}

.date-time-row {
  display: flex;
  gap: 1rem;
}

.cart-summary {
  margin: 1.2rem 0;
  border-top: 1px solid var(--border-color);
  padding-top: 1.2rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: .5rem;
  font-size: 1rem;
}

.summary-line.total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-top: 1rem;
}

.coupon-container {
  display: flex;
  gap: .5rem;
  margin-bottom: .5rem;
}

#coupon-input {
  flex-grow: 1;
  border: 1px solid var(--border-color);
  border-radius: .5rem;
  padding: .75rem;
  font-size: 1rem;
}

#apply-coupon-btn {
  border: none;
  background: var(--secondary-color);
  color: #fff;
  padding: 0 1.5rem;
  border-radius: .5rem;
  cursor: pointer;
  font-weight: 800;
  transition: background .2s;
}

#apply-coupon-btn:hover {
  background: #2b2f43;
}

.coupon-feedback {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 1rem;
  height: 1em;
}

.coupon-feedback.success {
  color: var(--success-color);
}

.coupon-feedback.error {
  color: var(--error-color);
}

.summary-line.discount-line {
  color: var(--success-color);
  font-weight: 800;
}

.finish-order-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border: none;
  border-radius: .6rem;
  cursor: pointer;
  transition: transform .15s;
}

.finish-order-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.finish-order-btn:disabled {
  background: #cfcfde;
  cursor: not-allowed;
}

.finish-order-btn .fa-whatsapp {
  margin-right: .5rem;
}

/* BANNER "VER CARRINHO" */
.view-cart-banner {
  position: fixed;
  bottom: -100px;
  left: 0;
  width: 100%;
  background: var(--secondary-color);
  color: #fff;
  z-index: 980;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .2);
  transition: bottom .4s ease-in-out;
}

.view-cart-banner.show {
  bottom: 0;
}

.view-cart-banner p {
  margin: 0;
  font-weight: 800;
}

.view-cart-banner-btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: .75rem 1.5rem;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}



/* RESPONSIVO */
@media (min-width:768px) {
  .search-container {
    order: 2;
    flex-basis: auto;
    width: auto;
  }

  .cart-icon {
    order: 3;
  }

  .categories-bar {
    justify-content: center;
  }

  .category-btn {
    padding: .75rem 1.25rem;
    font-size: 1rem;
  }

  .products {
    padding: 2rem;
  }

  .products-container {
    gap: 2rem;
  }

  .product-img {
    height: 250px;
  }

  .product-info {
    padding: 1.35rem;
  }

  .product-name {
    font-size: 1.18rem;
  }

  .hero-section {
    padding: 3rem 2rem;
  }

  .hero-section h2 {
    font-size: 2.5rem;
  }
}

/* Oculta o banner em telas maiores */
@media (min-width:769px) {
  .view-cart-banner {
    display: none;
  }
}

/* =========================
   OVERLAY
========================= */

.product-overlay {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100vh;

    background: rgba(0, 0, 0, 0.72);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;
    box-sizing: border-box;

    z-index: 9999;

    /* Escondido inicialmente */
    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


/* Modal aberto */

.product-overlay.active {
    opacity: 1;
    visibility: visible;
}


/* =========================
   MODAL
========================= */

.product-modal {
    position: relative;

    width: 100%;
    max-width: 1050px;
    min-height: 580px;

    background: #ffffff;

    display: flex;

    overflow: hidden;

    border-radius: 4px;

    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);

    /* Pequeno movimento junto com o fade */
    transform: translateY(15px);

    transition: transform 0.3s ease;
}


/* Modal quando aberto */

.product-overlay.active .product-modal {
    transform: translateY(0);
}


/* =========================
   BOTÃO FECHAR
========================= */

.product-modal-close {
  position: absolute;

  top: 18px;
  right: 20px;

  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  background: rgba(255, 255, 255, 0.9);

  border-radius: 50%;

  font-size: 28px;
  font-weight: 300;

  color: #222;

  cursor: pointer;

  z-index: 10;

  transition: 0.2s ease;
}

.product-modal-close:hover {
  background: #111;
  color: #fff;
}


/* =========================
   LADO ESQUERDO
========================= */

.product-modal-info {
  width: 50%;

  padding: 70px 60px;

  display: flex;
  flex-direction: column;
  justify-content: center;

  box-sizing: border-box;
}


/* Categoria */

.product-category {
  display: block;

  margin-bottom: 18px;

  font-size: 12px;
  font-weight: 600;

  letter-spacing: 2px;

  color: #8a8a8a;
}


/* Título */

.product-title {
  margin: 0 0 25px;

  font-family: Georgia, "Times New Roman", serif;

  font-size: 42px;
  line-height: 1.1;

  font-weight: 400;

  color: #171717;
}


/* Preço */

.product-price {
  margin-bottom: 6px;

  font-size: 28px;
  font-weight: 600;

  color: #171717;
}


/* Parcelamento */

.product-installment {
  margin-bottom: 30px;

  font-size: 14px;

  color: #777;
}

.product-installment strong {
  color: #333;
}


/* Descrição */

.product-description {
  max-width: 470px;

  margin: 0 0 35px;

  font-size: 15px;
  line-height: 1.8;

  color: #666;
}


/* Botão */

.product-buy-button {
  width: fit-content;

  padding: 15px 35px;

  border: none;

  background: #171717;
  color: #ffffff;

  font-size: 13px;
  font-weight: 600;

  letter-spacing: 1px;

  text-transform: uppercase;

  cursor: pointer;

  transition: 0.25s ease;
}

.product-buy-button:hover {
  background: #333;
  transform: translateY(-2px);
}


/* =========================
   LADO DIREITO / IMAGEM
========================= */

.product-modal-image {
  width: 50%;

  background: #f5f3f0;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 50px;

  box-sizing: border-box;
}

.product-modal-image img {
  width: 100%;
  height: 100%;

  max-width: 430px;
  max-height: 500px;

  object-fit: contain;

  display: block;
}


/* =========================
   RESPONSIVO
========================= */

@media (max-width: 800px) {

  .product-overlay {
    padding: 20px;
  }

  .product-modal {
    max-height: 90vh;

    overflow-y: auto;

    flex-direction: column;
  }

  .product-modal-info {
    width: 100%;

    padding: 60px 35px 40px;

    order: 2;
  }

  .product-modal-image {
    width: 100%;
    height: 320px;

    padding: 30px;

    order: 1;
  }

  .product-modal-image img {
    max-height: 270px;
  }

  .product-title {
    font-size: 32px;
  }

  .product-description {
    max-width: none;
  }
}


@media (max-width: 480px) {

  .product-overlay {
    padding: 10px;
  }

  .product-modal {
    max-height: 94vh;

    border-radius: 3px;
  }

  .product-modal-image {
    height: 260px;

    padding: 20px;
  }

  .product-modal-image img {
    max-height: 220px;
  }

  .product-modal-info {
    padding: 40px 25px 30px;
  }

  .product-title {
    font-size: 28px;
  }

  .product-price {
    font-size: 25px;
  }

  .product-description {
    font-size: 14px;
    line-height: 1.7;
  }

  .product-buy-button {
    width: 100%;
  }

  .product-modal-close {
    top: 12px;
    right: 12px;

    width: 36px;
    height: 36px;

    font-size: 24px;
  }
}