/*
Theme Name: AIMarketer Pro
Theme URI: https://marketingtoolai.com/
Author: Marketing Tool AI
Description: A clean, developer-grade theme for an AI tools marketplace.
Version: 1.6.1
Text Domain: aimarketer
*/

/* =========================
   Core tokens & base
   ========================= */
:root{
  --am-primary:#5b5ef7;
  --am-bg:#ffffff;
  --am-bg-soft:#f6f7fb;
  --am-dark:#0b1020;
  --am-text:#0f172a;
  --am-muted:#6b7280;
  --radius:16px;
  --shadow:0 12px 30px rgba(2,6,23,.08), 0 2px 10px rgba(2,6,23,.04);
  --header-h:64px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
  color:var(--am-text);
  background:#fafbff;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--am-primary);text-decoration:none}
a:hover{opacity:.92}
.container{width:min(1180px, 100% - 2rem); margin-inline:auto}

/* Buttons */
.btn{display:inline-flex;align-items:center;gap:.5rem;border-radius:10px;font-weight:600;line-height:1;padding:.9rem 1.15rem;border:1px solid transparent;cursor:pointer;transition:.2s background,.2s color,.2s transform}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--am-primary);color:#fff;box-shadow:0 10px 20px rgba(91,94,247,.25)}
.btn-primary:hover{filter:brightness(1.05)}
.btn-ghost{background:#fff;border-color:#e5e7eb;color:#111827}
.btn-ghost:hover{background:#f8fafc}
.btn-small{padding:.6rem .8rem;border-radius:8px;font-size:.9rem}

/* =========================
   Header & nav
   ========================= */
.site-header{position:sticky;top:0;background:rgba(255,255,255,.92);backdrop-filter:saturate(1.2) blur(8px);border-bottom:1px solid #eef0f5;z-index:9999}
.nav{display:flex;align-items:center;gap:1rem;min-height:var(--header-h)}
.brand{display:flex;align-items:center;gap:.6rem;font-weight:800;color:#111827;text-decoration:none}
.brand .logo{width:28px;height:28px;border-radius:8px;background: linear-gradient(135deg,#7c3aed,#5b5ef7 45%, #15c7d1);box-shadow:0 6px 16px rgba(91,94,247,.28)}
.toggle{display:none;margin-left:auto;padding:.45rem .6rem;border-radius:8px;border:1px solid #e5e7eb;background:#fff}
.menu{display:flex;gap:10px;align-items:center;margin-left:auto;list-style:none;padding:0;margin-bottom:0}
.menu > li > a{
  display:inline-block;padding:.55rem .8rem;border-radius:8px;font-weight:600;color:#0b1020;position:relative;transition:color .2s;
}
.menu > li > a:after{content:'';position:absolute;width:0;height:2px;bottom:4px;left:50%;background-color:var(--am-primary);transition:all .3s;transform:translateX(-50%)}
.menu > li > a:hover{color:var(--am-primary)}
.menu > li > a:hover:after,.menu > li.current-menu-item > a:after{width:50%}
.menu > li.current-menu-item > a{color:var(--am-primary)}
a.cta, .cta .btn{margin-left:12px;background:var(--am-primary);color:#fff;border-radius:10px;padding:.55rem .9rem;display:inline-flex;align-items:center}

/* Mobile menu */
@media (max-width:900px){
  .toggle{display:inline-block}
  .menu{
    position:fixed;
    left:0; right:0; top:var(--header-h);
    display:none; flex-direction:column;
    background:#fff; border-top:1px solid #e5e7eb;
    box-shadow:0 18px 30px rgba(2,6,23,.12);
    padding:10px 16px; max-height:calc(100dvh - var(--header-h));
    overflow:auto; z-index:9998;
  }
  .menu.is-open{display:flex}
  .menu > li + li{margin-top:6px}
  .cta{display:none}
}

/* =========================
   Landing hero & sections
   ========================= */
.hero{padding:4rem 0 3rem;background: radial-gradient(900px 360px at 70% -20%, rgba(91,94,247,.08), transparent 70%)}
.hero .eyebrow{margin:0 0 .35rem;color:#64748b;font-weight:600;letter-spacing:.02em}
.hero__wrap{display:grid;grid-template-columns: 1.05fr .95fr;gap:2.5rem;align-items:center}
.hero__content h1{font-size:clamp(2rem, 3.6vw, 3.25rem);line-height:1.12;margin:.35rem 0 1rem;font-weight:900;letter-spacing:-.02em}
.hero .accent{background: linear-gradient(135deg,#7c3aed,#5b5ef7 55%, #15c7d1);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero .lead{font-size:1.06rem;color:#475569;max-width:54ch}
.cta-row{display:flex;gap:.75rem;margin:1.25rem 0 1.25rem}
.hero__points{list-style:none;padding:0;margin:1rem 0 0;display:flex;flex-wrap:wrap;gap:.65rem}
.hero__points li{background:#fff;border:1px solid #e5e7eb;border-radius:999px;padding:.35rem .7rem;font-size:.9rem;color:#0f172a}
.hero__art{position:relative;height:380px}
.hero__img{width:100%;height:100%;object-fit:cover;border-radius:24px;box-shadow:var(--shadow)}
.blob{position:absolute;inset:auto -60px -60px auto;width:220px;height:220px;border-radius:50%;background:radial-gradient(circle at 30% 30%, rgba(91,94,247,.08), transparent 60%);filter:blur(6px)}
.rings{position:absolute;inset:10% 10% auto auto;width:180px;height:180px;border:2px dashed rgba(91,94,247,.25);border-radius:50%}
@media (max-width:980px){ .hero{padding:2rem 0 1rem} .hero__wrap{grid-template-columns: 1fr;gap:1.25rem} .hero__art{height:220px} }

.section{padding:3rem 0}
.section-header{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:1.25rem}
.section-header h2{font-size:clamp(1.4rem,2.4vw,2rem);margin:0}
.section-header p{margin:0;color:#475569;max-width:52ch}

.featured-tools-grid{display:grid;grid-template-columns:repeat(3, minmax(0,1fr));gap:24px}
@media (max-width:1024px){ .featured-tools-grid{grid-template-columns:repeat(2,1fr)} }
@media (max-width:640px){ .featured-tools-grid{grid-template-columns:1fr} }

.tool-card{display:flex;flex-direction:column;border:1px solid #e5e7eb;border-radius:16px;background:#fff;padding:16px;box-shadow:var(--shadow)}
.tool-card__media img{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:12px;margin-bottom:12px;background:#f1f5f9}
.tool-card__title{font-size:1.05rem;line-height:1.3;margin:.25rem 0 .35rem;font-weight:600;color:var(--am-text)}
.tool-card__price{color:#111827;font-weight:600;margin-bottom:.5rem}
.tool-card .btn{margin-top:auto}
.tool-card .button,.tool-card .add_to_cart_button{display:inline-flex;align-items:center;justify-content:center;width:100%;background:var(--am-primary)!important;color:#fff;border:0;border-radius:10px;padding:.7rem 1rem;font-weight:600}

/* Woo grid on home */
.home .woocommerce ul.products{max-width:1180px;margin:0 auto;padding:0;display:grid!important;grid-template-columns:repeat(3, minmax(0,1fr))!important;gap:24px!important;align-items:stretch}
@media (max-width:1024px){ .home .woocommerce ul.products{grid-template-columns:repeat(2,1fr)!important} }
@media (max-width:640px){ .home .woocommerce ul.products{grid-template-columns:1fr!important} }
.home .woocommerce ul.products li.product{display:flex;flex-direction:column;border:1px solid #e5e7eb;border-radius:16px;background:#fff;padding:16px;box-shadow:var(--shadow)}
.home .woocommerce ul.products li.product a img{width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:12px;margin-bottom:12px;background:#f1f5f9}
.home .woocommerce ul.products li.product .button{margin-top:auto;border-radius:10px}

/* Footer */
.site-footer{padding:2.25rem 0;background:var(--am-dark);color:#cbd5e1;text-align:center}
.site-footer a{color:#e2e8f0}

/* Sidebar */
.sidebar{padding:1rem}
.widget{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:1rem;box-shadow:var(--shadow);margin-bottom:1rem}
.widget-title{margin:.25rem 0 1rem;font-size:1.1rem}

/* =========================
   SINGLE PRODUCT — clean, mobile-first
   ========================= */

/* Keep notices/breadcrumb aligned */
body.single-product .woocommerce-breadcrumb,
body.single-product .woocommerce-message,
body.single-product .woocommerce-error,
body.single-product .woocommerce-info{
  max-width:1180px; margin:8px auto; padding-left:clamp(16px,3vw,32px); padding-right:clamp(16px,3vw,32px);
}

/* Main product wrapper: desktop grid, mobile stack */
body.single-product .woocommerce div.product{
  max-width:1180px; margin-inline:auto; padding-inline:clamp(16px,3vw,32px);
  display:grid !important; grid-template-columns:minmax(640px,1fr) minmax(340px,.95fr) !important;
  gap:32px !important; align-items:start !important;
}

/* Kill legacy floats so grid can work */
body.single-product .woocommerce div.product .images,
body.single-product .woocommerce div.product .summary{
  width:auto !important; float:none !important; margin:0 !important;
}

/* Put gallery & buy card in white “cards” */
body.single-product .woocommerce-product-gallery,
body.single-product .summary.entry-summary{
  background:#fff; border:1px solid #e5e7eb; border-radius:16px; padding:14px; box-shadow:var(--shadow);
}

/* Sticky only on wide screens */
@media (min-width:1081px){
  body.single-product .summary.entry-summary{ position:sticky; top:calc(var(--header-h) + 24px); }
}
@media (max-width:1080px){
  body.single-product .woocommerce div.product{
    grid-template-columns:1fr !important; gap:18px !important;
  }
  body.single-product .summary.entry-summary{ position:static !important; top:auto !important; }
}

/* Title & text */
body.single-product .product_title{
  margin:0 0 6px; font-size:clamp(1.4rem,2.2vw,1.9rem); line-height:1.15; letter-spacing:-.01em;
}
body.single-product .woocommerce-product-details__short-description{ color:#475569; }

/* Hide default Woo price if subscription widget shows its own */
body.single-product .summary .price{ display:none !important; }

/* Gallery viewport + thumbs */
body.single-product .flex-viewport{ overflow:hidden; border:1px solid #eef0f5; border-radius:14px; background:#fff; }
body.single-product .woocommerce-product-gallery__image img{
  width:100% !important; height:auto !important; object-fit:contain; display:block; max-height:680px;
}
body.single-product .flex-control-thumbs{
  margin-top:10px !important; display:grid !important; grid-template-columns:repeat(6, minmax(56px,1fr)); gap:8px;
}
@media (max-width:640px){ body.single-product .flex-control-thumbs{ grid-template-columns:repeat(4,1fr); } }
body.single-product .flex-control-thumbs li{ float:none !important; width:auto !important; }
body.single-product .flex-control-thumbs img{
  width:100%; height:84px; object-fit:cover; border:1px solid #e5e7eb; border-radius:10px; background:#fff; opacity:.94; transition:opacity .15s, transform .15s, box-shadow .15s;
}
body.single-product .flex-control-thumbs img:hover{ opacity:1; transform:translateY(-1px); }
body.single-product .flex-control-thumbs img.flex-active{ box-shadow:0 0 0 2px var(--am-primary) inset, 0 0 0 2px var(--am-primary); opacity:1; }

/* Tabs as a full-width card UNDER the grid (prevents overlap) */
body.single-product .woocommerce div.product .woocommerce-tabs{
  grid-column:1 / -1 !important;
  background:#fff; border:1px solid #e5e7eb; border-radius:16px;
  padding:8px 14px; box-shadow:var(--shadow); margin-top:6px !important;
}
body.single-product .woocommerce-tabs ul.tabs{
  border-bottom:1px solid #e5e7eb; margin:0 0 10px; padding-left:0;
}
body.single-product .woocommerce-tabs ul.tabs li{
  background:transparent; border:none; margin:0 18px 0 0; padding:0;
}
body.single-product .woocommerce-tabs ul.tabs li a{
  display:inline-block; padding:12px 2px; font-weight:600; color:#64748b; border-bottom:3px solid transparent;
}
body.single-product .woocommerce-tabs ul.tabs li.active a{
  color:var(--am-primary); border-bottom-color:var(--am-primary);
}
body.single-product .woocommerce-tabs .panel{ padding:10px 0 !important; }
body.single-product .woocommerce-tabs .panel > *{
  max-width:78ch; margin-left:auto; margin-right:auto; line-height:1.7;
}

/* Friendlier type scale inside tab content on phones */
@media (max-width:768px){
  body.single-product .woocommerce-tabs .panel h1{font-size:1.35rem}
  body.single-product .woocommerce-tabs .panel h2{font-size:1.2rem}
  body.single-product .woocommerce-tabs .panel h3{font-size:1.05rem}
}

/* Subscription/plan cards (if present) */
.wsp-box{ border:1px solid #e5e7eb; border-radius:14px; background:#fff; box-shadow:var(--shadow); padding:14px; }
.wsp-plan{ border:1px solid #e5e7eb; background:#f8fafc; border-radius:12px; padding:14px; display:flex; justify-content:space-between; gap:12px; cursor:pointer; }
.wsp-plan + .wsp-plan{ margin-top:10px; }
.wsp-plan:has(input:checked){ border-color:var(--am-primary); box-shadow:0 0 0 2px var(--am-primary); }
.wsp-cta{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px; }

/* Single add-to-cart button harmony */
.single-product .single_add_to_cart_button{
  background:var(--am-primary); border:none; border-radius:10px; font-weight:700;
  padding:.9rem 1.1rem; box-shadow:0 10px 20px rgba(91,94,247,.25);
}
.single-product .single_add_to_cart_button:hover{ filter:brightness(1.05); }
/* --- FIX: Our AI Tool Solutions cards (restore layout) --- */
.home .solutions{background:linear-gradient(180deg,#ffffff 0%, #f6f7fb 100%);border-top:1px solid #eef0f5;border-bottom:1px solid #eef0f5;padding:3rem 0;}
.home .solutions .sol-grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:24px !important;
  margin:0 !important;
  padding:0 !important;
}
@media (max-width:1024px){
  .home .solutions .sol-grid{grid-template-columns:repeat(2,1fr) !important;}
}
@media (max-width:640px){
  .home .solutions .sol-grid{grid-template-columns:1fr !important;}
}

/* Card */
.home .solutions .sol-card{
  display:flex !important;
  align-items:flex-start !important;
  gap:14px !important;
  padding:16px !important;
  border:1px solid #e5e7eb !important;
  border-radius:16px !important;
  background:#fff !important;
  box-shadow:0 12px 30px rgba(2,6,23,.08), 0 2px 10px rgba(2,6,23,.04) !important;
  color:inherit !important;
  text-decoration:none !important;
}

/* Icon pill */
.home .solutions .sol-card .icon{
  flex:0 0 44px !important;
  width:44px !important;
  height:44px !important;
  border-radius:12px !important;
  display:grid !important;
  place-items:center !important;
  font-size:22px !important;
  line-height:1 !important;
  background:linear-gradient(135deg,#7c3aed,#5b5ef7 55%,#15c7d1) !important;
  color:#fff !important;
}

/* Copy */
.home .solutions .sol-card h3{
  margin:.1rem 0 .2rem !important;
  font-size:1.05rem !important;
  font-weight:700 !important;
  color:#0f172a !important;
}
.home .solutions .sol-card p{
  margin:0 !important;
  color:#475569 !important;
  font-size:.95rem !important;
}
.home .solutions .sol-card .more{
  display:inline-block !important;
  margin-top:.45rem !important;
  font-weight:600 !important;
  color:var(--am-primary) !important;
}
