/* cf-store default theme. Colors, fonts, radius and grid size come from CSS variables that the
   admin panel's theme editor sets; add your own CSS under Appearance → Theme → Custom CSS. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg) var(--bg-image) center top / cover fixed no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-top: 28px; padding-bottom: 56px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.layout-sidebar-left .content-grid { grid-template-columns: 300px minmax(0, 1fr); }
.layout-sidebar-left .sidebar { order: -1; }
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 76px; }
@media (max-width: 960px) {
  .content-grid, .layout-sidebar-left .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; order: 2 !important; }
}

/* ---------------------------------------------------------------- test banner */
.test-banner { background: repeating-linear-gradient(45deg, #f5b301, #f5b301 12px, #e0a300 12px, #e0a300 24px); color: #1a1300; text-align: center; font-weight: 700; padding: 6px 12px; font-size: 13px; }

/* ---------------------------------------------------------------- header */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 25%, transparent), var(--bg)),
    var(--hero-image, radial-gradient(1200px 400px at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent)),
    var(--surface);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
}
.hero-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; min-height: 180px; padding-top: 24px; padding-bottom: 24px; }
.brand-hero img { max-height: 120px; width: auto; filter: drop-shadow(0 8px 24px rgba(0,0,0,.45)); transition: transform .3s; }
.brand-hero:hover img { transform: scale(1.04) rotate(-1deg); }
.brand-hero .brand-text { font-size: clamp(1.8rem, 4vw, 3rem); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { max-height: 40px; }
.brand-text { font-family: var(--font-heading); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.hero-account { justify-self: end; }
.server-ip { justify-self: start; display: inline-flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--border); color: var(--text); padding: 10px 14px; border-radius: var(--radius); cursor: pointer; font: inherit; backdrop-filter: blur(8px); transition: border-color .2s; }
.server-ip:hover { border-color: var(--accent); }
.server-ip .ip { font-weight: 700; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.dot.live { background: var(--success); box-shadow: 0 0 0 0 var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; min-height: 0; }
  .server-ip, .hero-account { justify-self: center; }
  .brand-hero { order: -1; }
}

.navbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav-links > li { position: relative; }
.nav-links a { display: block; color: var(--muted); padding: 8px 12px; border-radius: calc(var(--radius) - 4px); font-weight: 600; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); text-decoration: none; }
.dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 200px; list-style: none; padding: 6px; margin: 4px 0 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.has-children:hover .dropdown, .has-children:focus-within .dropdown { display: block; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 6px 10px; font-size: 18px; cursor: pointer; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 16px 16px; }
  .nav-links.open { display: flex; }
  .dropdown { position: static; display: block; border: 0; box-shadow: none; padding-left: 12px; }
  .basket-btn span:not(.badge) { display: none; }
}

/* ---------------------------------------------------------------- buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: calc(var(--radius) - 2px); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: transform .08s, background .2s, border-color .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn-disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); box-shadow: 0 6px 18px -8px var(--accent); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: .85em; padding: 0; }
.badge { background: var(--accent-text); color: var(--accent); border-radius: 999px; font-size: 12px; min-width: 20px; padding: 0 6px; line-height: 20px; text-align: center; }
.input { width: 100%; padding: 10px 12px; border-radius: calc(var(--radius) - 4px); border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.form-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
.form-row .field-gift:only-child { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; font-size: 14px; }
.inline-form { display: flex; gap: 8px; }
.inline-form .input { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- cards + sections */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.section { margin-bottom: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.welcome { margin-bottom: 32px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface) 60%); }
.prose p:last-child { margin-bottom: 0; }
.prose ul { padding-left: 1.2em; }
.empty { text-align: center; padding: 48px 20px; }
.notice { background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.notice-warn { border-left-color: var(--danger); }
.breadcrumbs { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.breadcrumbs span { margin: 0 6px; opacity: .6; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.tag-warn { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.tag-sale { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); margin-left: 8px; }

/* ---------------------------------------------------------------- icons (images + Minecraft textures) */
.icon { display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: calc(var(--radius) - 4px); position: relative; overflow: hidden; }
.icon > img { width: 100%; height: 100%; object-fit: contain; }
.icon.tex { image-rendering: var(--icon-rendering); }
.icon.tex > img { grid-area: 1 / 1; width: 100%; height: 100%; image-rendering: var(--icon-rendering); object-fit: cover; object-position: top; aspect-ratio: 1; }
.icon.placeholder { background: var(--surface-2); color: var(--muted); }
.icon-sm { width: 40px; height: 40px; }
.icon-md { width: 56px; height: 56px; }
.icon-lg { width: 96px; height: 96px; }
.icon-xl { width: 180px; height: 180px; }
.icon.tex.icon-lg, .icon.tex.icon-xl { filter: drop-shadow(0 10px 18px rgba(0,0,0,.4)); }

/* ---------------------------------------------------------------- package grid + cards */
.package-grid { display: grid; grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .package-grid { grid-template-columns: repeat(min(var(--grid-cols), 2), minmax(0, 1fr)); } }
@media (max-width: 560px) { .package-grid { grid-template-columns: 1fr; } }
.package-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.package-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 16px 40px -20px color-mix(in srgb, var(--accent) 60%, transparent); }
.package-card.featured { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.package-card.sold-out { opacity: .6; }
.package-media { display: grid; place-items: center; padding: 26px 16px 10px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 14%, transparent), transparent); }
.package-card:hover .icon-lg { transform: scale(1.07); }
.package-card .icon-lg { transition: transform .25s; }
.package-body { padding: 4px 18px 0; flex: 1; text-align: center; }
.package-name { margin-bottom: 6px; font-size: 1.05rem; }
.package-name a { color: var(--text); }
.package-desc { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
.package-meta { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.package-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 18px; }
.ribbon { position: absolute; top: 12px; right: -34px; transform: rotate(45deg); background: var(--danger); color: #fff; font-weight: 800; font-size: 12px; padding: 4px 40px; z-index: 1; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price-now { font-weight: 800; font-size: 1.15rem; }
.price-was { color: var(--muted); font-size: .9rem; }
.price-from { color: var(--muted); font-size: .8rem; }
.price-lg .price-now { font-size: 1.8rem; }

.package-list { display: flex; flex-direction: column; gap: 10px; }
.package-list .package-card { flex-direction: row; align-items: center; }
.package-list .package-media { padding: 12px; background: none; }
.package-list .package-media .icon-lg { width: 64px; height: 64px; }
.package-list .package-body { text-align: left; padding: 12px 0; }
.package-list .package-meta { justify-content: flex-start; margin: 0; }
.package-list .package-footer { padding: 12px 18px; }
@media (max-width: 560px) { .package-list .package-card { flex-wrap: wrap; } }

.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.subcategories { margin-bottom: 20px; }
.category-tile { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: border-color .2s, transform .2s; }
.category-tile:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.category-tile div { display: flex; flex-direction: column; flex: 1; }
.category-tile .arrow { color: var(--muted); transition: transform .2s; }
.category-tile:hover .arrow { transform: translateX(3px); color: var(--accent); }
.category-desc { margin-bottom: 18px; color: var(--muted); }

/* ---------------------------------------------------------------- package page */
.package-page { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; margin-bottom: 20px; }
.package-page-media { display: grid; place-items: center; padding: 24px; border-radius: var(--radius); background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 18%, transparent), var(--surface-2)); aspect-ratio: 1; }
.package-page .price { margin-bottom: 18px; }
.package-description { margin-top: 0; }
@media (max-width: 720px) {
  .package-page { grid-template-columns: 1fr; }
  .package-page-media { max-width: 260px; margin: 0 auto; }
  .form-row { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- widgets */
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.widget-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.progress { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #fff)); border-radius: 999px; transition: width 1s ease; position: relative; }
.progress-bar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shine 2.4s infinite; }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.goal-numbers { margin: 10px 0 0; }
.top-donor { display: flex; align-items: center; gap: 12px; position: relative; }
.top-donor img { border-radius: 10px; image-rendering: pixelated; }
.top-donor div { display: flex; flex-direction: column; }
.crown { position: absolute; right: 0; top: -6px; font-size: 28px; color: var(--accent); text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 60%, transparent); }
.recent-list, .server-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.recent-list li { display: flex; align-items: center; gap: 10px; }
.recent-list img { border-radius: 6px; image-rendering: pixelated; }
.recent-list div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.recent-list .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-list li { display: flex; align-items: center; gap: 8px; }
.server-list .muted { margin-left: auto; font-size: 13px; }

/* ---------------------------------------------------------------- checkout */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }
.basket-user { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.basket-user img { border-radius: 8px; image-rendering: pixelated; }
.basket-user div { display: flex; flex-direction: column; flex: 1; }
.basket-line { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.basket-line:last-child { border-bottom: 0; }
.basket-line-info { flex: 1; min-width: 0; }
.basket-line-info a { color: var(--text); }
.basket-line-total { min-width: 80px; text-align: right; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty span { min-width: 24px; text-align: center; font-weight: 700; }
.summary { position: sticky; top: 76px; }
.totals { margin: 18px 0; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.totals dt, .totals dd { margin: 0; }
.totals .discount dd { color: var(--success); }
.totals .grand { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px; font-size: 1.2rem; font-weight: 800; }
.secure { text-align: center; margin: 12px 0 0; }
.thanks { text-align: center; max-width: 640px; margin: 0 auto; }
.thanks-avatar { border-radius: 16px; image-rendering: pixelated; margin-bottom: 12px; }
.thanks-items { list-style: none; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 6px; font-weight: 600; }

/* ---------------------------------------------------------------- modal + toasts */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); animation: fade .2s; }
.modal-card { position: relative; width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; animation: pop .25s cubic-bezier(.2,1.4,.4,1); }
.modal-close { position: absolute; right: 12px; top: 10px; background: none; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; }
.login-preview { display: flex; gap: 12px; align-items: center; margin: 18px 0; }
.login-preview img { border-radius: 10px; image-rendering: pixelated; flex: none; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 40px); }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--success); padding: 12px 16px; border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0,0,0,.4); animation: slide .3s; max-width: 360px; }
.toast.error { border-left-color: var(--danger); }
@keyframes slide { from { opacity: 0; transform: translateY(10px); } }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 28px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.footer-inner p { margin: 4px 0 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
