/*
Theme Name: Affiliate Catalog
Theme URI: https://ghostengine.hostinx.store/
Author: Positype Co.
Author URI: https://ghostengine.hostinx.store/
Description: The world's first Hybrid Commerce Theme by Positype Co. Pair it with the Affiliate Catalog companion plugin by Ghost Engine to blend WooCommerce products and affiliate items in a premium Bento Grid for maximum beauty and speed.
Version: 9.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
License: GPLv2 or later
Text Domain: aff-catalog
*/
:root {
  /* Legacy variables for backward compatibility - now mapped to Bento tokens */
  --accent: var(--bento-primary, #d4a574);
  --accent-2: var(--bento-primary-hover, #c19660);
  --text: var(--bento-neutral-800, #262626);
  --muted: var(--bento-neutral-500, #737373);
  --bg: var(--bento-brown-50, #fefdf8);
  --surface: #ffffff;
  --border: var(--bento-neutral-200, #e5e5e5);
  --header-bg: rgba(255,255,255,.92);
  --shadow-sm: var(--bento-shadow-soft, 0 8px 16px rgba(0, 0, 0, 0.08));
  --shadow-lg: var(--bento-shadow-luxury, 0 20px 40px rgba(0, 0, 0, 0.06));
  --radius-md: var(--bento-radius-sm, 20px);
  --radius-lg: var(--bento-radius-large-card, 32px);
  --container: 1280px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, Arial, sans-serif; font-size: 16px; line-height: 1.6; color: var(--text); background: linear-gradient(180deg, #fbfcfd, var(--bg)); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.container { width: min(var(--container), calc(100% - 32px)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.screen-reader-text:focus { left: 10px; top: 10px; width: auto; height: auto; clip: auto; background: #fff; padding: 12px 16px; z-index: 2000; }
.master-content,.archive-page,.single-product-page { padding: 40px 0 88px; }
.hero-shell { padding: 16px 0 36px; max-width: 920px; }
.hero-kicker,.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.hero-title { margin: 0; font-size: clamp(3rem, 8vw, 6rem); line-height: .92; font-weight: 900; letter-spacing: -.05em; }
.hero-title span { display: block; }
.hero-subtitle { max-width: 62ch; margin: 18px 0 0; color: var(--muted); font-size: 1.05rem; }
.section-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 24px; }
/* Enhanced Bento Grid System with Design Tokens */
.master-bento-grid { 
  display: grid; 
  grid-template-columns: var(--bento-grid-cols-4); 
  grid-auto-rows: 320px; 
  gap: var(--bento-grid-gap); 
}

/* Bento Grid Responsive Layouts */
.bento-grid--responsive {
  grid-template-columns: var(--bento-grid-cols-responsive);
  grid-auto-rows: minmax(280px, auto);
}

.bento-grid--dense {
  gap: var(--bento-grid-gap-mobile);
}

.bento-grid--spaced {
  gap: var(--bento-grid-gap-desktop);
}

/* Flexible Bento Item Size Variants - Any item can be any size */
.bento-item--small { 
  grid-column: span 1; 
  grid-row: span 1; 
}

.bento-item--large { 
  grid-column: span 2; 
  grid-row: span 2; 
}

.bento-item--wide { 
  grid-column: span 2; 
  grid-row: span 1; 
}

.bento-item--tall { 
  grid-column: span 1; 
  grid-row: span 2; 
}

.bento-item--featured { 
  grid-column: span 3; 
  grid-row: span 2; 
}

.bento-item--mega { 
  grid-column: span 4; 
  grid-row: span 2; 
}

.bento-item--full-width { 
  grid-column: span 4; 
  grid-row: span 1; 
}

/* Legacy support for backward compatibility */
.bento-item-1,.bento-item-6 { 
  grid-column: span 2; 
  grid-row: span 2; 
}

/* Enhanced Card System */
.card-anchor { 
  display: block; 
  position: relative; 
  height: 100%; 
  overflow: hidden; 
  border-radius: var(--bento-radius-large-card); 
  background: var(--bento-neutral-800); 
  box-shadow: var(--bento-shadow-soft); 
  transition: var(--bento-transition-normal);
}

/* Bento Card Variants */
.bento-card--highlight {
  box-shadow: var(--bento-shadow-luxury);
  border: 2px solid var(--bento-primary);
  transform: scale(1.02);
}

.bento-card--premium {
  box-shadow: var(--bento-shadow-xl);
  background: linear-gradient(135deg, var(--bento-brown-50), var(--bento-brown-100));
}

.bento-card--secondary {
  box-shadow: var(--bento-shadow-soft);
  border: 1px solid var(--bento-secondary-light);
}

.bento-card--interactive {
  cursor: pointer;
}

.bento-card--hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: var(--bento-shadow-xl);
}
.card-img-box,.card-image { width: 100%; height: 100%; }
.card-image { object-fit: cover; object-position: top center; transform: scale(1.01); transition: transform .45s ease; }
.card-anchor:hover .card-image,.card-anchor:focus-visible .card-image { transform: scale(1.06); }
.card-image-fallback,.single-image-fallback,.empty-state-box { display: grid; place-items: center; min-height: 220px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--muted); text-align: center; }
.card-text-overlay { position: absolute; inset: auto 0 0 0; padding: 72px 20px 20px; background: linear-gradient(to top, rgba(0,0,0,.86), rgba(0,0,0,0)); }
.card-title { margin: 0; color: #fff; font-size: .82rem; opacity: .84; text-transform: uppercase; letter-spacing: .05em; }
.card-price { margin: 6px 0 0; color: #fff; font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 800; line-height: 1; }
.price-mode-hide .card-price { display: none; }
.price-mode-hover .card-price { opacity: 0; transform: translateY(6px); transition: .2s ease; }
.price-mode-hover .card-anchor:hover .card-price,.price-mode-hover .card-anchor:focus-visible .card-price { opacity: 1; transform: translateY(0); }
.card-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.card-badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: .75rem; }
.card-badge-secondary { background: rgba(15,118,110,.88); }
.value-strip { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 56px; }
.empty-state-admin { max-width: 720px; margin: 16px auto 0; padding: 56px 40px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.empty-state-admin__eyebrow { margin: 0 0 12px; color: var(--accent); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.empty-state-admin__title { margin: 0 0 14px; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.1; }
.empty-state-admin__copy { margin: 0 auto 28px; max-width: 52ch; color: var(--muted); font-size: 1.02rem; line-height: 1.6; }
.empty-state-admin__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.empty-state-admin__actions .button { padding: 0 22px; }
.aff-companion-inline { margin: 22px 0 0; padding-top: 18px; border-top: 1px dashed var(--border); color: var(--muted); font-size: .92rem; }
.aff-companion-inline a { color: var(--accent); font-weight: 700; text-decoration: underline; }
.aff-companion-inline a:hover { color: var(--accent-2); }
.value-card,.default-post-card { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.value-card strong { display: block; margin-bottom: 8px; }
.value-card span,.archive-description,.entry-summary,.affiliate-note,.footer-copy { color: var(--muted); }
.single-product-card { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 40px; align-items: start; }
.single-product-image { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); background: var(--surface); }
.single-product-title,.archive-title { margin: 0; letter-spacing: -.03em; line-height: 1; }
.single-product-price { margin: 14px 0 20px; color: var(--accent); font-weight: 800; font-size: 1.5rem; }
.single-product-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 999px; font-weight: 700; }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.button-secondary { border: 1px solid var(--border); background: var(--surface); }
.content-loop { display: grid; gap: 16px; }
@media (max-width: 1024px) {
  .master-bento-grid { grid-template-columns: repeat(2, minmax(0,1fr)); grid-auto-rows: 260px; }
  .bento-item-1,.bento-item-6 { grid-column: span 2; grid-row: span 1; }
  .single-product-card,.value-strip { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(var(--container), calc(100% - 20px)); }
  .master-content,.archive-page,.single-product-page { padding-top: 24px; }
  .hero-title { font-size: 3rem; }
  .master-bento-grid { gap: 12px; grid-auto-rows: 240px; }
}
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-left: 6px; border-radius: 50%; border: 1px solid var(--border); font-size: 0.7rem; font-weight: 800; color: var(--text); transition: background 0.2s, color 0.2s; }
.social-link:hover, .social-link:focus-visible { background: var(--accent); color: #fff; border-color: transparent; outline: none; }
.social-icon-mark { line-height: 1; }
