/* =========================================
   Reset & Base
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fff;
}

img {
  display: block;
  max-width: 100%;
}

/* =========================================
   Sticky Top Bar
   ========================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 24px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}

.topbar-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================
   Price Tag (ribbon-style like Gumroad)
   ========================================= */
.price-tag {
  display: inline-flex;
  align-items: center;
  background: #ff90e8;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 12px 4px 10px;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%);
  white-space: nowrap;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
  position: relative;
  max-height: 640px;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 640px;
  object-fit: cover;
  object-position: center;
  display: block;
  /* Placeholder background when no image is set */
  background: #b0d8e0;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.15) 0%, transparent 40%);
  padding: 0;
}

.hero-text {
  background: #f07855;
  padding: 40px 48px 36px;
  max-width: 760px;
}

.hero-line1 {
  display: block;
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.hero-line2 {
  display: block;
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  color: #ff90e8;
  text-transform: uppercase;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.hero-sub {
  margin-top: 16px;
  font-size: 18px;
  color: #fff;
  font-weight: 400;
}

/* =========================================
   Main Layout (content + sidebar)
   ========================================= */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  align-items: start;
}

@media (max-width: 720px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .product-sidebar {
    order: -1;
  }
}

/* =========================================
   Product Content (left column)
   ========================================= */
.product-content {
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
}

.product-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid #e5e5e5;
}

.product-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 20px;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #ddd;
}

.product-description {
  padding: 24px 28px 32px;
}

.product-description p {
  margin-bottom: 16px;
  color: #333;
}

.product-description p:last-child {
  margin-bottom: 0;
}

.product-description ul {
  margin: 12px 0 0 20px;
}

.product-description li {
  margin-bottom: 8px;
  color: #333;
}

/* =========================================
   Sidebar (right column)
   ========================================= */
.product-sidebar {
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 720px) {
  .product-sidebar {
    padding-left: 0;
    padding-bottom: 24px;
  }
}

/* =========================================
   Buy Section
   ========================================= */
.buy-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.qty-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  background: #fff;
  cursor: pointer;
  appearance: auto;
}

.qty-select:focus {
  outline: 2px solid #ff90e8;
  outline-offset: 1px;
}

/* =========================================
   Pay Button
   ========================================= */
.btn-pay {
  display: inline-block;
  background: #ff90e8;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 20px;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: filter 0.15s ease;
  white-space: nowrap;
}

.btn-pay--large {
  padding: 14px 20px;
  font-size: 16px;
  border-radius: 6px;
  width: 100%;
}

.btn-pay:hover {
  filter: brightness(0.92);
}

/* =========================================
   Product Details Table
   ========================================= */
.product-details {
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e5e5;
  font-size: 14px;
  color: #333;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row--highlight {
  background: #fafafa;
  font-weight: 500;
}

.detail-label {
  color: #555;
}

.detail-value {
  font-weight: 600;
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid #e5e5e5;
  font-size: 13px;
  color: #888;
}
