/*
Theme Name: AI Creators Market
Author: AI Creators
Description: Fast, responsive WordPress theme for an AI creators marketplace, prompt catalog and WooCommerce store.
Version: 0.1.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: ai-creators-market
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: e-commerce, blog, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --acm-bg: #08090d;
  --acm-surface: #101219;
  --acm-card: #151821;
  --acm-text: #f7f8fc;
  --acm-muted: #a7adbd;
  --acm-primary: #8b5cf6;
  --acm-secondary: #22d3ee;
  --acm-border: #282c38;
  --acm-success: #34d399;
  --acm-danger: #fb7185;
  --acm-radius-sm: 12px;
  --acm-radius: 18px;
  --acm-radius-lg: 28px;
  --acm-shadow: 0 24px 70px rgba(0,0,0,.28);
  --acm-container: 1240px;
  --acm-header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--acm-bg);
  color: var(--acm-text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--acm-secondary); }
button, input, textarea, select { font: inherit; }
button, input[type="submit"] { cursor: pointer; }
::selection { background: var(--acm-primary); color: #fff; }

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
  width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus, .skip-link:focus {
  clip: auto !important; clip-path: none; height: auto; width: auto;
  left: 16px; top: 16px; z-index: 99999; padding: 12px 16px;
  background: #fff; color: #111; border-radius: 10px;
}
:focus-visible { outline: 3px solid color-mix(in srgb, var(--acm-secondary) 75%, white); outline-offset: 3px; }

.acm-container { width: min(calc(100% - 40px), var(--acm-container)); margin-inline: auto; }
.acm-narrow { width: min(calc(100% - 40px), 860px); margin-inline: auto; }
.acm-section { padding: clamp(64px, 8vw, 112px) 0; }
.acm-section--compact { padding: clamp(40px, 6vw, 72px) 0; }

.site-header {
  position: sticky; top: 0; z-index: 1000;
  min-height: var(--acm-header-h);
  border-bottom: 1px solid color-mix(in srgb, var(--acm-border) 85%, transparent);
  background: color-mix(in srgb, var(--acm-bg) 82%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.admin-bar .site-header { top: 32px; }
.site-header__inner { min-height: var(--acm-header-h); display: flex; align-items: center; gap: 24px; }
.site-branding { display: flex; align-items: center; gap: 12px; min-width: 0; }
.site-branding .custom-logo { width: auto; max-height: 42px; }
.site-title { margin: 0; font-size: 1.05rem; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.site-title a { text-decoration: none; color: var(--acm-text); }
.site-description { display: none; }
.primary-navigation { margin-left: auto; }
.primary-navigation ul { list-style: none; display: flex; align-items: center; gap: 6px; padding: 0; margin: 0; }
.primary-navigation a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--acm-muted); font-weight: 650; font-size: .95rem; }
.primary-navigation a:hover, .primary-navigation .current-menu-item > a { color: var(--acm-text); background: var(--acm-surface); }
.primary-navigation li { position: relative; }
.primary-navigation .sub-menu { position:absolute; top:100%; left:0; min-width:210px; display:block; opacity:0; visibility:hidden; transform:translateY(8px); padding:8px; border:1px solid var(--acm-border); border-radius:14px; background:var(--acm-surface); box-shadow:var(--acm-shadow); transition:.2s ease; }
.primary-navigation li:hover > .sub-menu, .primary-navigation li:focus-within > .sub-menu { opacity:1; visibility:visible; transform:none; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; appearance: none; border: 1px solid var(--acm-border); background: var(--acm-surface); color: var(--acm-text); border-radius: 12px; width: 44px; height: 44px; padding: 0; }
.menu-toggle__lines, .menu-toggle__lines::before, .menu-toggle__lines::after { width: 20px; height: 2px; display: block; background: currentColor; margin: auto; position: relative; transition: .2s ease; }
.menu-toggle__lines::before, .menu-toggle__lines::after { content: ""; position: absolute; left: 0; }
.menu-toggle__lines::before { top: -6px; }
.menu-toggle__lines::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines::after { transform: translateY(-6px) rotate(-45deg); }

.acm-button, .wp-element-button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px;
  background: linear-gradient(135deg, var(--acm-primary), color-mix(in srgb, var(--acm-primary) 70%, var(--acm-secondary)));
  color: #fff !important; font-weight: 800; text-decoration: none; line-height: 1.2;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--acm-primary) 24%, transparent);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.acm-button:hover, .wp-element-button:hover { transform: translateY(-2px); filter: brightness(1.06); color: #fff; }
.acm-button--ghost { background: var(--acm-surface); color: var(--acm-text) !important; border-color: var(--acm-border); box-shadow: none; }
.acm-button--small { min-height: 40px; padding-inline: 15px; font-size: .9rem; }

.acm-hero { position: relative; overflow: hidden; padding: clamp(72px, 10vw, 140px) 0 clamp(64px, 9vw, 118px); isolation: isolate; }
.acm-hero::before {
  content: ""; position: absolute; inset: -30%; z-index: -2;
  background:
    radial-gradient(circle at 28% 28%, color-mix(in srgb, var(--acm-primary) 30%, transparent), transparent 28%),
    radial-gradient(circle at 74% 20%, color-mix(in srgb, var(--acm-secondary) 22%, transparent), transparent 26%);
  filter: blur(18px);
}
.acm-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .18;
  background-image: linear-gradient(var(--acm-border) 1px, transparent 1px), linear-gradient(90deg, var(--acm-border) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 90%); mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 90%);
}
.acm-hero__inner { max-width: 920px; margin: 0 auto; text-align: center; }
.acm-kicker { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 20px; padding: 8px 12px; border: 1px solid var(--acm-border); border-radius: 999px; background: color-mix(in srgb, var(--acm-surface) 86%, transparent); color: var(--acm-muted); font-size: .85rem; font-weight: 750; }
.acm-kicker__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acm-success); box-shadow: 0 0 0 5px color-mix(in srgb, var(--acm-success) 16%, transparent); }
.acm-hero h1 { margin: 0; font-size: clamp(2.65rem, 7vw, 6rem); line-height: .99; letter-spacing: -.065em; font-weight: 900; text-wrap: balance; }
.acm-gradient-text { background: linear-gradient(100deg, var(--acm-text) 10%, var(--acm-secondary) 50%, #d8b4fe 78%, var(--acm-text)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.acm-hero__lead { max-width: 730px; margin: 24px auto 0; color: var(--acm-muted); font-size: clamp(1.05rem, 2vw, 1.24rem); text-wrap: balance; }
.acm-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.acm-hero__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 28px; color: var(--acm-muted); font-size: .9rem; }
.acm-hero__meta span::before { content: "✓"; color: var(--acm-success); margin-right: 7px; font-weight: 900; }

.acm-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.acm-section-heading__copy { max-width: 700px; }
.acm-eyebrow { margin: 0 0 8px; color: var(--acm-secondary); text-transform: uppercase; letter-spacing: .13em; font-size: .75rem; font-weight: 900; }
.acm-section-heading h2, .entry-title, .page-title { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.08; letter-spacing: -.045em; }
.acm-section-heading p { margin: 12px 0 0; color: var(--acm-muted); }

.acm-models { display: flex; flex-wrap: wrap; gap: 10px; }
.acm-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 13px; border: 1px solid var(--acm-border); border-radius: 999px; background: var(--acm-surface); color: var(--acm-text); text-decoration: none; font-size: .9rem; font-weight: 720; }
.acm-chip:hover { border-color: color-mix(in srgb, var(--acm-primary) 55%, var(--acm-border)); background: color-mix(in srgb, var(--acm-primary) 12%, var(--acm-surface)); }
.acm-chip__icon { width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(135deg, var(--acm-primary), var(--acm-secondary)); }

.acm-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.acm-card { overflow: hidden; border: 1px solid var(--acm-border); border-radius: var(--acm-radius); background: var(--acm-card); box-shadow: 0 1px 0 rgba(255,255,255,.02) inset; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.acm-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--acm-primary) 46%, var(--acm-border)); box-shadow: var(--acm-shadow); }
.acm-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, color-mix(in srgb, var(--acm-primary) 16%, var(--acm-surface)), color-mix(in srgb, var(--acm-secondary) 11%, var(--acm-surface))); position: relative; }
.acm-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.acm-card:hover .acm-card__media img { transform: scale(1.035); }
.acm-card__placeholder { height: 100%; display: grid; place-items: center; font-size: 3rem; font-weight: 900; color: color-mix(in srgb, var(--acm-primary) 62%, white); }
.acm-card__body { padding: 18px; }
.acm-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--acm-muted); font-size: .78rem; margin-bottom: 8px; }
.acm-card__title { margin: 0; font-size: 1.08rem; line-height: 1.35; letter-spacing: -.02em; }
.acm-card__title a { text-decoration: none; }
.acm-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 17px; }
.acm-price { font-size: 1rem; font-weight: 900; }
.acm-rating { color: #fbbf24; font-size: .84rem; }

.acm-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.acm-feature { padding: 25px; border: 1px solid var(--acm-border); border-radius: var(--acm-radius); background: linear-gradient(180deg, color-mix(in srgb, var(--acm-surface) 95%, white 1%), var(--acm-surface)); }
.acm-feature__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; margin-bottom: 18px; background: color-mix(in srgb, var(--acm-primary) 16%, var(--acm-bg)); border: 1px solid color-mix(in srgb, var(--acm-primary) 35%, var(--acm-border)); font-size: 1.25rem; }
.acm-feature h3 { margin: 0 0 8px; font-size: 1.1rem; }
.acm-feature p { margin: 0; color: var(--acm-muted); }

.acm-cta { position: relative; overflow: hidden; padding: clamp(32px,5vw,56px); border: 1px solid color-mix(in srgb, var(--acm-primary) 38%, var(--acm-border)); border-radius: var(--acm-radius-lg); background: linear-gradient(135deg, color-mix(in srgb, var(--acm-primary) 20%, var(--acm-surface)), var(--acm-surface) 48%, color-mix(in srgb, var(--acm-secondary) 12%, var(--acm-surface))); }
.acm-cta::after { content:""; position:absolute; width:260px; height:260px; right:-70px; top:-100px; border-radius:50%; background: var(--acm-secondary); filter: blur(100px); opacity:.13; }
.acm-cta__inner { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.acm-cta h2 { margin: 0; max-width: 760px; font-size: clamp(1.9rem, 4vw, 3.4rem); line-height: 1.05; letter-spacing: -.045em; }
.acm-cta p { margin: 12px 0 0; color: var(--acm-muted); max-width: 720px; }

.site-main { min-height: 50vh; }
.content-area { padding: clamp(54px,8vw,92px) 0; }
.entry-header { margin-bottom: 28px; }
.entry-meta { color: var(--acm-muted); font-size: .9rem; margin-top: 10px; }
.entry-content { font-size: 1.05rem; }
.entry-content > * { max-width: 780px; margin-left: auto; margin-right: auto; }
.entry-content > .alignwide { max-width: 1160px; }
.entry-content > .alignfull { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); }
.entry-content h2, .entry-content h3, .entry-content h4 { line-height: 1.2; letter-spacing: -.03em; margin-top: 1.8em; }
.entry-content a:not(.wp-element-button) { color: var(--acm-secondary); }
.entry-content pre, .entry-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.entry-content pre { overflow:auto; padding:18px; border:1px solid var(--acm-border); border-radius:14px; background:var(--acm-surface); }
blockquote { margin: 2em auto; padding: 18px 22px; border-left: 3px solid var(--acm-primary); background: var(--acm-surface); border-radius: 0 14px 14px 0; color: var(--acm-muted); }

.posts-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.post-card { border:1px solid var(--acm-border); border-radius:var(--acm-radius); background:var(--acm-card); overflow:hidden; }
.post-card__image { aspect-ratio:16/10; overflow:hidden; background:var(--acm-surface); }
.post-card__image img { width:100%; height:100%; object-fit:cover; }
.post-card__body { padding:20px; }
.post-card__title { margin:0; font-size:1.2rem; line-height:1.3; }
.post-card__title a { text-decoration:none; }
.post-card__excerpt { color:var(--acm-muted); font-size:.95rem; }
.navigation.pagination { margin-top:42px; }
.nav-links { display:flex; flex-wrap:wrap; gap:8px; }
.page-numbers { min-width:40px; min-height:40px; display:grid; place-items:center; padding:6px 10px; border:1px solid var(--acm-border); border-radius:10px; background:var(--acm-surface); text-decoration:none; }
.page-numbers.current { background:var(--acm-primary); color:#fff; border-color:var(--acm-primary); }

.search-form { display:flex; gap:8px; }
.search-form label { flex:1; }
.search-field, input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], input[type="number"], textarea, select {
  width:100%; min-height:46px; border:1px solid var(--acm-border); border-radius:12px; background:var(--acm-surface); color:var(--acm-text); padding:10px 13px;
}
textarea { min-height:150px; resize:vertical; }
.search-submit, input[type="submit"] { border:0; border-radius:12px; background:var(--acm-primary); color:#fff; padding:10px 16px; font-weight:800; }

.comments-area { width:min(calc(100% - 40px),860px); margin:50px auto 0; }
.comment-list { list-style:none; padding:0; }
.comment-body { padding:20px; margin:14px 0; border:1px solid var(--acm-border); border-radius:14px; background:var(--acm-surface); }

.site-footer { border-top:1px solid var(--acm-border); background:color-mix(in srgb, var(--acm-surface) 58%, var(--acm-bg)); }
.site-footer__top { display:grid; grid-template-columns:1.2fr repeat(3,1fr); gap:36px; padding:58px 0 42px; }
.footer-brand { max-width:360px; }
.footer-brand__title { margin:0 0 12px; font-size:1.1rem; font-weight:900; }
.footer-brand p, .site-footer a, .footer-widget { color:var(--acm-muted); }
.footer-widget-title { color:var(--acm-text); font-size:.9rem; margin:0 0 14px; text-transform:uppercase; letter-spacing:.08em; }
.footer-widget ul { list-style:none; margin:0; padding:0; }
.footer-widget li + li { margin-top:7px; }
.footer-widget a { text-decoration:none; }
.site-footer__bottom { display:flex; justify-content:space-between; gap:20px; padding:22px 0; border-top:1px solid var(--acm-border); color:var(--acm-muted); font-size:.86rem; }
.footer-menu { display:flex; flex-wrap:wrap; gap:15px; list-style:none; padding:0; margin:0; }
.footer-menu a { text-decoration:none; }

/* WooCommerce baseline */
.woocommerce .woocommerce-breadcrumb { color:var(--acm-muted); margin-bottom:20px; }
.woocommerce .woocommerce-breadcrumb a { color:var(--acm-muted); }
.woocommerce ul.products { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; margin:0; padding:0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display:none; }
.woocommerce ul.products li.product { width:auto !important; margin:0 !important; float:none !important; padding:0 0 18px; overflow:hidden; border:1px solid var(--acm-border); border-radius:var(--acm-radius); background:var(--acm-card); }
.woocommerce ul.products li.product a img { margin:0 0 16px; aspect-ratio:4/3; object-fit:cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title, .woocommerce ul.products li.product .price, .woocommerce ul.products li.product .star-rating { margin-left:16px; margin-right:16px; }
.woocommerce ul.products li.product .button { margin:14px 16px 0; }
.woocommerce ul.products li.product .price { color:var(--acm-text); font-weight:900; }
.woocommerce span.onsale { min-width:auto; min-height:auto; line-height:1; padding:8px 10px; border-radius:999px; background:var(--acm-primary); }
.woocommerce div.product { padding:clamp(40px,6vw,80px) 0; }
.woocommerce div.product .product_title { letter-spacing:-.04em; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color:var(--acm-text); font-weight:900; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { background:var(--acm-surface); color:var(--acm-text); border-radius:12px; border-top-color:var(--acm-primary); }
.woocommerce table.shop_table { border-color:var(--acm-border); border-radius:14px; }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { border-color:var(--acm-border); }
.woocommerce-cart .cart-collaterals .cart_totals, .woocommerce-checkout-review-order, .woocommerce form.checkout_coupon, .woocommerce form.login, .woocommerce form.register { padding:22px; border:1px solid var(--acm-border); border-radius:var(--acm-radius); background:var(--acm-surface); }
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style:none; padding:0; margin:0; border:1px solid var(--acm-border); border-radius:14px; overflow:hidden; }
.woocommerce-account .woocommerce-MyAccount-navigation li a { display:block; padding:12px 15px; text-decoration:none; border-bottom:1px solid var(--acm-border); }
.woocommerce-account .woocommerce-MyAccount-navigation li:last-child a { border-bottom:0; }

@media (max-width: 1024px) {
  .acm-grid, .woocommerce ul.products { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .site-footer__top { grid-template-columns: 1.4fr repeat(2,1fr); }
  .site-footer__top .footer-widget:last-child { grid-column:2 / -1; }
}

@media (max-width: 820px) {
  :root { --acm-header-h: 68px; }
  .admin-bar .site-header { top:46px; }
  .header-actions .acm-button { display:none; }
  .menu-toggle { display:block; margin-left:auto; }
  .primary-navigation {
    position:absolute; left:20px; right:20px; top:calc(100% + 8px); margin:0;
    opacity:0; visibility:hidden; transform:translateY(-8px); pointer-events:none;
    border:1px solid var(--acm-border); border-radius:16px; background:var(--acm-surface); box-shadow:var(--acm-shadow); padding:10px;
    transition:.2s ease;
  }
  .primary-navigation.is-open { opacity:1; visibility:visible; transform:none; pointer-events:auto; }
  .primary-navigation ul { display:block; }
  .primary-navigation .sub-menu { position:static; min-width:0; opacity:1; visibility:visible; transform:none; border:0; box-shadow:none; padding:0 0 0 12px; background:transparent; }
  .primary-navigation a { padding:12px; }
  .acm-grid, .woocommerce ul.products { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .acm-feature-grid, .posts-grid { grid-template-columns:1fr 1fr; }
  .acm-cta__inner { display:block; }
  .acm-cta .acm-button { margin-top:22px; }
  .site-footer__top { grid-template-columns:1fr 1fr; }
  .site-footer__top .footer-brand { grid-column:1/-1; }
  .site-footer__top .footer-widget:last-child { grid-column:auto; }
}

@media (max-width: 600px) {
  .acm-container, .acm-narrow { width:min(calc(100% - 28px),var(--acm-container)); }
  .site-header__inner { gap:12px; }
  .site-branding .custom-logo { max-height:36px; max-width:180px; }
  .acm-hero { padding-top:64px; }
  .acm-hero h1 { font-size:clamp(2.5rem,15vw,4.2rem); }
  .acm-hero__actions { flex-direction:column; align-items:stretch; }
  .acm-hero__actions .acm-button { width:100%; }
  .acm-section-heading { display:block; }
  .acm-section-heading > .acm-button { margin-top:18px; }
  .acm-grid, .woocommerce ul.products, .acm-feature-grid, .posts-grid { grid-template-columns:1fr; }
  .acm-card__media { aspect-ratio:16/11; }
  .site-footer__top { grid-template-columns:1fr; gap:26px; }
  .site-footer__top .footer-brand, .site-footer__top .footer-widget:last-child { grid-column:auto; }
  .site-footer__bottom { display:block; }
  .footer-menu { margin-top:10px; }
  .woocommerce div.product .woocommerce-tabs ul.tabs { display:flex; overflow-x:auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}
