* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Verdana, Tahoma, sans-serif; background: #f7f4ee; color: #1f2937; }
.container { max-width: 1100px; margin: 0 auto; padding: 24px; }
.back-link { display: inline-block; margin-bottom: 16px; color: #1d4ed8; text-decoration: none; }
.product-layout { display: grid; gap: 20px; }
.product-hero { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 20px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; }
.product-hero img { width: 100%; height: 360px; object-fit: contain; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; }
h1 { margin: 0 0 8px; font-size: 2rem; }
.author { margin: 0 0 12px; color: #374151; }
.price { margin: 0; font-size: 1.4rem; font-weight: 700; color: #166534; }
.old-price { margin: 6px 0 0; color: #991b1b; text-decoration: line-through; }
.categories { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: #e5f0ff; color: #1e3a8a; border-radius: 999px; padding: 5px 10px; font-size: 0.9rem; }
.meta-block { margin-top: 12px; border-top: 1px dashed #d1d5db; padding-top: 10px; }
.meta-block p { margin: 4px 0; color: #374151; }
.share-panel { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #d1d5db; }
.share-panel-links { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.share-panel-links-compact { gap: 6px; }
.share-button,
.share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
}
.share-button-primary { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.share-button:hover,
.share-link:hover { filter: brightness(0.98); }
.share-more { position: relative; }
.share-more summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
}
.share-more summary::-webkit-details-marker { display: none; }
.share-more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 3;
  width: max-content;
  display: grid;
  grid-template-columns: repeat(3, 32px);
  gap: 6px;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
  justify-content: start;
}
.share-link-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  aspect-ratio: 1;
}
.share-link-icon::before {
  content: '';
  width: 15px;
  height: 15px;
  display: block;
  background: currentColor;
}
.share-link-whatsapp::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20 12a8 8 0 0 1-11.7 7.1L4 20l1-4.1A8 8 0 1 1 20 12Zm-4.2 2.2c-.2-.1-1.3-.6-1.4-.7-.2-.1-.3-.1-.4.1-.1.2-.5.7-.6.8-.1.1-.2.1-.4 0a5.9 5.9 0 0 1-1.7-1 6.5 6.5 0 0 1-1.2-1.5c-.1-.2 0-.3.1-.4l.3-.3.2-.3v-.3c0-.1-.4-1-.6-1.4-.2-.3-.3-.3-.4-.3h-.4c-.1 0-.3 0-.4.2-.2.2-.7.7-.7 1.6 0 1 .7 1.9.8 2 .1.1 1.4 2.1 3.4 3 .5.2.9.4 1.2.5.5.2 1 .2 1.3.1.4-.1 1.3-.5 1.5-1 .2-.5.2-.9.1-1 0-.1-.2-.2-.4-.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M20 12a8 8 0 0 1-11.7 7.1L4 20l1-4.1A8 8 0 1 1 20 12Zm-4.2 2.2c-.2-.1-1.3-.6-1.4-.7-.2-.1-.3-.1-.4.1-.1.2-.5.7-.6.8-.1.1-.2.1-.4 0a5.9 5.9 0 0 1-1.7-1 6.5 6.5 0 0 1-1.2-1.5c-.1-.2 0-.3.1-.4l.3-.3.2-.3v-.3c0-.1-.4-1-.6-1.4-.2-.3-.3-.3-.4-.3h-.4c-.1 0-.3 0-.4.2-.2.2-.7.7-.7 1.6 0 1 .7 1.9.8 2 .1.1 1.4 2.1 3.4 3 .5.2.9.4 1.2.5.5.2 1 .2 1.3.1.4-.1 1.3-.5 1.5-1 .2-.5.2-.9.1-1 0-.1-.2-.2-.4-.3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.share-link-facebook::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M13.5 21v-7h2.3l.4-3h-2.7V9.2c0-.9.3-1.5 1.6-1.5H16V5.1c-.3 0-1.1-.1-2.1-.1-2.1 0-3.4 1.3-3.4 3.7V11H8v3h2.5v7h3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M13.5 21v-7h2.3l.4-3h-2.7V9.2c0-.9.3-1.5 1.6-1.5H16V5.1c-.3 0-1.1-.1-2.1-.1-2.1 0-3.4 1.3-3.4 3.7V11H8v3h2.5v7h3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.share-link-x::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M18.9 3H22l-6.8 7.8L23 21h-6.1l-4.8-6.2L6.7 21H3.6l7.3-8.3L1.5 3h6.2l4.3 5.7L18.9 3Zm-1.1 16h1.7L6.8 4.9H5.1L17.8 19Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M18.9 3H22l-6.8 7.8L23 21h-6.1l-4.8-6.2L6.7 21H3.6l7.3-8.3L1.5 3h6.2l4.3 5.7L18.9 3Zm-1.1 16h1.7L6.8 4.9H5.1L17.8 19Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.share-link-telegram::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M21.5 4.5 18.4 19c-.2 1-.8 1.3-1.7.8l-4.7-3.5-2.3 2.2c-.3.3-.5.5-1 .5l.3-4.8 8.8-8c.4-.3-.1-.5-.6-.2L6.4 13 1.8 11.5c-1-.3-1-.9.2-1.3L20 3.3c.8-.3 1.6.2 1.5 1.2Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M21.5 4.5 18.4 19c-.2 1-.8 1.3-1.7.8l-4.7-3.5-2.3 2.2c-.3.3-.5.5-1 .5l.3-4.8 8.8-8c.4-.3-.1-.5-.6-.2L6.4 13 1.8 11.5c-1-.3-1-.9.2-1.3L20 3.3c.8-.3 1.6.2 1.5 1.2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.share-link-email::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6h18v12H3V6Zm2 2v.4l7 4.9 7-4.9V8l-7 4.9L5 8Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 6h18v12H3V6Zm2 2v.4l7 4.9 7-4.9V8l-7 4.9L5 8Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.share-link-page::before {
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10.6 13.4a1 1 0 0 0 1.4 1.4l4-4V14a1 1 0 1 0 2 0V6h-8a1 1 0 1 0 0 2h4.6l-4 4ZM5 5h6a1 1 0 1 1 0 2H7v10h10v-4a1 1 0 1 1 2 0v6H5V5Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10.6 13.4a1 1 0 0 0 1.4 1.4l4-4V14a1 1 0 1 0 2 0V6h-8a1 1 0 1 0 0 2h4.6l-4 4ZM5 5h6a1 1 0 1 1 0 2H7v10h10v-4a1 1 0 1 1 2 0v6H5V5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.share-link-whatsapp { background: #ecfdf5; border-color: #a7f3d0; color: #166534; }
.share-link-facebook { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.share-link-x { background: #f8fafc; border-color: #cbd5e1; color: #0f172a; }
.share-link-telegram { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }
.share-link-email { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.share-link-page { background: #f8fafc; border-color: #cbd5e1; color: #334155; }
.share-feedback { min-height: 16px; margin: 6px 0 0; color: #1d4ed8; font-size: 0.8rem; }
.stock-badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.stock-badge-ok { background: #dcfce7; color: #166534; }
.stock-badge-no { background: #fee2e2; color: #991b1b; }
.description { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; }
.description p { line-height: 1.65; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gallery-grid img { width: 100%; height: 180px; object-fit: contain; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.similar { margin-top: 26px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.card { display: block; text-decoration: none; color: inherit; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px; }
.card img { width: 100%; height: 210px; object-fit: contain; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.card h3 { margin: 10px 0 6px; font-size: 1rem; }
.meta { margin: 0; color: #6b7280; font-size: 0.9rem; }
@media (max-width: 780px) {
  .container { padding: 14px; }
  .product-hero { grid-template-columns: 1fr; }
  .product-hero img { height: 300px; }
}
