.shop-main {
  padding: clamp(128px, 14vw, 168px) clamp(18px, 5vw, 76px) clamp(68px, 9vw, 132px);
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.92), rgba(255, 250, 240, 0.92)), url("assets/Fundo.png") center /
    cover no-repeat fixed;
  color: var(--coffee);
}

.shop-intro {
  max-width: 720px;
  margin-bottom: clamp(34px, 5vw, 56px);
}

.shop-intro .eyebrow {
  color: var(--coffee);
}

.shop-intro h1 {
  color: var(--coffee);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
}

.shop-intro p {
  max-width: 640px;
  margin-top: 16px;
  color: rgba(43, 22, 15, 0.72);
  font-size: 1.05rem;
}

.shop-layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.shop-filters {
  position: sticky;
  top: 110px;
  display: grid;
  gap: 26px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.shop-filters h2 {
  color: var(--coffee);
  font-size: 1.1rem;
}

.filter-group {
  display: grid;
  gap: 12px;
}

.filter-group h3 {
  color: rgba(43, 22, 15, 0.56);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(43, 22, 15, 0.82);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-group input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--copper);
}

.filter-reset {
  justify-self: start;
  padding: 0;
  border: none;
  background: none;
  color: var(--coffee-soft);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
}

.shop-content {
  display: grid;
  gap: 24px;
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.shop-count {
  color: rgba(43, 22, 15, 0.6);
  font-size: 0.86rem;
  font-weight: 700;
}

.shop-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(43, 22, 15, 0.7);
  font-size: 0.86rem;
  font-weight: 700;
}

.shop-sort select {
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 8px 16px;
  background: #fff;
  color: var(--coffee);
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.shop-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

#adminAddProductButton {
  border-color: var(--copper);
  background: #fff;
  color: var(--coffee);
  box-shadow: var(--shadow-soft);
}

#adminAddProductButton:hover {
  background: rgba(183, 132, 82, 0.1);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.shop-card {
  min-height: 340px;
  cursor: pointer;
  background: linear-gradient(145deg, #e4dfd9, #efeeec);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
}

.shop-card::before {
  border-color: var(--line-dark);
}

.shop-card .product-tag {
  border-color: var(--line-dark);
  color: var(--coffee-soft);
}

.shop-card h3 {
  color: var(--coffee);
  text-shadow: none;
}

.shop-card dl div {
  border-top-color: var(--line-dark);
}

.shop-card dt {
  color: rgba(43, 22, 15, 0.56);
}

.shop-card dd {
  color: var(--coffee);
}

.quick-add-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(43, 22, 15, 0.06);
  color: var(--coffee);
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 200ms ease,
    background 200ms ease;
}

.quick-add-button:hover {
  background: rgba(43, 22, 15, 0.12);
  transform: translateY(-2px);
}

.quick-add-button.is-added {
  border-color: transparent;
  background: linear-gradient(135deg, var(--copper), var(--gold));
  color: var(--espresso);
  transform: scale(1.08);
}

.admin-edit-button {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(43, 22, 15, 0.06);
  color: var(--coffee);
  cursor: pointer;
  transition:
    transform 200ms ease,
    background 200ms ease;
}

.admin-edit-button:hover {
  background: rgba(43, 22, 15, 0.12);
  transform: translateY(-2px);
}

.shop-card:hover,
.shop-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.shop-card:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 4px;
}

.shop-card-hint {
  color: var(--coffee-soft);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shop-card-image {
  width: 100%;
  height: 230px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  object-fit: cover;
}

.shop-empty {
  grid-column: 1 / -1;
  padding: 48px 0;
  color: rgba(43, 22, 15, 0.6);
  text-align: center;
}

/* Pop-up de produto */

.product-dialog {
  max-width: min(760px, 94vw);
  max-height: 88vh;
  margin: auto;
  overflow-y: auto;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  padding: 0;
  background: linear-gradient(145deg, #e4dfd9, #efeeec);
  color: var(--coffee);
  box-shadow: var(--shadow-luxe);
}

.product-dialog::backdrop {
  background: rgba(10, 6, 4, 0.72);
  backdrop-filter: blur(4px);
}

.product-dialog-form {
  position: relative;
  padding: clamp(28px, 5vw, 40px);
}

.dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(250, 251, 245, 0.6);
  color: var(--coffee);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.dialog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.dialog-layout:has(.dialog-media) {
  grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
  align-items: start;
}

.dialog-media img {
  width: 100%;
  height: 280px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  object-fit: cover;
}

#productDialogContent h2 {
  margin: 16px 0 8px;
  color: var(--coffee);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

#productDialogContent .product-tag {
  border-color: var(--line-dark);
  color: var(--coffee-soft);
}

.dialog-info > p {
  margin: 0 0 20px;
  color: rgba(43, 22, 15, 0.72);
}

#productDialogContent dl {
  margin-bottom: 26px;
}

#productDialogContent dl div {
  border-top-color: var(--line-dark);
}

#productDialogContent dt {
  color: rgba(43, 22, 15, 0.56);
}

#productDialogContent dd {
  color: var(--coffee);
}

.dialog-purchase {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line-dark);
  padding-top: 22px;
}

.dialog-price {
  color: var(--copper);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.dialog-purchase .quantity-stepper {
  border-color: var(--line-dark);
}

.dialog-purchase .quantity-stepper button {
  background: rgba(43, 22, 15, 0.06);
  color: var(--coffee);
}

.dialog-purchase .quantity-stepper button:hover {
  background: rgba(43, 22, 15, 0.12);
}

.dialog-purchase .quantity-stepper input {
  color: var(--coffee);
}

/* Dialog de administracao do catalogo (adicionar/editar produto) */

.admin-dialog .eyebrow {
  color: var(--copper);
}

.admin-dialog h2 {
  margin: 4px 0 20px;
  color: var(--coffee);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-form-grid .wide-field {
  grid-column: span 2;
}

.admin-form-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-form-grid label span {
  color: rgba(43, 22, 15, 0.6);
  font-size: 0.8rem;
  font-weight: 800;
}

.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea {
  min-height: 46px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 0 14px;
  background: #fffaf0;
  color: var(--coffee);
  font: inherit;
  font-weight: 700;
}

.admin-form-grid textarea {
  height: 84px;
  padding: 12px 14px;
  resize: vertical;
}

.admin-form-grid input:focus,
.admin-form-grid select:focus,
.admin-form-grid textarea:focus {
  outline: 2px solid var(--copper);
  outline-offset: 1px;
}

.admin-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.admin-delete-button {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid rgba(163, 76, 63, 0.32);
  border-radius: 999px;
  background: rgba(163, 76, 63, 0.08);
  color: #a34c3f;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.admin-delete-button:hover {
  background: rgba(163, 76, 63, 0.16);
}

@media (max-width: 560px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-form-grid .wide-field {
    grid-column: auto;
  }
}

/* Seletor de quantidade (usado no pop-up e no carrinho) */

.quantity-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(218, 194, 154, 0.3);
  border-radius: 999px;
  padding: 6px 8px;
}

.quantity-stepper button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: rgba(250, 251, 245, 0.08);
  color: var(--cream-1);
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.quantity-stepper button:hover {
  background: rgba(250, 251, 245, 0.16);
}

.quantity-stepper input,
.quantity-stepper .cart-item-qty {
  width: 34px;
  border: none;
  background: none;
  color: var(--cream-1);
  font-weight: 900;
  text-align: center;
}

.quantity-stepper input::-webkit-outer-spin-button,
.quantity-stepper input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

/* Botao flutuante do carrinho */

.cart-toggle {
  position: fixed;
  right: clamp(18px, 4vw, 40px);
  bottom: clamp(18px, 4vw, 40px);
  z-index: 25;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(218, 194, 154, 0.3);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--copper), var(--gold));
  color: var(--espresso);
  box-shadow: 0 18px 42px rgba(183, 132, 82, 0.32);
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--espresso);
  color: var(--cream-1);
  font-size: 0.72rem;
  font-weight: 900;
}

/* Carrinho (gaveta lateral) */

.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(10, 6, 4, 0.6);
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 41;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(400px, 92vw);
  height: 100vh;
  background: linear-gradient(180deg, #1b0f09, #140b07);
  color: var(--cream-1);
  box-shadow: var(--shadow-luxe);
  transform: translateX(100%);
  transition: transform 280ms ease;
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(218, 194, 154, 0.18);
}

.cart-drawer-head h2 {
  color: var(--cream-1);
  font-size: 1.2rem;
}

.cart-items {
  display: grid;
  align-content: start;
  gap: 16px;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(218, 194, 154, 0.14);
  padding-bottom: 16px;
}

.cart-item-info {
  display: grid;
  gap: 4px;
}

.cart-item-info span {
  color: rgba(250, 251, 245, 0.6);
  font-size: 0.82rem;
}

.cart-item-remove {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 0;
  border: none;
  background: none;
  color: rgba(250, 251, 245, 0.5);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.cart-empty {
  padding: 40px 0;
  color: rgba(250, 251, 245, 0.6);
  text-align: center;
}

.cart-summary {
  display: grid;
  gap: 14px;
  padding: 22px 24px;
  border-top: 1px solid rgba(218, 194, 154, 0.18);
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.05rem;
}

.cart-total strong {
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.6rem;
}

.cart-clear {
  justify-self: center;
  padding: 0;
  border: none;
  background: none;
  color: rgba(250, 251, 245, 0.5);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 1080px) {
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }

  .shop-filters {
    position: static;
  }
}

@media (max-width: 560px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }

  .dialog-layout:has(.dialog-media) {
    grid-template-columns: 1fr;
  }

  .dialog-media img {
    height: 200px;
  }
}
