/* =========================================================
   Cart drawer (off-canvas)
   ========================================================= */
.eshet-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  z-index: 90;
}
.eshet-drawer-overlay.is-open { opacity: 1; visibility: visible; }

.eshet-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: 460px;
  max-width: 92vw;
  background: var(--c-white);
  z-index: 100;
  transform: translateX(0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .3s ease, opacity .3s ease, visibility .3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,.08);
}
.eshet-cart-drawer.is-open { transform: translateX(0); opacity: 1; visibility: visible; pointer-events: auto; }

.eshet-cart-drawer__head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--c-gray-light);
}
.eshet-cart-drawer__close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--c-black);
}
.eshet-cart-drawer__title {
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: 2px;
}

.eshet-cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* Items */
.eshet-cart-items { list-style: none; margin: 0; padding: 0; }
.eshet-cart-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--c-gray-light);
  position: relative;
  align-items: start;
}
/* O mini-cart base do WooCommerce injeta ::before/::after (clearfix) que
   entram como itens implícitos do grid e empurram as colunas. Neutraliza. */
.eshet-cart-item::before,
.eshet-cart-item::after {
  content: none !important;
  display: none !important;
}
.eshet-cart-item__media {
  grid-column: 1;
  grid-row: 1;
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}
.eshet-cart-item__media a { display: block; }
.eshet-cart-item__media img {
  width: 96px !important;
  max-width: 96px !important;
  height: 116px !important;
  object-fit: cover;
  display: block;
  float: none !important;
  margin: 0 !important;
}
/* À prova de AJAX: cobre o mini-cart NATIVO do WooCommerce (li.mini_cart_item
   > a > img, sem .eshet-cart-item__media) que pode substituir o corpo após
   um add-to-cart. Mira só as imagens diretas do item do widget — NÃO afeta
   os cards de recomendação (.eshet-card, imagem aninhada mais fundo). */
.eshet-cart-drawer__body > .eshet-cart-items > li > a > img,
.eshet-cart-drawer__body > ul.product_list_widget > li > a > img,
.eshet-cart-drawer__body > ul.product_list_widget > li.mini_cart_item > a > img {
  width: 96px !important;
  max-width: 96px !important;
  height: 116px !important;
  object-fit: cover !important;
  display: block !important;
  float: none !important;
  margin: 0 !important;
}
.eshet-cart-item__info { grid-column: 2; grid-row: 1; min-width: 0; }
.eshet-cart-item__name {
  font-weight: 700;
  text-transform: uppercase;
  font-size: var(--fs-base);
  letter-spacing: .5px;
  line-height: 1.15;
  display: block;
  margin-bottom: 2px;
}
.eshet-cart-item__price { display: block; margin-bottom: 10px; }
.eshet-cart-item__meta,
.eshet-cart-item__qty {
  font-size: 12px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.eshet-cart-item__meta { margin-bottom: 2px; }
.eshet-cart-item__remove,
.woocommerce a.remove.eshet-cart-item__remove {
  position: absolute;
  top: 12px;
  right: 0;
  width: auto;
  height: auto;
  line-height: 1;
  font-size: 18px;
  color: #999 !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  text-decoration: none;
}
.eshet-cart-item__remove:hover,
.woocommerce a.remove.eshet-cart-item__remove:hover {
  color: var(--c-black) !important;
  background: none !important;
}

/* Summary */
.eshet-cart-summary { padding: 18px 0; }
.eshet-cart-summary__row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-sm);
  padding: 6px 0;
  letter-spacing: 1px;
}
.eshet-cart-summary__total {
  font-weight: 700;
  font-size: var(--fs-base);
  border-top: 1px solid var(--c-gray-light);
  margin-top: 6px;
  padding-top: 14px;
}

/* Actions */
.eshet-cart-drawer__actions {
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.eshet-btn--dark {
  background: var(--c-black);
  color: var(--c-white);
  border: none;
  text-align: center;
}
.eshet-btn--dark:hover { opacity: .88; }
/* FINALIZAR COMPRA no drawer (Figma: altura 42, radius 8) */
.eshet-cart-checkout {
  width: 100%;
  min-height: 42px;
  padding: 0 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
}
.eshet-cart-viewcart {
  text-align: center;
  font-size: var(--fs-sm);
  text-decoration: underline;
  color: var(--c-black);
}
.eshet-cart-empty { text-align: center; padding: 40px 0; color: #777; }

body.eshet-cart-open { overflow: hidden; }

/* ---- Item attributes (tamanho / variação) ---- */
.eshet-cart-item__attrs { margin: 0 0 10px; }
.eshet-cart-item__attr {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.3;
  margin-bottom: 6px;
}
.eshet-cart-item__attr dt { color: #9a9a9a; margin: 0; font-weight: 400; }
.eshet-cart-item__attr dd { margin: 0; color: var(--c-black); font-weight: 600; }

/* ---- Qty stepper ---- */
.eshet-cart-item__qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
}
.eshet-qty-btn {
  background: #efe9df;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
  color: var(--c-black);
  cursor: pointer;
}
.eshet-qty-btn:hover { background: var(--c-beige); }
.eshet-qty-btn:disabled { opacity: .5; cursor: default; }
.eshet-qty-value {
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* ---- Cart options (gift / coupon / shipping) ---- */
.eshet-cart-options {
  padding: 18px 0;
  border-top: 1px solid var(--c-gray-light);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.eshet-cart-option {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
}
.eshet-cart-option__icon { color: var(--c-gold); display: inline-flex; }
.eshet-cart-option__label {
  font-size: var(--fs-sm);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
}
.eshet-cart-inline {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.eshet-cart-inline input {
  flex: 1;
  border: none;
  background: #E5DDD240;
  border-radius: 8px;
  height: 27px;
  padding: 0 12px;
  font-family: inherit;
  font-size: var(--fs-sm);
}
.eshet-inline-btn {
  background: #E5DDD240;
  border: none;
  color: #B69E60;
  width: 110px;
  height: 27px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  flex: 0 0 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.eshet-inline-btn:hover { background: #E5DDD280; }

/* Applied coupons + shipping rates */
.eshet-cart-coupons,
.eshet-cart-rates {
  grid-column: 1 / -1;
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  font-size: 12px;
}
.eshet-cart-coupons li,
.eshet-cart-rates li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  letter-spacing: .5px;
}
.eshet-coupon-remove { color: #999 !important; font-size: 15px; }
.eshet-coupon-remove:hover { color: var(--c-black) !important; }

/* ---- Toggle switch ---- */
.eshet-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.eshet-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.eshet-switch__track {
  position: absolute; inset: 0;
  background: var(--c-gray-light);
  border-radius: 999px;
  transition: background .2s ease;
}
.eshet-switch__track::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: var(--c-white);
  border-radius: 50%;
  transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.eshet-switch input:checked + .eshet-switch__track { background: #7cc98f; }
.eshet-switch input:checked + .eshet-switch__track::before { transform: translateX(18px); }

/* ---- Empty state ---- */
.eshet-cart-empty-state { text-align: center; padding: 40px 0 24px; }
.eshet-cart-empty-state .eshet-cart-empty {
  padding: 0 0 20px;
  font-size: var(--fs-sm);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-black);
}
.eshet-btn--outline-dark {
  display: inline-block;
  border: 1px solid var(--c-black);
  padding: 12px 28px;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-black);
}
.eshet-btn--outline-dark:hover { background: var(--c-black); color: var(--c-white); }

/* ---- Recommendations ("você pode gostar") ---- */
.eshet-cart-reco { padding: 22px 0 8px; border-top: 1px solid var(--c-gray-light); }
.eshet-cart-reco__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.eshet-cart-reco__title {
  font-size: var(--fs-sm);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
}
.eshet-cart-reco__nav { display: flex; gap: 6px; }
.eshet-cart-reco__arrow {
  width: 55px; height: 26px;
  border: none;
  background: #DCCFA9;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.eshet-cart-reco__arrow::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--c-white);
}
.eshet-cart-reco__arrow--prev::before {
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='16,4 16,20 5,12' fill='black'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='16,4 16,20 5,12' fill='black'/></svg>") center/contain no-repeat;
}
.eshet-cart-reco__arrow--next::before {
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='8,4 8,20 19,12' fill='black'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='8,4 8,20 19,12' fill='black'/></svg>") center/contain no-repeat;
}
.eshet-cart-reco__arrow:hover { background: var(--c-gold); }
.eshet-cart-reco__track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.eshet-cart-reco__track::-webkit-scrollbar { display: none; }
.eshet-cart-reco__track .eshet-card {
  flex: 0 0 150px;
  scroll-snap-align: start;
}
.eshet-cart-reco__track .eshet-card__title { font-size: 13px; }
.eshet-cart-reco__track .eshet-card__cat { font-size: 10px; }

/* =========================================================
   Wishlist drawer (off-canvas) — mesmo padrão do cart drawer
   ========================================================= */
.eshet-wishlist-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: 460px;
  max-width: 92vw;
  background: var(--c-white);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(20px);
  transition: transform .3s ease, opacity .3s ease, visibility .3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0,0,0,.08);
}
.eshet-wishlist-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.eshet-wishlist-drawer__head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid var(--c-gray-light);
}
.eshet-wishlist-drawer__close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--c-black);
}
.eshet-wishlist-drawer__title {
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: 2px;
}
.eshet-wishlist-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.eshet-wishlist-empty-state { text-align: center; padding: 48px 0 28px; }
.eshet-wishlist-empty-state .eshet-wishlist-empty {
  font-size: var(--fs-sm);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--c-black);
  margin-bottom: 22px;
}
/* Grid interno da wishlist (2 colunas) */
.eshet-wishlist-drawer__content .eshet-products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* Header wishlist count badge */
.eshet-wishlist-link { position: relative; }
.eshet-wishlist-count {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--c-gold);
  color: var(--c-white);
  font-size: 10px;
  line-height: 16px;
  text-align: center;
  border-radius: 999px;
}

/* =========================================================
   Checkout & Cart page (design system coerente)
   ========================================================= */
.woocommerce-checkout .eshet-shop,
.woocommerce-cart .eshet-shop { padding-block: 40px 72px; }

.woocommerce-checkout h3,
.woocommerce-cart h2 {
  font-size: var(--fs-h3);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* Inputs */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce table.shop_table {
  border: 1px solid var(--c-gray-border);
  border-radius: 0;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
  padding: 12px 14px;
  font-family: inherit;
}
.woocommerce .form-row label { font-size: var(--fs-sm); }

/* Botões do WooCommerce coerentes com o tema */
.woocommerce #payment #place_order,
.woocommerce a.checkout-button,
.woocommerce button.button.alt,
.woocommerce .wc-proceed-to-checkout a.button {
  background: var(--c-black) !important;
  color: var(--c-white) !important;
  border-radius: 0 !important;
  padding: 15px 36px;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.woocommerce #payment #place_order:hover,
.woocommerce a.checkout-button:hover,
.woocommerce button.button.alt:hover { opacity: .88; }

/* Order review / totals */
.woocommerce-checkout #order_review,
.woocommerce-checkout .woocommerce-checkout-review-order-table { font-size: var(--fs-base); }
.woocommerce table.shop_table th { text-transform: uppercase; letter-spacing: 1px; font-size: var(--fs-sm); }

/* Cart page table */
.woocommerce-cart table.cart img { width: 80px; }
.woocommerce-cart .quantity input.qty {
  border: 1px solid var(--c-gray-border);
  padding: 8px;
  width: 60px;
}
