/* =============================================
   AlphaGen Codes — Global Dark Theme Styles
   Matches alphagen.codes frontend aesthetic
   ============================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --ag-bg:          #181820;
  --ag-surface:     #1e1e2c;
  --ag-card:        #222233;
  --ag-border:      rgba(255, 255, 255, 0.08);
  --ag-border-hover:rgba(99, 102, 241, 0.4);
  --ag-text:        #e0e0f5;
  --ag-muted:       #7a7a9e;
  --ag-accent:      #6366f1;
  --ag-accent-2:    #818cf8;
  --ag-accent-glow: rgba(99, 102, 241, 0.25);
  --ag-white:       #ffffff;
  --ag-radius:      0.75rem;
  --ag-radius-lg:   1.25rem;
}

/* --- Base Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--ag-bg) !important;
  color: var(--ag-text) !important;
  font-family: 'Manrope', 'Inter', system-ui, sans-serif !important;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--ag-white) !important;
  font-family: 'Manrope', 'Inter', sans-serif !important;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }

p { color: var(--ag-text); }

a {
  color: var(--ag-accent-2);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--ag-accent); }

/* --- Footer --- */
.wp-block-template-part[data-wp-context*="footer"] .wp-block-group.alignfull,
footer .wp-block-group.alignfull,
.site-footer {
  background-color: #13131e !important;
}

/* Footer link hover — CSS fallback for browsers that ignore inline onmouseover */
.wp-block-template-part[data-wp-context*="footer"] a:hover,
footer a:hover {
  color: #818cf8 !important;
}

/* Footer column headings */
.wp-block-template-part[data-wp-context*="footer"] h6,
footer h6 {
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: #e0e0f5 !important;
}

/* Footer list items — remove any WP default list styles */
.wp-block-template-part[data-wp-context*="footer"] ul,
footer ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Footer dynamic product links */
.ag-footer-link {
  color: #7a7a9e;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.ag-footer-link:hover {
  color: #818cf8 !important;
}

/* Mobile footer — stack columns */
@media (max-width: 640px) {
  .wp-block-template-part[data-wp-context*="footer"] .wp-block-columns,
  footer .wp-block-columns {
    flex-direction: column !important;
  }
  .wp-block-template-part[data-wp-context*="footer"] .wp-block-column,
  footer .wp-block-column {
    flex-basis: 100% !important;
    width: 100% !important;
  }
}

/* --- Site Header --- */
.wp-block-template-part[data-wp-context*="header"],
header.wp-block-template-part,
.site-header,
#masthead {
  background-color: rgba(24, 24, 32, 0.92) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ag-border) !important;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* --- Navigation --- */
.wp-block-navigation,
.wp-block-navigation__container {
  color: var(--ag-text) !important;
}

.wp-block-navigation-item a,
.wp-block-navigation__container a {
  color: var(--ag-text) !important;
  font-weight: 500;
  padding: 0.5rem 0.75rem !important;
  border-radius: 0.375rem;
  transition: color 0.2s, background-color 0.2s;
}

.wp-block-navigation-item a:hover {
  color: var(--ag-white) !important;
  background-color: rgba(255,255,255,0.06) !important;
  text-decoration: none !important;
}

/* Site title / logo */
.wp-block-site-title a,
.wp-block-site-logo a {
  color: var(--ag-white) !important;
  text-decoration: none !important;
}

/* --- Hero / Banner Section --- */
.wp-block-cover,
.hero-section {
  background-color: var(--ag-surface) !important;
  position: relative;
}

.wp-block-cover__inner-container {
  z-index: 2;
  position: relative;
}

/* --- Buttons --- */
.wp-block-button__link,
.wp-element-button,
button[type="submit"],
input[type="submit"],
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--ag-accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0.5rem !important;
  font-family: 'Manrope', sans-serif !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  letter-spacing: 0.025em;
  padding: 0.75rem 1.75rem !important;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s, box-shadow 0.2s !important;
  text-decoration: none !important;
}

.wp-block-button__link:hover,
.wp-element-button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce #respond input#submit:hover {
  background: var(--ag-accent-2) !important;
  box-shadow: 0 0 20px var(--ag-accent-glow) !important;
  transform: translateY(-1px) !important;
}

/* Outline / secondary button */
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  border: 1px solid var(--ag-accent) !important;
  color: var(--ag-accent) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--ag-accent) !important;
  color: #fff !important;
}

/* --- Forms & Inputs --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select,
.woocommerce-Input,
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="password"],
.woocommerce textarea,
.woocommerce select {
  background-color: var(--ag-surface) !important;
  border: 1px solid var(--ag-border) !important;
  color: var(--ag-text) !important;
  border-radius: 0.5rem !important;
  font-family: 'Manrope', sans-serif !important;
  padding: 0.75rem 1rem !important;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--ag-accent) !important;
  box-shadow: 0 0 0 3px var(--ag-accent-glow) !important;
  outline: none !important;
}

label {
  color: var(--ag-muted) !important;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
  display: block;
}

/* --- Cards & Panels --- */
.wp-block-group,
.woocommerce-tabs .panel,
.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-shipping-fields {
  background-color: transparent;
}

/* --- WooCommerce Shop / Product Grid --- */
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 1.5rem !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

.woocommerce ul.products li.product {
  background: var(--ag-card) !important;
  border: 1px solid var(--ag-border) !important;
  border-radius: var(--ag-radius-lg) !important;
  overflow: hidden;
  padding: 0 !important;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s !important;
  margin: 0 !important;
  float: none !important;
  width: auto !important;
}

.woocommerce ul.products li.product:hover {
  border-color: var(--ag-border-hover) !important;
  box-shadow: 0 8px 40px rgba(99, 102, 241, 0.15) !important;
  transform: translateY(-3px) !important;
}

/* Product thumbnail container — 16:9 ratio */
.woocommerce ul.products li.product a img {
  display: block;
  width: 100% !important;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  transition: transform 0.35s ease !important;
}

.woocommerce ul.products li.product:hover a img {
  transform: scale(1.04) !important;
}

/* Product thumbnail overlay */
.woocommerce ul.products li.product a:first-child {
  display: block;
  overflow: hidden;
  position: relative;
}

.woocommerce ul.products li.product a:first-child::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24,24,32,0.85) 0%, transparent 60%);
  pointer-events: none; /* never block clicks */
}

/* Product info */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2 {
  color: var(--ag-white) !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  padding: 1rem 1rem 0.25rem !important;
  margin: 0 !important;
}

.woocommerce ul.products li.product .price {
  color: var(--ag-accent-2) !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  padding: 0 1rem 0.75rem !important;
  display: block;
}

.woocommerce ul.products li.product .price del {
  color: var(--ag-muted) !important;
  font-size: 0.875rem;
  font-weight: 400;
}

/* Add-to-cart on loop */
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .button {
  margin: 0 1rem 1rem !important;
  width: calc(100% - 2rem) !important;
  text-align: center !important;
  padding: 0.625rem 1rem !important;
  font-size: 0.875rem !important;
}

/* Sale badge */
.woocommerce ul.products li.product .onsale,
.woocommerce span.onsale {
  background: var(--ag-accent) !important;
  color: #fff !important;
  border-radius: 0.375rem !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  padding: 0.25rem 0.625rem !important;
  top: 0.75rem !important;
  left: auto !important;
  right: 0.75rem !important;
}

/* --- Single Product Page --- */
.woocommerce div.product {
  background: transparent !important;
}

.woocommerce div.product .product_title {
  color: var(--ag-white) !important;
  font-size: clamp(1.5rem, 3vw, 2.25rem) !important;
  font-weight: 800 !important;
  margin-bottom: 0.5rem !important;
}

.woocommerce div.product .price {
  color: var(--ag-accent-2) !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
}

.woocommerce div.product .woocommerce-product-details__short-description {
  color: var(--ag-muted) !important;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem !important;
}

/* Product tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs {
  background: transparent !important;
  border-bottom: 1px solid var(--ag-border) !important;
  padding: 0 !important;
  margin-bottom: 0 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  color: var(--ag-muted) !important;
  font-weight: 500 !important;
  padding: 0.75rem 1.25rem !important;
  border-radius: 0 !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  border-bottom-color: var(--ag-accent) !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: var(--ag-white) !important;
}

.woocommerce div.product .woocommerce-tabs .panel {
  border: none !important;
  background: var(--ag-card) !important;
  border-radius: 0 0 var(--ag-radius) var(--ag-radius) !important;
  padding: 1.5rem !important;
}

/* Product images */
.woocommerce div.product div.images img {
  border-radius: var(--ag-radius) !important;
  border: 1px solid var(--ag-border) !important;
}

/* --- Cart & Checkout --- */
.woocommerce-cart .cart-collaterals,
.woocommerce-cart table.cart,
.woocommerce-checkout form.checkout {
  color: var(--ag-text) !important;
}

.woocommerce table.shop_table {
  background: var(--ag-card) !important;
  border: 1px solid var(--ag-border) !important;
  border-radius: var(--ag-radius) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden;
}

.woocommerce table.shop_table thead th {
  background: var(--ag-surface) !important;
  color: var(--ag-muted) !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid var(--ag-border) !important;
  padding: 0.875rem 1rem !important;
}

.woocommerce table.shop_table td {
  border-bottom: 1px solid var(--ag-border) !important;
  color: var(--ag-text) !important;
  padding: 1rem !important;
  vertical-align: middle !important;
}

.woocommerce table.shop_table tr:last-child td {
  border-bottom: none !important;
}

.woocommerce table.shop_table .cart_item:hover td {
  background: rgba(99, 102, 241, 0.04) !important;
}

/* Cart totals */
.cart_totals,
.woocommerce-checkout-review-order {
  background: var(--ag-card) !important;
  border: 1px solid var(--ag-border) !important;
  border-radius: var(--ag-radius-lg) !important;
  padding: 1.5rem !important;
}

/* Order review */
.woocommerce .order_details li strong,
.woocommerce-order-received h2 {
  color: var(--ag-white) !important;
}

/* Checkout payment box */
.woocommerce #payment {
  background: var(--ag-card) !important;
  border-radius: var(--ag-radius) !important;
  border: 1px solid var(--ag-border) !important;
}

.woocommerce #payment div.payment_box {
  background: var(--ag-surface) !important;
  color: var(--ag-muted) !important;
}

/* --- Notices / Alerts --- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-radius: var(--ag-radius) !important;
  border: none !important;
  font-weight: 500 !important;
}

.woocommerce-message {
  background: rgba(99, 102, 241, 0.12) !important;
  color: var(--ag-accent-2) !important;
  border-left: 3px solid var(--ag-accent) !important;
}

.woocommerce-info {
  background: rgba(99, 102, 241, 0.08) !important;
  color: var(--ag-text) !important;
  border-left: 3px solid var(--ag-accent-2) !important;
}

.woocommerce-error {
  background: rgba(239, 68, 68, 0.10) !important;
  color: #fca5a5 !important;
  border-left: 3px solid #ef4444 !important;
}

/* --- Widget / Sidebar --- */
.widget {
  background: var(--ag-card) !important;
  border: 1px solid var(--ag-border) !important;
  border-radius: var(--ag-radius) !important;
  padding: 1.25rem !important;
  margin-bottom: 1.5rem !important;
}

.widget-title,
.widget h2 {
  color: var(--ag-white) !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  margin-bottom: 1rem !important;
  padding-bottom: 0.75rem !important;
  border-bottom: 1px solid var(--ag-border) !important;
}

/* Price filter widget */
.woocommerce .widget_price_filter .ui-slider {
  background: var(--ag-border) !important;
}

.woocommerce .widget_price_filter .ui-slider .ui-slider-range {
  background: var(--ag-accent) !important;
}

.woocommerce .widget_price_filter .ui-slider-handle {
  background: var(--ag-accent-2) !important;
  border: none !important;
}

/* Category widget */
.woocommerce-widget-layered-nav ul li a,
.widget_product_categories ul li a {
  color: var(--ag-muted) !important;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.woocommerce-widget-layered-nav ul li a:hover,
.widget_product_categories ul li a:hover {
  color: var(--ag-accent-2) !important;
}

/* --- Footer --- */
.wp-block-template-part[data-wp-context*="footer"],
footer.wp-block-template-part,
.site-footer,
#colophon {
  background-color: var(--ag-surface) !important;
  border-top: 1px solid var(--ag-border) !important;
  color: var(--ag-muted) !important;
}

.site-footer a,
#colophon a {
  color: var(--ag-muted) !important;
  transition: color 0.2s;
}

.site-footer a:hover,
#colophon a:hover {
  color: var(--ag-accent-2) !important;
}

/* --- Pagination --- */
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  background: var(--ag-card) !important;
  border: 1px solid var(--ag-border) !important;
  color: var(--ag-muted) !important;
  border-radius: 0.375rem !important;
  padding: 0.5rem 0.875rem !important;
  transition: all 0.2s;
}

.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--ag-accent) !important;
  border-color: var(--ag-accent) !important;
  color: #fff !important;
}

/* --- Breadcrumbs --- */
.woocommerce-breadcrumb {
  color: var(--ag-muted) !important;
  font-size: 0.875rem !important;
}

.woocommerce-breadcrumb a {
  color: var(--ag-muted) !important;
}

.woocommerce-breadcrumb a:hover {
  color: var(--ag-accent-2) !important;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--ag-bg); }
::-webkit-scrollbar-thumb { background: var(--ag-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ag-accent); }

/* --- Selection --- */
::selection { background: var(--ag-accent); color: #fff; }

/* --- Misc Block Overrides --- */
.wp-block-separator {
  border-color: var(--ag-border) !important;
  opacity: 1 !important;
}

.wp-block-pullquote,
.wp-block-quote {
  border-color: var(--ag-accent) !important;
  color: var(--ag-text) !important;
}

.wp-block-code,
pre {
  background: var(--ag-card) !important;
  border: 1px solid var(--ag-border) !important;
  border-radius: var(--ag-radius) !important;
  color: var(--ag-accent-2) !important;
}

/* --- Custom Homepage Sections --- */

/* Stats Bar */
.ag-stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  background: var(--ag-card);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-lg);
  padding: 2rem;
  text-align: center;
}

.ag-stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--ag-white);
  display: block;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.ag-stat-label {
  font-size: 0.875rem;
  color: var(--ag-muted);
  font-weight: 500;
}

/* Game category cards */
.ag-game-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--ag-radius-lg);
  border: 1px solid var(--ag-border);
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.ag-game-card:hover {
  border-color: var(--ag-border-hover);
  box-shadow: 0 8px 40px rgba(99, 102, 241, 0.2);
  transform: translateY(-3px);
}

.ag-game-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.ag-game-card:hover img {
  transform: scale(1.05);
}

.ag-game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24,24,32,0.9) 0%, transparent 60%);
  pointer-events: none; /* never block clicks on parent <a> */
}

.ag-game-card-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  color: var(--ag-white);
  font-weight: 700;
  font-size: 1.05rem;
}

.ag-explore-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(30,30,44,0.8);
  backdrop-filter: blur(6px);
  border: 1px solid var(--ag-border);
  border-radius: 2rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ag-text);
}

/* Testimonial cards */
.ag-testimonial {
  background: var(--ag-card);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.ag-testimonial:hover {
  border-color: var(--ag-border-hover);
}

.ag-testimonial-stars {
  color: #f59e0b;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.ag-testimonial-text {
  color: var(--ag-text);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.ag-testimonial-author {
  color: var(--ag-white);
  font-weight: 700;
  font-size: 0.9rem;
}

.ag-testimonial-meta {
  color: var(--ag-muted);
  font-size: 0.8rem;
}

/* FAQ accordion */
.ag-faq-item {
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s;
}

.ag-faq-item:hover {
  border-color: var(--ag-border-hover);
}

.ag-faq-question {
  width: 100%;
  background: var(--ag-card);
  color: var(--ag-white);
  font-weight: 600;
  font-size: 1rem;
  text-align: left;
  padding: 1.125rem 1.25rem;
  cursor: pointer;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ag-faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--ag-accent-2);
  transition: transform 0.2s;
}

.ag-faq-item.open .ag-faq-question::after {
  transform: rotate(45deg);
}

.ag-faq-answer {
  background: var(--ag-surface);
  color: var(--ag-muted);
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  line-height: 1.7;
  display: none;
}

.ag-faq-item.open .ag-faq-answer {
  display: block;
}

/* Section headings */
.ag-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ag-accent-2);
  margin-bottom: 0.5rem;
}

.ag-section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--ag-white);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.ag-section-desc {
  color: var(--ag-muted);
  font-size: 1rem;
  max-width: 42rem;
  line-height: 1.7;
}

/* Banner / accent gradient strip */
.ag-gradient-text {
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 50%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow pill / badge */
.ag-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 2rem;
  padding: 0.25rem 0.875rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ag-accent-2);
}

/* Support cards */
.ag-support-card {
  background: var(--ag-card);
  border: 1px solid var(--ag-border);
  border-radius: var(--ag-radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.ag-support-card:hover {
  border-color: var(--ag-border-hover);
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.12);
}

.ag-support-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.ag-support-title {
  color: var(--ag-white);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.ag-support-desc {
  color: var(--ag-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Quantity input fix */
.woocommerce div.product form.cart div.quantity .qty {
  background: var(--ag-surface) !important;
  border: 1px solid var(--ag-border) !important;
  color: var(--ag-white) !important;
  border-radius: 0.5rem !important;
  text-align: center;
  font-size: 1rem;
  width: 4rem !important;
}

/* Star ratings */
.woocommerce .star-rating span::before,
.woocommerce .star-rating::before {
  color: #f59e0b !important;
}

/* Admin bar fix */
html body.admin-bar {
  margin-top: 0 !important;
}

/* Remove WC default box background on main sections */
.woocommerce-page .content-area,
.woocommerce .content-area {
  background: transparent !important;
}

/* --- Columns alignment fix (Testimonials, Support sections) --- */

/* Full-width sections: add horizontal padding so content never
   bleeds to the screen edge */
.wp-block-group.alignfull {
  padding-left: clamp(1.25rem, 5vw, 3rem) !important;
  padding-right: clamp(1.25rem, 5vw, 3rem) !important;
  box-sizing: border-box !important;
}

/* Constrain columns inside full-width sections to the wide-size */
.wp-block-group.alignfull .wp-block-columns,
.wp-block-group.alignfull .wp-block-columns.alignwide {
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Equal columns, stretch, gap */
.wp-block-columns {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  gap: 1.5rem !important;
}

.wp-block-column {
  flex: 1 1 260px !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* Stretch cards to fill their column */
.wp-block-column .ag-testimonial,
.wp-block-column .ag-support-card {
  height: 100%;
  box-sizing: border-box;
}

/* Support card buttons — always on top, always clickable */
.ag-support-card a,
.ag-support-card a.wp-block-button__link {
  position: relative;
  z-index: 2;
  pointer-events: auto !important;
  display: inline-block !important;
}

/* Single-product image — 16:9 */
.woocommerce div.product div.images .woocommerce-product-gallery__image img,
.woocommerce div.product div.images img {
  aspect-ratio: 16 / 9;
  width: 100% !important;
  height: auto !important;
  object-fit: cover;
  border-radius: var(--ag-radius) !important;
  border: 1px solid var(--ag-border) !important;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .ag-stats-bar {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .woocommerce ul.products {
    grid-template-columns: 1fr !important;
  }

  .wp-block-columns {
    flex-direction: column !important;
  }

  .wp-block-column {
    flex: 1 1 100% !important;
  }
}
