:root {
  --ink: #221116;
  --muted: #6d5b60;
  --line: #eadde0;
  --red: #d9102b;
  --rose: #fff4f5;
  --green: #14885f;
  --paper: #fcf9f9;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

.top {
  height: 78px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 max(22px, calc((100% - 1100px) / 2));
  gap: 30px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.detail-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  white-space: nowrap;
  font-weight: 400;
}

.mark {
  background: var(--red);
  color: white;
  border-radius: 9px;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 800;
}

.detail-nav {
  display: flex;
  gap: 25px;
  flex: 1;
}

.detail-nav a {
  color: #59454c;
  font-size: 14px;
}

.detail-nav a:hover {
  color: var(--red);
}

.detail-menu {
  display: none;
  margin-left: auto;
  position: relative;
}

.detail-menu summary {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  list-style: none;
  cursor: pointer;
}

.detail-menu summary::-webkit-details-marker {
  display: none;
}

.detail-menu summary span,
.detail-menu summary::before,
.detail-menu summary::after {
  content: "";
  width: 22px;
  height: 2.5px;
  border-radius: 999px;
  background: var(--ink);
  display: block;
}

.detail-menu summary {
  gap: 5px;
}

.detail-menu[open] summary::before {
  transform: translateY(7.5px) rotate(45deg);
}

.detail-menu[open] summary span {
  opacity: 0;
}

.detail-menu[open] summary::after {
  transform: translateY(-7.5px) rotate(-45deg);
}

.detail-menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(260px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(61, 0, 16, 0.16);
  display: grid;
  gap: 6px;
}

.detail-menu-panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.detail-menu-panel a:hover {
  background: var(--rose);
  color: var(--red);
}

.wrap {
  max-width: 1100px;
  margin: auto;
  padding: 24px;
  width: 100%;
}

.crumb {
  font-size: 13px;
  color: #775c63;
  margin: 0 0 24px;
  word-break: break-word;
}

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

.main, .side {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
}

.main {
  padding: 34px;
}

.side {
  padding: 24px;
  height: max-content;
  position: sticky;
  top: 98px;
  display: flex;
  flex-direction: column;
}

.label {
  color: #a11127;
  letter-spacing: .1em;
  font-size: 11px;
  font-weight: 800;
  margin: 0;
}

h1 {
  font-size: clamp(26px, 4vw, 39px);
  letter-spacing: -.04em;
  line-height: 1.1;
  margin: 8px 0;
  word-break: break-word;
}

.meta {
  color: var(--muted);
  margin: 6px 0 20px;
  font-size: 15px;
}

h2 {
  font-size: 20px;
  margin: 30px 0 12px;
  letter-spacing: -.02em;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: var(--rose);
  border-radius: 11px;
  padding: 16px;
}

.facts span {
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}

.facts b {
  display: block;
  color: var(--ink);
  font-size: 14px;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.apply {
  background: var(--red);
  color: white;
  display: block;
  text-align: center;
  border-radius: 10px;
  padding: 14px;
  font-weight: 800;
  font-size: 15px;
  margin: 16px 0 8px;
  transition: background .15s;
}

.apply:hover {
  background: var(--red-dark);
}

.share-wa {
  display: block;
  background: #25D366;
  color: #fff;
  border-radius: 10px;
  padding: 13px;
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  margin-top: 6px;
  transition: background .15s;
}

.share-wa:hover {
  background: #1ebe57;
}

.small {
  font-size: 12px;
  color: #745d63;
  line-height: 1.4;
}

.line {
  border: 0;
  border-top: 1px solid #eee3e5;
  margin: 20px 0;
}

.source {
  background: var(--rose);
  border-radius: 9px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.45;
}

.source a {
  color: #b10b23;
  font-weight: 700;
}

.detail-footer {
  margin-top: 52px;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 28px max(22px, calc((100% - 1100px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #77676b;
  font-size: 12px;
}

.detail-footer > div {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2000;
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(61, 0, 16, .18);
  padding: 16px;
  display: none;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.cookie-banner.show {
  display: flex;
}

.cookie-banner p {
  margin: 0;
  color: #4e3d43;
  font-size: 13px;
}

.cookie-banner a {
  color: #a70b20;
  font-weight: 800;
}

.cookie-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-actions button, .cookie-actions a {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.cookie-actions .accept {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* Responsive Breakpoints */
@media (max-width: 860px) {
  .top {
    height: 68px;
    padding: 0 16px;
    gap: 12px;
  }
  .detail-nav {
    display: none;
  }
  .detail-menu {
    display: block;
  }
  .wrap {
    padding: 16px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .side {
    position: static;
    order: -1;
  }
  .main {
    padding: 22px;
  }
  .facts {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .detail-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 16px;
  }
  .cookie-banner {
    align-items: stretch;
    flex-direction: column;
  }
  .cookie-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .top {
    width: 100vw;
    max-width: 100vw;
  }
  .detail-brand {
    min-width: 0;
    font-size: 17px;
  }
  .detail-brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mark {
    flex: 0 0 auto;
  }
  .wrap {
    padding: 14px;
  }
  .crumb {
    font-size: 12px;
    margin-bottom: 14px;
  }
  .main {
    padding: 16px;
    border-radius: 12px;
  }
  .side {
    padding: 16px;
    border-radius: 12px;
  }
  h1 {
    font-size: 30px;
    line-height: 1.05;
  }
  h2 {
    font-size: 22px;
    line-height: 1.15;
  }
  .facts {
    padding: 12px;
  }
  .detail-footer {
    width: 100vw;
    max-width: 100vw;
  }
}
