/* Default store theme. Colors and fonts come from the store's settings via CSS variables on :root. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg, #fff);
	color: var(--text, #222);
	font: 16px/1.6 var(--font-body);
	-webkit-font-smoothing: antialiased;
}
body.drawer-open, body.menu-open { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--brand); }
h1, h2, h3 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 .6em; color: var(--accent); }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.75rem); }
h3 { font-size: 1.05rem; }
[hidden] { display: none !important; }

:root {
	--line: #e6e9ee;
	--muted: #6b7380;
	--soft: #f5f8fb;
	--radius: 12px;
	--shadow: 0 6px 24px rgba(20, 35, 60, .08);
	--ok: #198754;
	--err: #b42318;
}

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; margin-left: auto; margin-right: auto; }
.narrow-sm { max-width: 460px; margin-left: auto; margin-right: auto; }
.section { padding: 36px 16px; }
.center { text-align: center; }
.right { text-align: right; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.fine { font-size: .8rem; color: var(--muted); margin: .6em 0 0; }
.saving { color: var(--ok); }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 8px; top: 8px; z-index: 100; background: #fff; padding: 8px; }
.rich p { margin: 0 0 1em; }
.rich ul { padding-left: 1.2em; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 20px; border: 2px solid var(--brand); border-radius: 999px;
	background: var(--brand); color: #fff; font: 600 1rem var(--font-heading);
	text-decoration: none; cursor: pointer; transition: transform .08s, filter .15s, background .15s;
	min-height: 44px;
}
.btn:hover { filter: brightness(.95); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; min-height: 52px; }
.btn-sm { padding: 6px 12px; min-height: 34px; font-size: .875rem; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--accent); }
.btn-dark { background: var(--accent); border-color: var(--accent); }
.btn-paypal { background: #ffc439; border-color: #ffc439; color: #111; }
.btn-paypal:hover { color: #111; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; background: none; color: var(--accent); cursor: pointer; position: relative; border-radius: 50%; font-size: 1.6rem; text-decoration: none; }
.icon-btn:hover { background: var(--soft); }

/* Forms */
label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 6px; }
input, select, textarea {
	width: 100%; padding: 12px 14px; border: 1px solid #cfd6df; border-radius: 10px;
	font: inherit; background: #fff; color: inherit; min-height: 46px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
input[readonly] { background: var(--soft); }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; }
.row-2, .row-3 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: 1fr 1fr 1fr; }
.notice { background: #eef7fe; border-left: 4px solid var(--brand); padding: 10px 14px; border-radius: 8px; }
.error { background: #fdecea; border-left: 4px solid var(--err); padding: 10px 14px; border-radius: 8px; color: var(--err); }

/* Header */
.announcement { background: var(--accent); color: #fff; text-align: center; font-size: .9rem; padding: 8px 16px; }
.announcement a { color: #fff; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.logo { font: 700 1.4rem var(--font-heading); color: var(--accent); text-decoration: none; margin-right: auto; }
.logo img { max-height: 44px; width: auto; }
.header-search { flex: 1; max-width: 420px; display: flex; position: relative; }
.header-search input { border-radius: 999px; padding-right: 44px; min-height: 42px; }
.header-search button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; width: 36px; height: 36px; color: var(--muted); cursor: pointer; }
.header-actions { display: flex; align-items: center; }
.search-link, .menu-toggle { display: none; }
.cart-badge { position: absolute; top: 4px; right: 2px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.cart-badge:empty { display: none; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav > .wrap > ul > li { position: relative; }
.main-nav a { display: block; padding: 10px 14px; text-decoration: none; color: var(--accent); font-weight: 600; font-size: .95rem; border-radius: 8px; }
.main-nav a:hover { background: var(--soft); color: var(--accent); }
.dropdown { display: none !important; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; min-width: 260px; flex-direction: column; columns: 2; z-index: 40; }
.has-children:hover .dropdown, .has-children:focus-within .dropdown { display: block !important; }
.dropdown a { font-weight: 400; padding: 8px 12px; }

/* Hero */
.hero {
	background: linear-gradient(135deg, rgba(31, 45, 61, .82), rgba(79, 174, 244, .55)), var(--hero-image, linear-gradient(135deg, var(--accent), var(--brand)));
	background-size: cover; background-position: center; color: #fff;
}
.hero-inner { padding: 72px 16px; max-width: 820px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); }
.hero-sub { font-size: 1.15rem; opacity: .95; max-width: 640px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .7); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* Sections and grids */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h1, .section-head h2 { margin: 0; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
.grid-1 { grid-template-columns: minmax(0, 360px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-link { color: inherit; text-decoration: none; display: block; height: 100%; }
.card-media { position: relative; aspect-ratio: 1; background: var(--soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 12px 14px 16px; }
.card-title { font-size: 1rem; margin: 0 0 6px; color: var(--accent); }
.badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge-free { background: var(--ok); }
.price { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.price-now { font-weight: 700; color: var(--accent); }
.price-now.big { font-size: 1.8rem; }
.price-was { color: var(--muted); font-size: .9rem; }

.topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.topic { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--accent); color: #fff; text-decoration: none; aspect-ratio: 4 / 3; }
.topic img { width: 100%; height: 100%; object-fit: cover; opacity: .7; transition: opacity .2s, transform .3s; }
.topic:hover img { opacity: .55; transform: scale(1.04); }
.topic span { position: absolute; left: 12px; right: 12px; bottom: 10px; font: 600 1rem var(--font-heading); text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.topic small { opacity: .8; font-weight: 400; }
.topic:hover { color: #fff; }

.story { background: var(--soft); padding: 48px 0; }
.guarantee { padding-top: 24px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 4px; }
.collection-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.collection-desc { max-width: 720px; color: var(--muted); }
.sort-form { display: flex; align-items: center; gap: 8px; }
.sort-form label { margin: 0; }
.sort-form select { min-width: 190px; }

/* Product page */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.product-media img { border-radius: var(--radius); width: 100%; }
.preview { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.preview-btn { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.preview-text { flex: 1; }
.preview-bar { height: 4px; background: var(--line); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.preview-bar span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .25s linear; }
.product-info h1 { margin-bottom: .3em; }
.rating-link { text-decoration: none; display: inline-block; margin-bottom: 12px; }
.options { border: 0; padding: 0; margin: 16px 0; }
.options legend { font-weight: 600; margin-bottom: 8px; }
.option-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 2px solid var(--line); border-radius: var(--radius); margin: 0 0 10px; cursor: pointer; font-weight: 400; }
.option-card:has(input:checked) { border-color: var(--brand); background: #f3f9fe; }
.option-card input { width: 20px; height: 20px; min-height: 0; flex: 0 0 20px; accent-color: var(--brand); }
.option-main { flex: 1; }
.option-title { display: block; font-weight: 700; color: var(--accent); }
.option-desc { display: block; font-size: .85rem; color: var(--muted); }
.option-price { text-align: right; font-weight: 700; font-size: 1.15rem; color: var(--accent); white-space: nowrap; }
.option-price s { display: block; font-size: .85rem; color: var(--muted); font-weight: 400; }
.buy-buttons { display: grid; gap: 10px; }
.owned { background: var(--soft); padding: 18px; border-radius: var(--radius); display: grid; gap: 10px; margin: 16px 0; }
.owned p { margin: 0; }
.free-form { display: grid; gap: 4px; margin-top: 12px; }
.free-form input { margin-bottom: 8px; }
.guarantee-box { margin-top: 22px; padding: 16px; border: 1px dashed var(--line); border-radius: var(--radius); font-size: .92rem; }
.product-description { margin-top: 40px; }
.sales-video { margin-top: 40px; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.video-frame iframe, .video-frame video, .video-frame > div { position: absolute; inset: 0; width: 100%; height: 100%; }

.stars { --size: 1rem; position: relative; display: inline-block; width: calc(var(--size) * 5); height: var(--size); vertical-align: middle; background: linear-gradient(90deg, #d6dbe2 0 100%); -webkit-mask: repeat-x left / var(--size) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2l3 6.9 7.5.6-5.7 4.9 1.8 7.4L12 17.9 5.4 21.8l1.8-7.4L1.5 9.5 9 8.9z"/></svg>'); mask: repeat-x left / var(--size) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2l3 6.9 7.5.6-5.7 4.9 1.8 7.4L12 17.9 5.4 21.8l1.8-7.4L1.5 9.5 9 8.9z"/></svg>'); }
.stars-fill { position: absolute; inset: 0 auto 0 0; background: #f5a524; }
.review { border-bottom: 1px solid var(--line); padding: 14px 0; }
.review p { margin: 6px 0; }
.verified { color: var(--ok); }
.review-form-wrap summary { list-style: none; margin-top: 16px; }
.review-form-wrap summary::-webkit-details-marker { display: none; }
.review-form { display: grid; gap: 10px; margin-top: 12px; }
.star-input { border: 0; padding: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input legend { width: 100%; font-weight: 600; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.star-input label { font-size: 2rem; color: #d6dbe2; cursor: pointer; margin: 0; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #f5a524; }

/* Cart and checkout */
.cart-layout, .checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.cart-line, .summary-line, .drawer-line { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line img, .summary-line img, .drawer-line img { border-radius: 8px; object-fit: cover; }
.cart-summary { background: var(--soft); padding: 20px; border-radius: var(--radius); position: sticky; top: 90px; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 16px 0; }
.totals dt, .totals dd { margin: 0; }
.totals .grand { font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--line); padding-top: 8px; color: var(--accent); }
.code-form { margin-top: 12px; }
.checkout-form h2 { margin-top: 28px; }
.pay-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.pay-tab { display: flex; gap: 8px; align-items: center; border: 2px solid var(--line); border-radius: 10px; padding: 12px; margin: 0; cursor: pointer; }
.pay-tab:has(input:checked) { border-color: var(--brand); background: #f3f9fe; }
.pay-tab input { width: 18px; min-height: 0; accent-color: var(--brand); }
.checkout-form .btn-lg { margin-top: 20px; }

/* Drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(10, 20, 35, .45); z-index: 60; }
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: #fff; z-index: 61; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(0, 0, 0, .12); }
.cart-drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 1.2rem; }
.drawer-body { padding: 4px 16px 24px; overflow-y: auto; flex: 1; }
.drawer-line-info a { color: inherit; text-decoration: none; }
.drawer-sub { margin-top: 24px; }
.drawer-rec { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; text-decoration: none; color: inherit; }
.drawer-rec img { border-radius: 6px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); background: var(--accent); color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 80; transition: transform .25s; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); }

/* Library and thank-you */
.library-list { display: grid; gap: 10px; margin: 20px 0; }
.library-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.library-item img { border-radius: 8px; object-fit: cover; }
.library-item.is-spent { opacity: .8; }
.library-actions { display: grid; gap: 6px; justify-items: end; }
.progress { height: 4px; background: var(--line); border-radius: 2px; margin-top: 8px; overflow: hidden; max-width: 240px; }
.progress span { display: block; height: 100%; background: var(--brand); }
.thanks-hero { text-align: center; margin-bottom: 20px; }
.thanks-hero svg { margin: 0 auto 12px; display: block; }
.tips { margin-top: 30px; background: var(--soft); padding: 20px; border-radius: var(--radius); }
.search-big { display: flex; gap: 10px; margin-bottom: 20px; }
.search-big input { flex: 1; }

/* Player */
.page-listen { background: linear-gradient(180deg, var(--accent), #0f1721 70%); color: #fff; }
.page-listen .site-footer { display: none; }
.player-page { min-height: calc(100vh - 140px); display: flex; justify-content: center; padding: 24px 16px calc(32px + env(safe-area-inset-bottom)); }
.player-card { width: 100%; max-width: 440px; text-align: center; }
.player-art img { width: min(320px, 78vw); aspect-ratio: 1; object-fit: cover; margin: 8px auto 20px; border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.player-title { color: #fff; font-size: 1.5rem; }
.player-status { color: rgba(255, 255, 255, .75); }
.page-listen .muted { color: rgba(255, 255, 255, .7); }
.player-page a { color: #cfe8fb; }
.page-listen .notice { background: rgba(255, 255, 255, .1); color: #fff; }
.player-page .link-btn { color: #cfe8fb; }
.scrub { margin: 20px 0 8px; }
.scrub input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; padding: 0; min-height: 0; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .25); accent-color: var(--brand); }
.scrub input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.scrub input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 0; }
.times { display: flex; justify-content: space-between; font-size: .85rem; color: rgba(255, 255, 255, .7); margin-top: 6px; font-variant-numeric: tabular-nums; }
.buttons { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 16px 0; }
.round { width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.round-lg { width: 84px; height: 84px; background: #fff; color: var(--accent); }
.safety, .intro-block, .player-done { background: rgba(255, 255, 255, .08); border-radius: var(--radius); padding: 18px; margin: 16px 0; text-align: left; }
.intro-block h2 { color: #fff; }
.player-done .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .4); margin-top: 10px; }

/* Footer */
.site-footer { background: var(--accent); color: rgba(255, 255, 255, .85); margin-top: 48px; padding: 40px 0 24px; font-size: .92rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-brand { font: 700 1.3rem var(--font-heading); color: #fff; margin-bottom: 10px; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 28px; padding-top: 16px; font-size: .8rem; color: rgba(255, 255, 255, .6); }

/* Tablet */
@media (max-width: 980px) {
	.grid, .grid-4 { grid-template-columns: repeat(3, 1fr); }
	.cart-layout, .checkout-layout { grid-template-columns: 1fr; }
	.cart-summary { position: static; }
}

/* Phone */
@media (max-width: 720px) {
	.header-row { min-height: 60px; gap: 4px; }
	.header-search { display: none; }
	.search-link, .menu-toggle { display: inline-flex; }
	.logo { margin: 0 auto; font-size: 1.2rem; }
	.main-nav { display: none; position: fixed; top: 60px; left: 0; right: 0; bottom: 0; background: #fff; overflow-y: auto; z-index: 50; }
	body.menu-open .main-nav { display: block; }
	.main-nav ul { flex-direction: column; padding: 8px 0; }
	.main-nav a { padding: 14px 8px; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
	.dropdown { display: block !important; position: static; border: 0; box-shadow: none; padding: 0 0 0 12px; columns: 1; min-width: 0; }
	.grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.grid-1 { grid-template-columns: 1fr; }
	.card-body { padding: 10px 10px 12px; }
	.card-title { font-size: .92rem; }
	.product-grid { grid-template-columns: 1fr; gap: 20px; }
	.hero-inner { padding: 48px 16px; }
	.section { padding: 28px 16px; }
	.footer-grid { grid-template-columns: 1fr; gap: 20px; }
	.library-item { grid-template-columns: 56px 1fr; }
	.library-item img { width: 56px; height: 56px; }
	.library-actions { grid-column: 1 / -1; justify-items: stretch; }
	.row-3 { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
	.collection-head { flex-direction: column; }
	.sort-form, .sort-form select { width: 100%; }
}

/* Wallet buttons (Apple Pay / Google Pay / PayPal) on checkout */
.wallets { display: grid; gap: 10px; margin: 8px 0 4px; }
.wallets [data-wallet-google] button, .wallets [data-wallet-google] > div { width: 100%; min-height: 48px; }
.wallets apple-pay-button { --apple-pay-button-width: 100%; --apple-pay-button-height: 48px; --apple-pay-button-border-radius: 999px; display: block; }
.divider { margin: 6px 0 0; }
