/* Apple Empire — features/compare UI, v8 */
.ae-modal-lock{overflow:hidden!important}
.ae-fm{position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;padding:18px}
.ae-fm.open{display:flex}
.ae-fm__scrim{position:absolute;inset:0;background:rgba(0,0,0,.58);backdrop-filter:blur(5px)}
.ae-fm__box{position:relative;width:min(980px,100%);max-height:min(90vh,920px);overflow:auto;background:#fff;border-radius:24px;box-shadow:0 24px 80px rgba(0,0,0,.28);padding:28px;color:#17171a}
.ae-fm__close{position:absolute;right:14px;top:12px;width:38px;height:38px;border:0;border-radius:50%;background:#f1f1f3;font-size:26px;cursor:pointer;z-index:2}
.ae-eyebrow{font-size:11px;letter-spacing:.13em;font-weight:700;color:#777;margin-bottom:8px}
.ae-features h2,.ae-compare h2{font-size:28px;line-height:1.15;margin:0 48px 20px 0}
.ae-feature-table{border:1px solid #e7e7ea;border-radius:16px;overflow:hidden}
.ae-ftr{display:grid;grid-template-columns:minmax(160px,.7fr) minmax(0,1.3fr);gap:16px;padding:13px 16px;border-bottom:1px solid #ededf0}
.ae-ftr:last-child{border-bottom:0}.ae-ftr span{color:#777}.ae-ftr strong{font-weight:600}
.ae-source{margin-top:16px;color:#777;font-size:12px}.ae-source a{color:#111;text-decoration:underline}.ae-source small{display:block;margin-top:6px;color:#999;line-height:1.45}

/* Cart comparison header */
.panel-cart .ae-cart-compare-bar{
  box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:space-between!important;
  gap:10px!important;margin:8px 12px!important;padding:8px 10px!important;
  min-height:48px!important;border:1px solid #ececef!important;border-radius:12px!important;
  background:#fafafa!important;box-shadow:none!important;
}
.panel-cart .ae-cart-compare-bar>span{display:block!important;min-width:0!important;font-size:12px!important;line-height:1.25!important;color:#777!important}
.panel-cart .ae-cart-compare-bar>span b{color:#202024!important;font-weight:700!important}
.panel-cart .ae-cart-compare-bar .btn{
  flex:0 0 auto!important;width:auto!important;min-width:92px!important;height:34px!important;
  padding:0 13px!important;border-radius:9px!important;font-size:12px!important;font-weight:600!important;
  background:#f1f1f3!important;color:#777!important;border:1px solid #e2e2e5!important;box-shadow:none!important;
}
.panel-cart .ae-cart-compare-bar .btn:not(:disabled){background:#17171a!important;color:#fff!important;border-color:#17171a!important}
.panel-cart .ae-cart-compare-bar .btn:disabled{opacity:.55!important}

/* Cart card */
.panel-cart .ci{grid-template-columns:60px minmax(0,1fr) 34px!important;align-items:start!important;gap:9px!important;min-width:0!important;padding:9px!important}
.panel-cart .ci__img{width:60px!important;height:60px!important}
.panel-cart .ci__body{min-width:0!important;align-self:stretch!important}
.panel-cart .ci h4{margin:0!important;line-height:1.3!important}
.panel-cart .ci p{margin:3px 0 0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.panel-cart .ci .sum{margin-top:5px!important;line-height:1.2!important}

/* Two real buttons, never plain text */
.panel-cart .ci__tools{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:6px!important;align-items:center!important;margin-top:8px!important;padding-top:0!important;border-top:0!important;
}
.panel-cart .ci__tools .ae-cmp-label,
.panel-cart .ci__tools .ae-mini-spec{
  box-sizing:border-box!important;width:100%!important;min-width:0!important;height:31px!important;
  border:1px solid #e2e2e5!important;border-radius:9px!important;background:#fff!important;
  color:#333!important;font-family:inherit!important;font-size:11px!important;font-weight:600!important;
  line-height:1!important;display:flex!important;align-items:center!important;justify-content:center!important;
  gap:5px!important;padding:0 6px!important;white-space:nowrap!important;text-decoration:none!important;cursor:pointer!important;
}
.panel-cart .ci__tools .ae-cmp-label:hover,
.panel-cart .ci__tools .ae-mini-spec:hover{border-color:#d85b89!important;color:#b52a5d!important;background:#fff7fa!important}
.panel-cart .ci__tools .ae-cmp-label:has(.ae-cmp:checked){border-color:#d85b89!important;color:#b52a5d!important;background:#fff2f7!important}
.panel-cart .ae-cmp{appearance:auto!important;-webkit-appearance:checkbox!important;width:14px!important;height:14px!important;margin:0!important;accent-color:#c63d70!important;flex:0 0 auto!important}

/* Quantity controls */
.panel-cart .qty{width:34px!important;display:flex!important;flex-direction:column!important;align-items:center!important;gap:3px!important}
.panel-cart .qty button{width:34px!important;height:34px!important;padding:0!important}
.panel-cart .qty span{line-height:20px!important}

/* Product sheet */
.sheet .acts{display:flex!important;flex-direction:column!important;gap:8px!important}
.sheet .acts #p-specs,.sheet .acts #p-add{width:100%!important;margin:0!important}

/* Compare modal */
.ae-compare-scroll{overflow:auto;border-radius:14px}.ae-compare-grid{display:grid;grid-template-columns:170px repeat(var(--cols),minmax(180px,1fr));border:1px solid #e5e5e8;border-bottom:0;min-width:max-content}
.ae-compare-grid>*{padding:12px;border-right:1px solid #e5e5e8;border-bottom:1px solid #e5e5e8}.ae-compare-grid>*:last-child{border-right:0}
.ae-cols{background:#fafafa;border-radius:14px 14px 0 0}.ae-compare-head{font-size:14px}.ae-compare-head small{display:block;color:#888;margin-top:5px;font-size:11px}
.ae-compare-label{font-weight:600;color:#666;background:#fafafa}.ae-compare-cell{font-size:13px}.ae-compare-cell.better{background:#e8f7e9;color:#137333;font-weight:700}.ae-compare-cell.worse{background:#fde8e7;color:#b3261e;font-weight:700}
.ae-legend{display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:12px;font-size:11px;color:#888}.ae-legend .better{color:#137333}.ae-legend .worse{color:#b3261e}
@media(max-width:700px){
 .ae-fm{padding:0}.ae-fm__box{max-height:100vh;border-radius:0;padding:20px 14px}.ae-features h2,.ae-compare h2{font-size:22px}
 .ae-ftr{grid-template-columns:1fr;gap:4px}.ae-ftr span{font-size:12px}
 .panel-cart .ae-cart-compare-bar{margin:7px 10px!important;padding:7px 9px!important;min-height:44px!important}
 .panel-cart .ae-cart-compare-bar>span{font-size:12px!important}.panel-cart .ae-cart-compare-bar .btn{min-width:88px!important;height:33px!important;padding:0 11px!important;font-size:11.5px!important}
 .panel-cart .ci{grid-template-columns:60px minmax(0,1fr) 34px!important;gap:8px!important;padding:8px!important}
 .panel-cart .ci__tools{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:5px!important}
 .panel-cart .ci__tools .ae-cmp-label,.panel-cart .ci__tools .ae-mini-spec{height:30px!important;font-size:10.5px!important;padding:0 5px!important}
 .panel-cart .ci__img{width:60px!important;height:60px!important}
 .ae-compare-grid{grid-template-columns:130px repeat(var(--cols),minmax(155px,1fr))}
}
@media(max-width:340px){.panel-cart .ci__tools{grid-template-columns:1fr!important}.panel-cart .ci__tools .ae-cmp-label,.panel-cart .ci__tools .ae-mini-spec{width:100%!important}.panel-cart .ae-cart-compare-bar{flex-direction:column!important;align-items:stretch!important}.panel-cart .ae-cart-compare-bar .btn{width:100%!important}}

/* v7 comparison clarity */
.ae-compare-intro{margin:-10px 0 16px;color:#666;font-size:12px;line-height:1.45}
.ae-compare-scroll{border:1px solid #e3e3e7;border-radius:16px;background:#fff;overflow:auto;box-shadow:0 4px 18px rgba(0,0,0,.04)}
.ae-compare-grid{grid-template-columns:190px repeat(var(--cols),minmax(220px,1fr));min-width:calc(190px + var(--cols) * 220px);border:0!important}
.ae-compare-grid>*{box-sizing:border-box;border-right:1px solid #e5e5e8!important;border-bottom:1px solid #e5e5e8!important;padding:13px 14px}
.ae-compare-grid>*:last-child{border-right:0!important}
.ae-cols{position:sticky;top:0;z-index:3;background:#fafafa}
.ae-compare-corner{display:flex;align-items:center;font-size:11px;text-transform:uppercase;letter-spacing:.05em;font-weight:700;color:#777;background:#f7f7f8}
.ae-compare-head{display:flex;align-items:center;gap:10px;background:#fff}
.ae-product-badge{width:30px;height:30px;flex:0 0 30px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:#17171a;color:#fff;font-size:13px;font-weight:800}
.ae-head-copy{min-width:0}.ae-head-copy strong{display:block;font-size:14px;line-height:1.25}.ae-head-copy small{display:block;color:#888;margin-top:5px;font-size:11px;line-height:1.35}
.ae-compare-body{background:#fff}
.ae-compare-row{display:contents}
.ae-compare-label{display:flex;flex-direction:column;justify-content:center;gap:3px;background:#fafafa;font-weight:700;color:#555;position:sticky;left:0;z-index:2}
.ae-compare-label small{font-size:9px;font-weight:500;text-transform:uppercase;letter-spacing:.04em;color:#aaa}
.ae-compare-cell{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;background:#fff;font-size:13px;color:#333}
.ae-compare-cell .ae-value{min-width:0;line-height:1.4}
.ae-compare-cell.better{background:#ecf8ee!important;color:#166534!important;box-shadow:inset 4px 0 0 #35a853}
.ae-compare-cell.worse{background:#fff0ef!important;color:#b42318!important;box-shadow:inset 4px 0 0 #d93025}
.ae-value-tag{flex:0 0 auto;padding:4px 7px;border-radius:999px;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}
.ae-compare-cell.better .ae-value-tag{background:#ccebd2;color:#176b2c}.ae-compare-cell.worse .ae-value-tag{background:#f8d2cf;color:#a61b15}
.ae-legend{align-items:center;padding-top:14px!important;font-size:11px}
.ae-legend .legend-item{display:inline-flex;align-items:center;gap:6px;color:#555;font-weight:500}
.ae-legend .legend-item i{display:inline-block;width:12px;height:12px;border-radius:4px;border:1px solid transparent}
.ae-legend .legend-better i{background:#ecf8ee;border-color:#35a853}.ae-legend .legend-worse i{background:#fff0ef;border-color:#d93025}
.ae-legend .legend-better b{color:#176b2c}.ae-legend .legend-worse b{color:#a61b15}.ae-legend .legend-note{color:#999}
@media(max-width:700px){
 .ae-compare-intro{font-size:11px;margin:-7px 0 12px}
 .ae-compare-grid{grid-template-columns:145px repeat(var(--cols),minmax(185px,1fr));min-width:calc(145px + var(--cols) * 185px)}
 .ae-compare-grid>*{padding:11px 10px}
 .ae-compare-corner{font-size:9px}.ae-product-badge{width:26px;height:26px;flex-basis:26px;border-radius:8px;font-size:11px}.ae-compare-head{gap:8px}.ae-head-copy strong{font-size:12px}.ae-head-copy small{font-size:10px}.ae-compare-cell{font-size:12px;min-height:46px}.ae-value-tag{font-size:8px;padding:3px 5px}
 .ae-legend{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important}.ae-legend .legend-note{grid-column:1/-1}
}

/* v8 — explicit comparison colors and column references */
.ae-compare-intro{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:10px 12px!important;border:1px solid #e7e7ea;border-radius:10px;background:#fafafa;color:#555!important}
.ae-intro-icon,.ae-product-badge{background:#17171a!important;color:#fff!important}
.ae-product-number{display:inline-block;margin-right:7px;padding:2px 6px;border-radius:999px;background:#f0f0f2;color:#666;font-size:9px;font-weight:800;text-transform:uppercase;vertical-align:middle}
.ae-cell-ref{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-right:7px;border-radius:5px;background:#f0f0f2;color:#777;font-size:9px;vertical-align:middle}
.ae-compare-cell.better{background:#dff5e3!important;color:#176b2c!important;box-shadow:inset 5px 0 0 #2e9d4d!important}
.ae-compare-cell.worse{background:#ffe1df!important;color:#a61b15!important;box-shadow:inset 5px 0 0 #d93025!important}
.ae-compare-cell.better .ae-cell-ref{background:#b9e6c2;color:#176b2c}
.ae-compare-cell.worse .ae-cell-ref{background:#f5bbb7;color:#a61b15}
.ae-value-tag{border:1px solid currentColor!important}
.ae-tag-better{background:#b9e6c2!important;color:#176b2c!important}
.ae-tag-worse{background:#f5bbb7!important;color:#a61b15!important}
.ae-legend .legend-item{padding:7px 9px;border-radius:8px;background:#fafafa;border:1px solid #e5e5e8}
.ae-legend .legend-better{color:#176b2c!important}.ae-legend .legend-worse{color:#a61b15!important}
@media(max-width:700px){.ae-compare-intro{display:block;line-height:1.55}.ae-intro-icon{display:inline-flex!important;margin:0 2px}.ae-product-number{font-size:8px}.ae-cell-ref{width:16px;height:16px;font-size:8px;margin-right:5px}}
