/**
 * ============================================
 * ESTILOS DA PÁGINA LISTA DE PRESENTES
 * Página com hero, grid de presentes e checkout
 * ============================================
 */

:root {
  --font-elegant: "Great Vibes", "Dancing Script", "Sacramento", cursive;
  --font-title: "Cormorant Garamond", serif;
  --font-body: "Montserrat", sans-serif;
  --primary-color: #111111;
  --primary-hover: #2a2a2a;
  --secondary-color: #ffffff;
  --accent-color: #ffffff;
  --text-dark: #111111;
  --text-light: #5f5f5f;
  --bg-light: #ffffff;
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.08);
  --watercolor-green: #2a2a2a;
  --watercolor-beige: #ffffff;
  --watercolor-sage: #f2f2f2;
  --border-color: rgba(0, 0, 0, 0.12);
  --card-radius: 14px;

  /* Bloco PIX (referência elegante azul + dourado) */
  --pix-navy: #243d5c;
  --pix-gold: #a88958;
  --pix-card-border: rgba(36, 61, 92, 0.12);
}

/* ============================================
   PIX — PRESENTE COM CARINHO
   ============================================ */
.pix-gift-section {
  padding: clamp(5rem, 18vh, 9rem) 20px clamp(2.5rem, 6vw, 4rem);
  /* Mesmo “chão” da área dos cards (.gifts-section) */
  background: linear-gradient(
    180deg,
    #faf8f4 0%,
    var(--bg-light) 18%,
    var(--bg-light) 100%
  );
}

.pix-gift-wrap {
  max-width: 560px;
  margin: 0 auto;
}

.pix-gift-intro {
  text-align: center;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.pix-gift-script-title {
  font-family: "Great Vibes", "La Belle Aurore", cursive;
  font-size: clamp(2.75rem, 9vw, 3.85rem);
  font-weight: 400;
  color: var(--pix-navy);
  margin: 0 0 0.65rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.pix-gift-script-title--visual {
  font-size: 0;
  line-height: 0;
  letter-spacing: 0;
}

.pix-gift-title-img {
  display: block;
  width: min(100%, 560px);
  height: auto;
  margin: 0 auto;
}

.pix-gift-couple-line {
  font-family: var(--font-body);
  font-size: clamp(0.68rem, 2vw, 0.78rem);
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--pix-gold);
  margin: 0;
}

.pix-gift-card {
  background: #ffffff;
  border: 1px solid var(--pix-card-border);
  border-radius: 2px;
  padding: clamp(2rem, 5vw, 2.75rem) clamp(1.5rem, 5vw, 2.25rem)
    clamp(1.75rem, 4vw, 2.25rem);
  text-align: center;
  box-shadow: 0 12px 40px rgba(36, 61, 92, 0.06);
}

.pix-gift-message {
  font-family: "Playfair Display", "Cormorant Garamond", serif;
  font-size: clamp(0.72rem, 2.1vw, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.85;
  text-transform: uppercase;
  color: var(--pix-navy);
  margin: 0 auto 1.35rem;
  max-width: 42ch;
}

.pix-gift-heart {
  color: var(--pix-navy);
  margin-bottom: 1.35rem;
  display: flex;
  justify-content: center;
}

.pix-gift-qr-frame {
  margin: 0 auto 1.35rem;
  padding: 12px;
  display: inline-block;
  border: 1px solid rgba(36, 61, 92, 0.18);
  background: #fff;
}

.pix-gift-qr {
  display: block;
  width: min(200px, 72vw);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}

.pix-gift-label {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--pix-gold);
  margin: 0 0 0.45rem;
}

.pix-gift-key {
  font-family: "Playfair Display", "Cormorant Garamond", serif;
  font-size: clamp(0.92rem, 2.6vw, 1.05rem);
  color: var(--pix-navy);
  margin: 0 0 0.85rem;
  word-break: break-word;
  line-height: 1.45;
}

.pix-gift-copy {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--pix-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.pix-gift-copy:hover {
  color: #8f7346;
}

.pix-gift-copy:disabled {
  opacity: 0.65;
  cursor: default;
}

.pix-gift-brand {
  margin-top: clamp(1.75rem, 4vw, 2.25rem);
  padding-top: 1.35rem;
  border-top: 1px solid rgba(36, 61, 92, 0.08);
}

.pix-gift-brand-logo {
  display: block;
  margin: 0 auto 0.65rem;
  max-height: 56px;
  width: auto;
  object-fit: contain;
}

.pix-gift-brand-names {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--pix-navy);
  margin: 0;
  opacity: 0.85;
}

/* ============================================
   GIFTS SECTION
   Seção com grid de presentes
   ============================================ */
.gifts-section {
  padding: clamp(36px, 7vw, 56px) 20px 120px;
  background: linear-gradient(
    180deg,
    #faf8f4 0%,
    var(--bg-light) 18%,
    var(--bg-light) 100%
  );
}

.gifts-intro {
  text-align: center;
  padding-top: clamp(2rem, 8vh, 4rem);
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--font-title);
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 400;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-dark);
  margin: 0 0 1rem;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  text-align: center;
  color: var(--text-light);
  margin: 0 auto 0;
  max-width: 520px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.65;
}

.gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  max-width: 1320px;
  margin: 0 auto;
}

/* ============================================
   GIFT CARD
   Card individual de cada presente
   ============================================ */
.gift-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--card-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.gift-image {
  width: 100%;
  height: 360px;
  object-fit: cover;
  background: linear-gradient(145deg, #f0ebe3 0%, #e8e4dc 100%);
  display: block;
}

.gift-info {
  padding: 1.35rem 1.35rem 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.gift-name {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.35;
  text-align: center;
  text-wrap: balance;
  width: 100%;
  align-self: stretch;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gift-price {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
  text-align: center;
  width: 100%;
}

.btn-gift {
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  width: 100%;
  max-width: 100%;
  margin-top: auto;
  text-align: center;
}

.btn-gift:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 3px;
}

.btn-gift:disabled {
  background: #c5c5c5;
  cursor: not-allowed;
}

/* ============================================
   LOAD MORE BUTTON
   Botão para carregar mais presentes
   ============================================ */
.load-more-container {
  text-align: center;
  margin-top: 50px;
}

.btn-load-more {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 0;
  padding: 15px 40px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-load-more:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.18);
}

.load-more-container.hidden {
  display: none;
}

/* ============================================
   CART BUTTON (FIXED)
   Botão flutuante do carrinho
   ============================================ */
.cart-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  }
  50% {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
  }
  100% {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  }
}

.cart-button:hover {
  transform: scale(1.1) rotate(5deg);
  background: var(--primary-hover);
  color: #ffffff;
  animation: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #d32f2f;
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid white;
}

/* ============================================
   CART SIDEBAR
   Sidebar lateral com resumo do carrinho
   ============================================ */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100vh;
  background: var(--bg-light);
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 1100;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  right: 0;
}

/* Header do carrinho */
.cart-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-light);
}

.cart-header h3 {
  font-family: var(--font-elegant);
  font-size: 2rem;
  font-weight: 400;
  color: var(--text-dark);
  margin: 0;
}

.cart-close {
  background: none;
  border: none;
  font-size: 2.2rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.cart-close:hover {
  background: #f0f0f0;
  color: #d32f2f;
  transform: rotate(90deg);
}

/* Conteúdo do carrinho */
.cart-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 25px;
  background: var(--bg-light);
}

.cart-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
}

.cart-empty svg {
  margin-bottom: 20px;
  opacity: 0.3;
  width: 80px;
  height: 80px;
}

.cart-empty p {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: #999;
}

/* Items do carrinho */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease;
}

.cart-item:hover {
  transform: translateX(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 0;
  background: white;
  border: 1px solid var(--border-color);
}

.cart-item-info {
  flex-grow: 1;
  min-width: 0; /* Para evitar overflow */
}

.cart-item-name {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cart-item-price {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
}

.cart-item-remove {
  background: none;
  border: none;
  color: #d32f2f;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0 8px;
  transition: all 0.2s ease;
  align-self: center;
  line-height: 1;
}

.cart-item-remove:hover {
  transform: scale(1.2);
  color: #b71c1c;
}

/* Footer do carrinho */
.cart-footer {
  padding: 20px 25px;
  border-top: 2px solid var(--primary-color);
  background: white;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.03);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-dark);
}

.cart-total-value {
  color: var(--primary-color);
  font-size: 1.6rem;
  font-family: var(--font-title);
  font-weight: 600;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Botões do carrinho */
.btn-primary,
.btn-secondary {
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: "→";
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  transition: right 0.3s ease;
  opacity: 0;
}

.btn-primary:hover,
.cart-footer .btn-primary:hover,
.checkout-form .btn-primary:hover,
.checkout-form #submitBtn.btn-primary:hover {
  background: var(--primary-hover);
  background-color: var(--primary-hover);
  color: #ffffff;
  border-color: var(--primary-hover);
  padding-right: 40px;
}

.btn-primary:hover::after {
  right: 20px;
  opacity: 1;
  color: #ffffff;
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover,
.cart-footer .btn-secondary:hover {
  background: var(--primary-hover);
  background-color: var(--primary-hover);
  color: #ffffff;
  border-color: var(--primary-hover);
}

/* Checkout: garante contraste sobre Bootstrap/global.css */
.checkout-form #submitBtn,
.checkout-form #submitBtn span {
  color: #ffffff;
}

.checkout-form #submitBtn:hover,
.checkout-form #submitBtn:hover span {
  color: #ffffff;
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-large {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
}

/* ============================================
   CHECKOUT MODAL
   Modal de finalização da compra
   ============================================ */
.checkout-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(5px);
}

.checkout-modal.open {
  display: flex;
}

.checkout-content {
  background: white;
  border-radius: 0;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.checkout-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2.2rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
  z-index: 10;
}

.checkout-close:hover {
  background: #f0f0f0;
  color: #d32f2f;
  transform: rotate(90deg);
}

.checkout-title {
  font-family: var(--font-elegant);
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 30px;
  text-align: center;
  line-height: 1.2;
}

/* Resumo do pedido */
.checkout-summary {
  background: var(--bg-light);
  padding: 25px;
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
  border-radius: 0;
}

.checkout-summary h3 {
  font-family: var(--font-elegant);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  gap: 1rem;
}

.checkout-item > span:first-of-type {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.checkout-item:last-child {
  border-bottom: none;
}

.checkout-total {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  margin-top: 15px;
  border-top: 2px solid var(--primary-color);
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 600;
}

.checkout-total span:last-child {
  color: var(--primary-color);
  font-size: 1.8rem;
  font-family: var(--font-title);
}

/* ============================================
   CHECKOUT FORM
   Formulário de dados do comprador
   ============================================ */
.checkout-form h3 {
  font-family: var(--font-elegant);
  font-size: 2rem;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 25px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #ddd;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #fcfcfc;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
  background: white;
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* ============================================
   RESPONSIVIDADE COMPLETA
   Ajustes para todos os dispositivos
   ============================================ */

/* Tablets e telas médias */
@media (max-width: 1024px) {
  .gifts-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .gift-image {
    height: 340px;
  }

  .section-title {
    font-size: 2.65rem;
  }
}

/* Tablets pequenos e celulares grandes */
@media (max-width: 768px) {
  /* Grid de presentes */
  .gifts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .gifts-section {
    padding: 60px 15px 100px;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .section-subtitle {
    font-size: 1rem;
    padding: 0 15px;
  }

  .gifts-intro {
    margin-bottom: 2.25rem;
  }

  .gift-image {
    height: 320px;
  }

  .gift-name {
    font-size: 1.3rem;
  }

  .gift-price {
    font-size: 1.2rem;
  }

  /* Carrinho sidebar */
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .cart-header {
    padding: 15px 20px;
  }

  .cart-header h3 {
    font-size: 1.8rem;
  }

  .cart-content {
    padding: 20px;
  }

  .cart-footer {
    padding: 15px 20px;
  }

  .cart-total {
    font-size: 1.1rem;
  }

  .cart-total-value {
    font-size: 1.4rem;
  }

  /* Botões do carrinho */
  .btn-primary,
  .btn-secondary {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  /* Checkout modal */
  .checkout-content {
    padding: 30px 25px;
  }

  .checkout-title {
    font-size: 2.2rem;
  }

  .checkout-summary {
    padding: 20px;
  }

  .checkout-summary h3 {
    font-size: 1.6rem;
  }

  .checkout-total {
    font-size: 1.2rem;
  }

  .checkout-total span:last-child {
    font-size: 1.5rem;
  }

  /* Botão flutuante */
  .cart-button {
    width: 55px;
    height: 55px;
    bottom: 20px;
    right: 20px;
  }

  .cart-count {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }
}

/* Celulares pequenos */
@media (max-width: 576px) {
  /* Grid - 1 coluna em telas muito pequenas */
  .gifts-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .gifts-section {
    padding: 50px 15px 80px;
  }

  .section-title {
    font-size: 1.9rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
  }

  .gifts-intro {
    padding-top: clamp(3.5rem, 18vh, 6rem);
    margin-bottom: 2rem;
  }

  .gift-image {
    height: 360px;
  }

  .gift-card {
    margin-bottom: 5px;
  }

  .gift-info {
    padding: 18px;
  }

  .gift-name {
    font-size: 1.2rem;
  }

  .gift-price {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }

  .btn-gift {
    padding: 12px 20px;
    font-size: 0.8rem;
  }

  /* Botão load more */
  .btn-load-more {
    padding: 12px 30px;
    font-size: 0.85rem;
  }

  /* Itens do carrinho */
  .cart-item {
    padding: 12px;
  }

  .cart-item-image {
    width: 70px;
    height: 70px;
  }

  .cart-item-name {
    font-size: 1rem;
    white-space: normal; /* Permite quebra de linha */
    line-height: 1.3;
  }

  .cart-item-price {
    font-size: 0.95rem;
  }

  .cart-item-remove {
    font-size: 1.3rem;
    padding: 0 5px;
  }

  /* Checkout modal */
  .checkout-content {
    padding: 25px 20px;
  }

  .checkout-title {
    font-size: 2rem;
    margin-bottom: 20px;
  }

  .checkout-summary h3 {
    font-size: 1.4rem;
  }

  .checkout-item {
    font-size: 0.9rem;
    padding: 10px 0;
  }

  .checkout-total {
    font-size: 1.1rem;
  }

  .checkout-total span:last-child {
    font-size: 1.3rem;
  }

  .checkout-form h3 {
    font-size: 1.6rem;
  }

  .form-group label {
    font-size: 0.85rem;
  }

  .form-control {
    padding: 12px 15px;
    font-size: 0.95rem;
  }

  /* Botão de submit do checkout */
  #submitBtn {
    padding: 14px;
    font-size: 1rem;
  }

  #submitBtn span {
    display: block;
  }
}

/* Garantia de que todos os botões são visíveis */
@media (max-width: 480px) {
  .cart-footer .cart-actions {
    flex-direction: column;
    gap: 10px;
  }

  .cart-footer .btn-secondary,
  .cart-footer .btn-primary {
    width: 100%;
    margin: 0;
    padding: 14px;
    font-size: 0.9rem;
    white-space: normal;
    word-break: break-word;
  }

  /* Ajuste para o texto do botão de pagamento */
  #submitBtn {
    white-space: normal;
    height: auto;
    min-height: 50px;
    line-height: 1.3;
    padding: 12px;
  }

  .gift-image {
    height: 300px;
  }
}

/* Landscape em celulares */
@media (max-width: 768px) and (orientation: landscape) {
  .cart-sidebar {
    width: 100%;
  }

  .checkout-content {
    max-height: 85vh;
  }

  .cart-item {
    padding: 10px;
  }

  .cart-item-image {
    width: 60px;
    height: 60px;
  }

  .gift-image {
    height: 300px;
  }
}

/* Ajuste para telas muito pequenas (menos de 360px) */
@media (max-width: 359px) {
  .gift-name {
    font-size: 1.1rem;
  }

  .gift-price {
    font-size: 1rem;
  }

  .btn-gift {
    font-size: 0.8rem;
    padding: 10px;
  }

  .cart-item-name {
    font-size: 0.9rem;
  }

  .cart-item-price {
    font-size: 0.85rem;
  }

  .cart-total {
    font-size: 1rem;
  }

  .cart-total-value {
    font-size: 1.2rem;
  }

  .gift-image {
    height: 280px;
  }
}

/* Suporte a telas de alta densidade */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .gift-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
  .cart-button,
  .btn-primary,
  .btn-secondary,
  .cart-item {
    animation: none;
    transition: none;
  }

  .btn-primary:hover::after {
    display: none;
  }
}

/* Impressão */
@media print {
  .cart-button,
  .cart-sidebar,
  .checkout-modal,
  .btn-gift,
  .btn-load-more {
    display: none !important;
  }

  .gifts-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .gift-image {
    height: 160px;
  }
}
