/* ==========================================================================
   RESET & BASE (MOBILE FIRST)
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: #fafafa; color: #333; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3 { line-height: 1.2; margin-bottom: 15px; font-weight: 700; color: #111; }
p { margin-bottom: 15px; }

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.container { padding: 0 20px; width: 100%; max-width: 1200px; margin: 0 auto; }

/* HEADER */
.site-header { background: #fff; padding: 15px 0; border-bottom: 1px solid #eaeaea; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; color: #000; }
.main-nav { display: flex; gap: 15px; }
.main-nav a { font-size: 14px; font-weight: 500; color: #555; }

/* HERO SECTION */
.hero { background: #111; color: #fff; padding: 60px 0; text-align: center; }
.hero h1 { color: #fff; font-size: 32px; margin-bottom: 10px; }
.hero p { color: #aaa; font-size: 18px; margin-bottom: 30px; }

/* PRODUCT GRID */
.products-section { padding: 50px 0; }
.section-title { text-align: center; font-size: 24px; margin-bottom: 30px; }
.product-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }

/* PRODUCT CARD */
.product-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center; display: flex; flex-direction: column; transition: transform 0.2s; }
.product-card:active { transform: scale(0.98); }
.product-cover-wrap { padding: 20px; background: #f4f6f8; aspect-ratio: 4/5; display: flex; align-items: center; justify-content: center; }
.product-cover-wrap img { max-height: 100%; object-fit: contain; box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-radius: 4px; }
.product-info { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.product-title { font-size: 18px; margin-bottom: 10px; }
.product-desc { font-size: 14px; color: #666; margin-bottom: 20px; flex-grow: 1; }
.product-price { font-size: 24px; font-weight: 800; color: #007bff; margin-bottom: 20px; }

/* BUTTONS */
.btn { display: inline-block; width: 100%; padding: 15px; background: #007bff; color: #fff; font-size: 16px; font-weight: 700; border-radius: 8px; text-align: center; transition: background 0.2s; }
.btn:active { background: #0056b3; }
.btn-success { background: #28a745; }
.btn-success:active { background: #1e7e34; }

/* E-BOOK SINGLE PAGE */
.ebook-page { padding: 30px 0 100px 0; }
.ebook-header { text-align: center; margin-bottom: 40px; }
.ebook-main-cover { max-width: 250px; margin: 0 auto 30px auto; box-shadow: 0 20px 40px rgba(0,0,0,0.15); border-radius: 8px; }
.ebook-title { font-size: 28px; }
.ebook-price { font-size: 32px; font-weight: 800; color: #007bff; margin: 20px 0; }
.ebook-section { margin-bottom: 40px; background: #fff; padding: 30px 20px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); }
.ebook-section h2 { font-size: 20px; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 20px; }
.contents-list { list-style: none; }
.contents-list li { padding: 12px 0; border-bottom: 1px solid #eee; display: flex; align-items: flex-start; }
.contents-list li:before { content: '✓'; color: #28a745; font-weight: bold; margin-right: 10px; }

/* FLOATING CTA (Mobile) */
.floating-cta { position: fixed; bottom: 0; left: 0; width: 100%; background: #fff; padding: 15px 20px; box-shadow: 0 -2px 15px rgba(0,0,0,0.1); border-top: 1px solid #eaeaea; z-index: 90; display: flex; justify-content: space-between; align-items: center; transform: translateY(100%); transition: transform 0.3s ease; }
.floating-cta.visible { transform: translateY(0); }
.floating-cta .price { font-weight: 800; font-size: 20px; }
.floating-cta .btn { width: auto; padding: 12px 25px; margin: 0; }

/* FORMS & CHECKOUT */
.checkout-box { background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-top: 30px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; }
.form-control { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 16px; background: #f9f9f9; }
.form-control:focus { outline: none; border-color: #007bff; background: #fff; }

/* PAYMENT PAGE */
.payment-box { background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); text-align: center; margin-top: 30px; }
.qr-code-box { background: #f9f9f9; padding: 20px; border-radius: 8px; display: inline-block; margin: 20px 0; }
.qr-code-box img { width: 250px; height: 250px; display: block; }
.copy-pix-area { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.copy-pix-area input { text-align: center; background: #eee; }

/* ALERTS */
.alert { padding: 15px; border-radius: 8px; margin-bottom: 20px; text-align: center; font-weight: 500; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* FOOTER */
.site-footer { text-align: center; padding: 40px 0; color: #888; font-size: 14px; }

/* ==========================================================================
   DESKTOP ADAPTATIONS (Min 768px)
   ========================================================================== */
@media (min-width: 768px) {
    .hero h1 { font-size: 48px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
    
    .ebook-page .container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
    .ebook-header { grid-column: 1 / 3; }
    .ebook-main-cover { max-width: 350px; }
    .ebook-sidebar { position: sticky; top: 100px; }
    
    .floating-cta { display: none; /* Hide floating CTA on desktop */ }
}

@media (min-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}
