/* AMZ AI Listicle — article + catalog components.
   Themes recolor everything through the variables below (the AMZ Store theme maps them to the Customizer palette). */
:root {
  --amzl-accent: var(--amzs-primary, #111111);
  --amzl-accent-text: var(--amzs-on-primary, #ffffff);
  --amzl-badge-bg: var(--amzs-accent-soft, #eef6f5);
  --amzl-badge-text: var(--amzs-text, #1a1a1a);
  --amzl-border: var(--amzs-border, #e6e2dc);
  --amzl-surface: var(--amzs-surface, #f7f5f2);
  --amzl-bg: var(--amzs-bg, #ffffff);
  --amzl-muted: var(--amzs-muted, #6b6b6b);
  --amzl-star: #f5a623;
  --amzl-pro: #1e8e3e;
  --amzl-con: #c5221f;
  --amzl-radius: var(--amzs-radius, 10px);
  --amzl-heading-font: var(--amzs-font-heading, inherit);
}

/* Quick picks */
.amzl-picks { margin: 2em 0; }
.amzl-picks__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.amzl-pick { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--amzl-border); border-radius: var(--amzl-radius); background: var(--amzl-bg); color: inherit; text-decoration: none; transition: box-shadow .2s, transform .2s; }
.amzl-pick:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.amzl-pick__label { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; background: var(--amzl-badge-bg); color: var(--amzl-badge-text); }
.amzl-pick__media { display: flex; align-items: center; justify-content: center; height: 150px; }
.amzl-pick__img { max-height: 150px; width: auto; object-fit: contain; }
.amzl-pick__name { font-weight: 600; line-height: 1.3; }
.amzl-pick__blurb { font-size: .875em; color: var(--amzl-muted); line-height: 1.45; }

/* Table of contents */
.amzl-toc { margin: 2em 0; padding: 18px 22px; border-radius: var(--amzl-radius); background: var(--amzl-surface); }
.amzl-toc__title { margin-top: 0 !important; }
.amzl-toc__list { margin: 0; padding-left: 1.4em; columns: 2 260px; column-gap: 32px; }
.amzl-toc__list li { margin: .25em 0; break-inside: avoid; }

/* Product section */
.amzl-item { margin: 3em 0; scroll-margin-top: 90px; }
.amzl-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); border: 1px solid var(--amzl-border); border-radius: var(--amzl-radius) var(--amzl-radius) 0 0; background: var(--amzl-bg); overflow: hidden; }
.amzl-card__media { display: flex; align-items: center; justify-content: center; padding: 20px; background: #fff; min-height: 260px; }
.amzl-card__media img { max-height: 340px; width: auto; max-width: 100%; object-fit: contain; }
.amzl-card__body { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 24px 28px; }
.amzl-card__rank { position: absolute; top: 14px; right: 18px; font-family: var(--amzl-heading-font); font-size: 42px; font-weight: 700; line-height: 1; color: var(--amzl-border); }
.amzl-badge { align-self: flex-start; margin: 0 !important; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 4px; background: var(--amzl-badge-bg); color: var(--amzl-badge-text); }
.amzl-badge--table { display: inline-block; margin-left: 6px !important; font-size: 10px; padding: 2px 6px; vertical-align: middle; }
.amzl-item__title { margin: 0 !important; font-size: 1.35em !important; line-height: 1.25; }
.amzl-card__brand { margin: 0 !important; font-size: .8em; letter-spacing: .08em; text-transform: uppercase; color: var(--amzl-muted); }
.amzl-card__rating { margin: 0 !important; }
.amzl-card__excerpt { margin: 0 !important; color: var(--amzl-muted); font-size: .95em; line-height: 1.55; }
.amzl-buy { display: inline-flex; align-items: center; justify-content: center; text-align: center; margin-top: 6px; padding: 13px 22px; border-radius: calc(var(--amzl-radius) - 4px); background: var(--amzl-accent); color: var(--amzl-accent-text) !important; font-weight: 700; text-decoration: none !important; transition: filter .2s, transform .2s; }
.amzl-buy:hover { filter: brightness(1.12); transform: translateY(-1px); }
.amzl-buy--small { padding: 9px 14px; font-size: .875em; }

/* Stars */
.amzl-stars { position: relative; display: inline-block; width: 5.2em; height: 1em; vertical-align: -0.1em; background: linear-gradient(90deg, #d9d9d9 0 0); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 104 20'%3E%3Cg%3E%3Cpath id='s' d='M10 1l2.7 5.6 6.1.9-4.4 4.3 1 6.1L10 15l-5.4 2.9 1-6.1L1.2 7.5l6.1-.9z'/%3E%3Cuse href='%23s' x='21'/%3E%3Cuse href='%23s' x='42'/%3E%3Cuse href='%23s' x='63'/%3E%3Cuse href='%23s' x='84'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 104 20'%3E%3Cg%3E%3Cpath id='s' d='M10 1l2.7 5.6 6.1.9-4.4 4.3 1 6.1L10 15l-5.4 2.9 1-6.1L1.2 7.5l6.1-.9z'/%3E%3Cuse href='%23s' x='21'/%3E%3Cuse href='%23s' x='42'/%3E%3Cuse href='%23s' x='63'/%3E%3Cuse href='%23s' x='84'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
.amzl-stars__fill { position: absolute; inset: 0 auto 0 0; background: var(--amzl-star); }
.amzl-stars__num { margin-left: 6px; font-weight: 700; font-size: .9em; }
.amzl-stars__count { margin-left: 4px; font-size: .85em; color: var(--amzl-muted); }

/* Pros / cons */
.amzl-pc { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--amzl-border); border-top: 0; border-radius: 0 0 var(--amzl-radius) var(--amzl-radius); background: var(--amzl-bg); }
.amzl-pc__col { padding: 16px 20px; }
.amzl-pc__col + .amzl-pc__col { border-left: 1px solid var(--amzl-border); }
.amzl-pc h3 { margin: 0 0 8px !important; font-size: 12px !important; letter-spacing: .1em; text-transform: uppercase; }
.amzl-pc__col--pros h3 { color: var(--amzl-pro); }
.amzl-pc__col--cons h3 { color: var(--amzl-con); }
.amzl-pros, .amzl-cons { list-style: none; margin: 0 !important; padding: 0 !important; }
.amzl-pros li, .amzl-cons li { position: relative; margin: .35em 0; padding-left: 24px; line-height: 1.45; }
.amzl-pros li::before, .amzl-cons li::before { position: absolute; left: 0; top: .1em; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 700; }
.amzl-pros li::before { content: "✓"; background: var(--amzl-pro); }
.amzl-cons li::before { content: "✕"; background: var(--amzl-con); }

/* Key specs */
.amzl-specs { margin: 18px 0; padding: 16px 20px; border-radius: var(--amzl-radius); background: var(--amzl-surface); }
.amzl-specs__title { margin: 0 0 10px !important; font-size: 12px !important; letter-spacing: .1em; text-transform: uppercase; }
.amzl-specs__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 28px; margin: 0; }
.amzl-specs__row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--amzl-border); }
.amzl-specs__row dt { color: var(--amzl-muted); font-size: .85em; }
.amzl-specs__row dd { margin: 0; font-weight: 500; }

.amzl-use, .amzl-skip { margin: .7em 0 !important; padding: 10px 14px; border-left: 3px solid var(--amzl-accent); background: var(--amzl-surface); border-radius: 0 6px 6px 0; }
.amzl-skip { border-left-color: var(--amzl-con); }

/* Comparison table */
.amzl-compare { margin: 3em 0; }
.amzl-compare__lead { color: var(--amzl-muted); font-size: .9em; }
.amzl-compare__scroll { overflow-x: auto; border: 1px solid var(--amzl-border); border-radius: var(--amzl-radius); }
.amzl-compare__table { width: 100%; margin: 0 !important; border-collapse: collapse; font-size: .92em; }
.amzl-compare__table th, .amzl-compare__table td { padding: 11px 14px; border: 0; border-bottom: 1px solid var(--amzl-border); text-align: left; vertical-align: top; }
.amzl-compare__table thead th { background: var(--amzl-surface); font-size: .8em; letter-spacing: .06em; text-transform: uppercase; }
.amzl-compare__table tbody tr:last-child td { border-bottom: 0; }
.amzl-compare__table td:first-child { min-width: 190px; font-weight: 600; }

/* Catalog grid / product cards */
.amzl-grid { display: grid; grid-template-columns: repeat(var(--amzl-cols, 4), minmax(0, 1fr)); gap: 20px; }
.amzl-grid--single { max-width: 340px; }
.amzl-pcard { display: flex; flex-direction: column; border: 1px solid var(--amzl-border); border-radius: var(--amzl-radius); background: var(--amzl-bg); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.amzl-pcard:hover { box-shadow: 0 10px 28px rgba(0,0,0,.08); transform: translateY(-2px); }
.amzl-pcard__media { display: block; aspect-ratio: 1 / 1; padding: 16px; overflow: hidden; background: #fff; }
.amzl-pcard__media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.amzl-pcard__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 14px 16px 16px; border-top: 1px solid var(--amzl-border); }
.amzl-pcard__brand { margin: 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--amzl-muted); }
.amzl-pcard__title { margin: 0; font-size: 1rem; line-height: 1.3; }
.amzl-pcard__title a { color: inherit; text-decoration: none; }
.amzl-pcard__for { margin: 0; font-size: .85em; color: var(--amzl-muted); }
.amzl-pcard__rating { margin: 0; font-size: .9em; }
.amzl-pcard .amzl-buy { margin-top: auto; }
.amzl-brands { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.amzl-brands a { display: inline-block; padding: 8px 16px; border: 1px solid var(--amzl-border); border-radius: 999px; color: inherit; text-decoration: none; }

@media (max-width: 900px) { .amzl-grid { grid-template-columns: repeat(min(var(--amzl-cols, 4), 2), minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .amzl-card { grid-template-columns: 1fr; }
  .amzl-card__media { min-height: 0; }
  .amzl-card__media img { max-height: 260px; }
  .amzl-card__body .amzl-buy { width: 100%; }
  .amzl-card__rank { font-size: 30px; top: 12px; right: 14px; }
  .amzl-pc { grid-template-columns: 1fr; }
  .amzl-pc__col + .amzl-pc__col { border-left: 0; border-top: 1px solid var(--amzl-border); }
  .amzl-specs__row { grid-template-columns: 100px 1fr; }
}
@media (max-width: 480px) { .amzl-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .amzl-pcard__body { padding: 10px 12px 12px; } .amzl-buy--small { padding: 9px 6px; font-size: 13px; line-height: 1.2; } }
