/* Catalog styles extend the shared Studios 3D Rocha identity. */
.shop-page [hidden] {
  display: none !important;
}

.shop-page {
  overflow-wrap: break-word;
}

.shop-intro {
  padding-top: 68px;
  padding-bottom: 34px;
}

.shop-intro .eyebrow {
  font-size: 11px;
  letter-spacing: 1.6px;
}

.shop-title {
  max-width: 820px;
  margin-top: 22px;
  font-family: var(--display);
  font-size: clamp(44px, 6vw, 78px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.07;
}

.shop-lead {
  max-width: 650px;
  margin-top: 24px;
  color: #b8b6ac;
  font-size: 17px;
  line-height: 1.75;
}

.shop-search {
  max-width: 650px;
  margin-top: 34px;
}

.shop-search label {
  display: block;
  margin-bottom: 10px;
  color: #dedbd1;
  font-size: 13px;
  font-weight: 500;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 58px;
  padding: 0 10px 0 18px;
  border: 1px solid #55534a;
  background: var(--panel);
  transition: border-color .2s;
}

.search-field:focus-within {
  border-color: var(--orange);
  outline: 1px solid var(--orange);
  outline-offset: 2px;
}

.search-field > svg {
  width: 21px;
  height: 21px;
  color: var(--muted);
  flex-shrink: 0;
}

.search-field input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 12px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
}

.search-field input:focus {
  outline: none;
}

.search-field input::placeholder {
  color: #aaa79d;
  opacity: 1;
}

.search-field input::-webkit-search-cancel-button {
  appearance: none;
}

.search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-height: 40px;
  flex-shrink: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.search-clear:hover {
  color: var(--text);
  border-color: var(--line);
}

.search-clear svg {
  width: 18px;
  height: 18px;
}

.shop-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  margin-top: 30px;
  border-top: 1px solid var(--line);
  color: #bebbb1;
  font-size: 13px;
  line-height: 1.6;
}

.shop-category {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border: 1px solid #674925;
  background: #251c12;
  color: #ffc176;
  font-size: 12px;
}

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

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color .2s;
}

.product-card:hover {
  border-color: #8e6635;
}

.product-media {
  flex-shrink: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #141413;
  border-bottom: 1px solid var(--line);
}

.product-media--jacare {
  background: #fff;
}

.product-view {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.product-view:focus-visible {
  outline-offset: -5px;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .35s;
}

.product-media--jacare .product-image {
  padding: 24px;
}

.product-view:hover .product-image {
  transform: scale(1.025);
}

.product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 300px;
  padding: 28px;
}

.product-kicker {
  min-width: 0;
  color: var(--orange);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  line-height: 1.65;
  white-space: normal;
  overflow-wrap: break-word;
}

.product-title {
  margin-top: 12px;
  font-size: clamp(25px, 2.5vw, 34px);
  font-weight: 500;
  letter-spacing: -.9px;
  line-height: 1.18;
}

.product-description {
  max-width: 490px;
  margin-top: 17px;
  color: #b8b6ac;
  font-size: 14px;
  line-height: 1.8;
}

.product-price-note,
.detail-price-note {
  margin-top: 20px;
  color: #ccc7bb;
  font-size: 12px;
  line-height: 1.75;
}

.product-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: auto;
  padding-top: 26px;
}

.product-buy,
.product-details,
.product-whatsapp,
.search-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  min-height: 52px;
  padding: 14px 18px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  transition: background .2s, border-color .2s, color .2s;
}

.product-buy {
  background: var(--orange);
  color: #15120d;
}

.product-buy:hover {
  background: #ffb04b;
}

.product-buy svg,
.product-whatsapp svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.product-details,
.product-whatsapp,
.search-reset {
  border-color: #6e6556;
  background: transparent;
  color: var(--text);
}

.product-details:hover,
.product-whatsapp:hover,
.search-reset:hover {
  border-color: var(--orange);
  background: #241e16;
  color: #ffc176;
}

.catalog-empty {
  padding: 56px 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-align: center;
}

.catalog-empty h2 {
  font-size: 30px;
  letter-spacing: -.9px;
  line-height: 1.25;
}

.catalog-empty p {
  max-width: 550px;
  margin: 17px auto 0;
  color: #b8b6ac;
  font-size: 14px;
  line-height: 1.75;
}

.catalog-empty .search-reset {
  margin-top: 24px;
}

.shop-help {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 40px;
  padding-block: 44px;
  margin-top: 72px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.shop-help h2 {
  font-size: clamp(28px, 3.2vw, 41px);
  letter-spacing: -1.3px;
  line-height: 1.2;
}

.shop-help p {
  grid-column: 1;
  max-width: 670px;
  color: #b8b6ac;
  font-size: 14px;
  line-height: 1.8;
}

.shop-help > .button {
  grid-column: 2;
  grid-row: 1 / 3;
  justify-content: center;
  font-size: 13px;
  text-align: center;
}

.product-dialog {
  width: min(1080px, calc(100% - 40px));
  max-width: none;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  padding: 0;
  border: 1px solid #5b5548;
  background: var(--panel);
  color: var(--text);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  box-shadow: 0 24px 100px #0008;
}

.product-dialog::backdrop {
  background: rgba(0, 0, 0, .76);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #655d50;
  border-radius: 50%;
  background: #191918;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}

.dialog-close:hover {
  background: #332719;
  border-color: var(--orange);
  color: #ffc176;
}

.dialog-close:focus-visible {
  outline-offset: 3px;
}

.dialog-close svg {
  width: 20px;
  height: 20px;
}

.dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-width: 0;
}

.dialog-media {
  min-width: 0;
  padding: 66px 24px 28px;
  background: #131312;
}

.detail-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
}

.detail-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-caption {
  margin-top: 12px;
  color: #b8b6ac;
  font-size: 14px;
  line-height: 1.7;
}

.photo-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.photo-thumb {
  width: 68px;
  height: 68px;
  padding: 4px;
  border: 2px solid #5a554a;
  background: #fff;
  transition: border-color .2s;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.photo-thumb:hover,
.photo-thumb.is-selected,
.photo-thumb[aria-pressed="true"] {
  border-color: var(--orange);
}

.photo-thumb:focus-visible {
  outline-offset: 3px;
}

.dialog-content {
  min-width: 0;
  padding: 70px 36px 36px;
}

.dialog-content h2 {
  margin-top: 13px;
  font-size: clamp(28px, 3vw, 39px);
  letter-spacing: -1.25px;
  line-height: 1.16;
}

.detail-description {
  margin-top: 23px;
  color: #b8b6ac;
  font-size: 14px;
  line-height: 1.85;
}

.detail-specs {
  margin: 27px 0 0;
  border-top: 1px solid var(--line);
}

.detail-specs > div {
  display: grid;
  grid-template-columns: minmax(100px, .7fr) minmax(0, 1fr);
  gap: 15px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.65;
}

.detail-specs dt {
  color: var(--muted);
}

.detail-specs dd {
  margin: 0;
  color: var(--text);
}

.dialog-actions {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.dialog-actions > a {
  width: 100%;
}

@media (max-width: 900px) {
  .product-info {
    padding: 24px;
  }

  .product-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dialog-content {
    padding-inline: 26px;
  }

  .dialog-media {
    padding-inline: 18px;
  }

  .shop-help {
    gap: 16px 28px;
  }
}

@media (max-width: 700px) {
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .product-info {
    min-height: 0;
    padding: 26px;
  }

  .product-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

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

  .shop-help {
    display: block;
  }

  .shop-help p {
    margin-top: 18px;
  }

  .shop-help > .button {
    margin-top: 24px;
  }

  .dialog-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .dialog-media {
    padding: 66px 22px 24px;
  }

  .detail-photo {
    aspect-ratio: 4 / 3;
  }

  .dialog-content {
    padding: 30px 26px;
  }
}

@media (max-width: 640px) {
  .shop-intro {
    padding-top: 43px;
    padding-bottom: 26px;
  }

  .shop-intro .eyebrow {
    font-size: 10px;
    letter-spacing: 1.15px;
  }

  .shop-title {
    margin-top: 19px;
    font-size: clamp(40px, 10vw, 59px);
    letter-spacing: -.05em;
  }

  .shop-lead {
    margin-top: 21px;
    font-size: 15px;
    line-height: 1.75;
  }

  .shop-search {
    margin-top: 28px;
  }

  .search-field {
    min-height: 56px;
    gap: 10px;
    padding-left: 14px;
  }

  .shop-summary {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
    padding-top: 22px;
  }

  .shop-category {
    font-size: 11px;
  }

  .product-media--jacare .product-image {
    padding: 16px;
  }

  .product-info {
    padding: 23px;
  }

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

  .product-description {
    margin-top: 15px;
  }

  .product-actions {
    grid-template-columns: 1fr;
    padding-top: 23px;
  }

  .product-buy,
  .product-details,
  .product-whatsapp {
    min-height: 52px;
    font-size: 14px;
  }

  .shop-help {
    padding-block: 34px;
    margin-top: 48px;
  }

  .shop-help h2 {
    font-size: 30px;
    letter-spacing: -1px;
  }

  .product-dialog {
    width: calc(100% - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .dialog-close {
    top: 12px;
    right: 12px;
  }

  .dialog-media {
    padding: 66px 18px 23px;
  }

  .photo-thumb {
    width: 60px;
    height: 60px;
  }

  .dialog-content {
    padding: 26px 22px 28px;
  }

  .dialog-content h2 {
    font-size: 30px;
    letter-spacing: -1px;
  }

  .detail-description {
    margin-top: 20px;
  }

  .detail-specs > div {
    grid-template-columns: minmax(82px, .6fr) minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 375px) {
  .shop-title {
    font-size: 39px;
  }

  .product-info {
    padding: 21px;
  }

  .dialog-content {
    padding-inline: 18px;
  }

  .detail-specs > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .product-buy,
  .product-details,
  .product-whatsapp {
    padding-inline: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-image,
  .product-card,
  .product-buy,
  .product-details,
  .product-whatsapp,
  .search-reset,
  .photo-thumb {
    transition: none;
  }
}
