/* ============================================================
   CostcoAndy Deals v4
   ============================================================ */

/* ── Search results items block ── */
.ca-search-items-block {
    margin: 0 0 2rem;
    padding: 20px 24px 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.ca-search-items-title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #2271b1 !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    border: none !important;
}
.ca-search-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.ca-search-item-card {
    text-decoration: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}
.ca-search-item-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.ca-sic-img { background: #f1f5f9; height: 120px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ca-sic-img img { max-width: 100%; max-height: 120px; object-fit: contain; }
.ca-sic-body { padding: 8px 10px; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ca-sic-brand { font-size: .65rem; color: #94a3b8; text-transform: uppercase; font-weight: 600; }
.ca-sic-title { font-size: .78rem; font-weight: 700; color: #0f172a; line-height: 1.3; }
.ca-sic-num   { font-size: .65rem; color: #94a3b8; }
.ca-sic-price { margin-top: auto; padding-top: 5px; display: flex; align-items: baseline; gap: 5px; }
.ca-sic-sale  { font-size: .9rem; font-weight: 800; color: #dc2626; }
.ca-sic-orig  { font-size: .72rem; color: #94a3b8; text-decoration: line-through; }
.ca-sic-reg   { font-size: .9rem; font-weight: 800; color: #1e293b; }
@media (max-width: 600px) { .ca-search-items-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Dual country layout (CA + US side by side) ── */
.ca-dual-country {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.ca-dual-col { display: flex; flex-direction: column; gap: 6px; }
.ca-dual-label {
    font-size: .78rem; font-weight: 700; color: #64748b;
    text-transform: uppercase; letter-spacing: .06em;
    padding: 4px 0;
}
.ca-dual-col .ca-deal-card { margin: 0; }
@media (max-width: 640px) {
    .ca-dual-country { grid-template-columns: 1fr; }
}

/* ── As Mentioned In ── */
.ca-mentioned-in-wrap { display: flex; flex-direction: column; gap: .5rem; margin: 1rem 0; }
.ca-mentioned-in {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 1rem; padding: 10px 14px;
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: .82rem;
}
.ca-mentioned-label { color: #64748b; font-weight: 600; white-space: nowrap; }
.ca-mentioned-link  { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #1e293b; flex: 1; }
.ca-mentioned-link:hover { color: #2271b1; }
.ca-mentioned-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.ca-mentioned-text  { display: flex; flex-direction: column; gap: 2px; }
.ca-mentioned-text strong { font-size: .85rem; }
.ca-mentioned-date  { font-size: .72rem; color: #94a3b8; }

/* ── Two-column product page layout ── */
.ca-product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}
.ca-product-left  { min-width: 0; }
.ca-product-right { min-width: 0; position: sticky; top: 2rem; }

@media (max-width: 860px) {
    .ca-product-layout {
        grid-template-columns: 1fr;
    }
    .ca-product-right { position: static; }
}

/* ── Dual-country product page (CA + US): cards full-width, reviews below ── */
.ca-product-dual-layout { }
.ca-dual-cards-wrap { margin-bottom: 1rem; }
.ca-product-below { }

/* ── Larger search results grid ── */
.ca-search-grid-large {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
@media (max-width: 600px) {
    .ca-search-grid-large { grid-template-columns: repeat(2, 1fr); }
}

/* ── Price History "More Info" toggle ── */
.ca-more-info { margin-top: 10px; border-top: 1px solid #f0f0f0; padding-top: 8px; }
.ca-more-info-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .8rem; font-weight: 600; color: #2271b1;
    cursor: pointer; list-style: none; padding: 4px 0;
    user-select: none;
}
.ca-more-info-btn::-webkit-details-marker { display: none; }
.ca-more-info[open] .ca-more-info-btn { color: #135e96; }
.ca-more-info-body { margin-top: 8px; }

/* ── Card shell ── */
.ca-deal-card {
    position: relative;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    transition: transform .2s ease, box-shadow .2s ease;
    max-width: 560px;
    margin: 1.5rem auto;
}
.ca-deal-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.12); }
.ca-deal-card.ca-expired { opacity: .6; filter: grayscale(30%); }

/* ── Country strip ── */
.ca-country-strip {
    position: absolute; top: 0; left: 0; right: 0;
    background: rgba(0,0,0,.55); color: #fff;
    font-size: .7rem; font-weight: 700;
    padding: 4px 10px; z-index: 3;
    display: flex; align-items: center; gap: 5px;
    letter-spacing: .06em; text-transform: uppercase;
}

/* ── Photo gallery on product page ── */
.ca-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 1rem 0 1.5rem;
}
.ca-gallery-thumb {
    display: block !important;   /* override ca-lightbox-trigger: block */
    width: 100% !important;      /* fill grid cell */
    aspect-ratio: 1;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    padding: 0; background: #f8fafc;
    cursor: zoom-in;
    transition: border-color .15s, transform .15s;
}
.ca-gallery-thumb img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.ca-gallery-thumb:hover,
.ca-gallery-thumb-active { border-color: #2271b1; }
@media (max-width: 480px) {
    .ca-gallery { grid-template-columns: repeat(3, 1fr); gap: 5px; }
}

/* ── Card image ── */
/* Product page: show full image at natural proportions — no cropping */
.ca-deal-image { position: relative !important; width: 100%; background: #f8f9fb; }
.ca-deal-image img { width: 100%; height: auto; display: block; object-fit: contain; }
.ca-deal-card:hover .ca-deal-image img { transform: scale(1.03); }

/* ── Lightbox trigger button ── */
.ca-lightbox-trigger {
    display: block; width: 100%; padding: 0; border: none; background: none;
    cursor: zoom-in; position: relative; overflow: hidden;
}
.ca-lightbox-trigger img { display: block; width: 100%; height: auto; transition: transform .35s ease; }
.ca-deal-card:hover .ca-lightbox-trigger img { transform: scale(1.03); }
.ca-lightbox-icon {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(0,0,0,.45); color: #fff;
    font-size: 1rem; line-height: 1; padding: 5px 7px; border-radius: 6px;
    opacity: 0; transition: opacity .2s;
    pointer-events: none;
}
.ca-deal-card:hover .ca-lightbox-icon,
.ca-lightbox-trigger:focus .ca-lightbox-icon { opacity: 1; }

/* ── Lightbox overlay ── */
#ca-lightbox {
    display: none;
    position: fixed; inset: 0; z-index: 99999;
    align-items: center; justify-content: center;
}
#ca-lb-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.88);
    backdrop-filter: blur(4px);
}
#ca-lb-inner {
    position: relative; z-index: 1;
    max-width: min(92vw, 1100px);
    max-height: 92vh;
    display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
#ca-lb-img {
    max-width: 100%; max-height: 82vh;
    object-fit: contain; border-radius: 8px;
    opacity: 0; transition: opacity .25s ease;
    box-shadow: 0 8px 48px rgba(0,0,0,.6);
}
#ca-lightbox.ca-lb-ready #ca-lb-img { opacity: 1; }
/* Spinner while image loads */
#ca-lightbox.ca-lb-open:not(.ca-lb-ready) #ca-lb-inner::before {
    content: '';
    display: block; width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ca-lb-spin .7s linear infinite;
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
}
@keyframes ca-lb-spin { to { transform: translate(-50%,-50%) rotate(360deg); } }
#ca-lb-caption {
    color: rgba(255,255,255,.8); font-size: .85rem;
    text-align: center; margin: 0; padding: 0 1rem;
    max-width: 600px; line-height: 1.4;
}
#ca-lb-close {
    position: fixed; top: 16px; right: 20px; z-index: 2;
    background: rgba(255,255,255,.12); border: none;
    color: #fff; font-size: 1.6rem; line-height: 1;
    width: 40px; height: 40px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
#ca-lb-close:hover,
#ca-lb-close:focus { background: rgba(255,255,255,.25); outline: none; }

/* Prev / Next nav arrows */
#ca-lb-prev, #ca-lb-next {
    position: fixed; top: 50%; transform: translateY(-50%); z-index: 2;
    background: rgba(255,255,255,.12); border: none;
    color: #fff; font-size: 2.2rem; line-height: 1;
    width: 52px; height: 52px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
    user-select: none;
}
#ca-lb-prev { left: 16px; }
#ca-lb-next { right: 16px; }
#ca-lb-prev:hover, #ca-lb-prev:focus,
#ca-lb-next:hover, #ca-lb-next:focus { background: rgba(255,255,255,.28); outline: none; }

/* Counter "3 / 12" */
#ca-lb-counter {
    color: rgba(255,255,255,.5); font-size: .78rem;
    text-align: center; margin: 0; letter-spacing: .06em;
}

/* Transition between slides */
#ca-lb-img { transition: opacity .2s ease; }
#ca-lb-img.ca-lb-ready { opacity: 1; }

/* Mobile: smaller arrows */
@media (max-width: 600px) {
    #ca-lb-prev, #ca-lb-next { width: 40px; height: 40px; font-size: 1.6rem; }
    #ca-lb-prev { left: 8px; }
    #ca-lb-next { right: 8px; }
}

/* Hide country strip on embedded cards — redundant since item # is in body */
.ca-deals-grid .ca-country-strip { display: none; }

/* ── Corner badges ── */
.ca-pct-badge {
    position: absolute; top: 30px; left: 12px; z-index: 4;
    background: #dc2626; color: #fff;
    border-radius: 8px; font-size: .95rem; font-weight: 800;
    padding: 4px 11px;
}
.ca-corner-badge { position: absolute; top: 30px; right: 12px; z-index: 4; border-radius: 20px; font-size: .72rem; font-weight: 700; padding: 4px 10px; }
.ca-badge-expired { background: #64748b; color: #fff; }
.ca-badge-ending  { background: #ea580c; color: #fff; animation: ca-pulse 1.6s infinite; }
@keyframes ca-pulse { 0%,100%{opacity:1} 50%{opacity:.7} }

/* ── Body ── */
.ca-deal-body { padding: .9rem 1.1rem 1rem; }
.ca-deal-title { font-size: 1rem; font-weight: 800; color: #0f172a; margin: 0 0 4px; line-height: 1.3; text-transform: uppercase; letter-spacing: .015em; }

/* ── Item numbers ── */
.ca-item-nums { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ca-item-nums span { font-size: .73rem; color: #64748b; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 2px 7px; font-weight: 600; }

/* ── Pricing ── */
.ca-pricing-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ca-sale-price    { font-size: 2rem; font-weight: 900; color: #dc2626; line-height: 1; }
.ca-regular-price { font-size: 2rem; font-weight: 900; color: #1e293b; line-height: 1; }
.ca-orig-price    { font-size: 1rem; color: #94a3b8; text-decoration: line-through; }
.ca-ph-regular    { font-weight: 700; color: #1e293b; }
.ca-atl-badge   { display: inline-flex; align-items: center; background: #fef9c3; border: 1px solid #fde047; color: #854d0e; border-radius: 20px; font-size: .68rem; font-weight: 700; padding: 3px 8px; gap: 3px; }

/* ── Savings ── */
.ca-savings-strip { display: flex; gap: 6px; align-items: center; background: linear-gradient(135deg,#f0fdf4,#dcfce7); border: 1px solid #86efac; border-radius: 8px; padding: 7px 12px; margin-bottom: 8px; flex-wrap: wrap; font-size: .82rem; }
.ca-savings-strip.ca-savings-expired { background: #f8fafc; border-color: #e2e8f0; color: #64748b; font-size: .78rem; }
.ca-savings-until { font-weight: 700; color: #166534; }
.ca-savings-sep   { color: #86efac; }
.ca-savings-amt   { font-weight: 800; color: #166534; }
.ca-savings-pct   { color: #16a34a; font-weight: 600; }
.ca-savings-urgent{ color: #dc2626; font-weight: 700; }

/* ── Sale prediction banner ── */
.ca-prediction {
    display: flex; gap: 10px; align-items: flex-start;
    background: #fefce8; border: 1px solid #fde68a;
    border-radius: 10px; padding: 10px 12px;
    margin: 10px 0 4px; font-size: .82rem; line-height: 1.45;
}
.ca-prediction-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.ca-prediction-text { color: #78350f; }
.ca-prediction-text strong { color: #92400e; }

/* ── Share buttons ── */
.ca-share-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 0 4px;
    border-top: 1px solid #f1f5f9;
    margin-top: 8px;
    flex-wrap: wrap;
}
.ca-share-label {
    font-size: .65rem;
    font-weight: 700;
    color: #b0bec5;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-right: 1px;
}
.ca-share-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.18) !important;
    flex-shrink: 0 !important;
    background-clip: padding-box !important;
    outline: none !important;
    line-height: 1 !important;
}
.ca-share-btn:hover {
    transform: scale(1.12) !important;
    box-shadow: 0 3px 10px rgba(0,0,0,.22) !important;
    text-decoration: none !important;
}
.ca-share-btn:active { transform: scale(.96) !important; }
.ca-share-sms { background: #25D366 !important; }
.ca-share-fb  { background: #1877F2 !important; }
.ca-share-tt  { background: #000 !important; }
.ca-share-ig  { background: radial-gradient(circle at 30% 107%, #fdf497 0%,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285AEB 90%) !important; }
.ca-share-btn svg { display: block; pointer-events: none; }
.ca-share-loc {
    margin-left: auto;
    font-size: .68rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

/* ── Product Showcase video button ── */
.ca-showcase-btn {
    display: inline-flex !important; align-items: center; gap: 6px;
    margin-top: 8px; margin-bottom: 4px;
    padding: 8px 14px !important;
    background: #fff !important; border: 1.5px solid #e2e8f0 !important; border-radius: 8px !important;
    font-size: .82rem !important; font-weight: 700 !important; color: #1e293b !important;
    text-decoration: none !important; transition: border-color .15s, background .15s;
    width: 100%; box-sizing: border-box; justify-content: center;
}
.ca-showcase-btn:hover { border-color: #FF0000 !important; background: #fff5f5 !important; color: #c00 !important; }

/* ── Price History link ── */
.ca-more-info-link {
    display: inline-flex !important; align-items: center; gap: 5px;
    font-size: .8rem !important; font-weight: 600 !important; color: #2271b1 !important;
    text-decoration: none !important; margin-top: 8px; padding: 4px 0;
    border-top: 1px solid #f0f0f0; width: 100%;
    background: transparent !important;
}
.ca-more-info-link:hover { color: #135e96 !important; text-decoration: underline !important; }

/* ── Stats row ── */
.ca-stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: #e2e8f0; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.ca-stat { background: #fff; padding: 8px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.ca-stat-label { font-size: .62rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.ca-stat-value { font-size: .9rem; font-weight: 700; color: #1e293b; }
.ca-stat-high  { color: #dc2626; }
.ca-stat-low   { color: #16a34a; }
.ca-stat-now   { font-size: .6rem; color: #ca8a04; font-weight: 700; }

/* ── Chart tabs ── */
.ca-chart-wrap { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.ca-chart-tabs { display: flex; background: #f1f5f9; border-bottom: 1px solid #e2e8f0; }
.ca-tab { flex: 1; padding: 8px 10px; font-size: .77rem; font-weight: 600; color: #64748b; background: transparent; border: none; cursor: pointer; transition: all .15s; border-bottom: 2px solid transparent; }
.ca-tab:hover { color: #334155; }
.ca-tab.active { color: #2271b1; border-bottom-color: #2271b1; background: #fff; }
.ca-tab-yt { color: #cc0000 !important; text-decoration: none; margin-left: auto; }
.ca-tab-yt:hover { color: #990000 !important; background: #fff5f5; }
.ca-tab-panel { display: none; padding: 12px; }
.ca-tab-panel.active { display: block; }

/* ── History table ── */
.ca-ph-table { width: 100%; border-collapse: collapse; font-size: .75rem; }
.ca-ph-table th { background: #f1f5f9; padding: 5px 7px; text-align: left; font-weight: 600; font-size: .67rem; color: #64748b; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e2e8f0; }
.ca-ph-table td { padding: 5px 7px; border-bottom: 1px solid #f0f0f0; }
.ca-ph-table tr:last-child td { border-bottom: none; }
.ca-ph-table tr:hover td { background: #f8fafc; }
.ca-ph-sale    { color: #dc2626; font-weight: 700; }
.ca-ph-orig-td { color: #94a3b8; text-decoration: line-through; }
.ca-ph-save    { color: #16a34a; font-weight: 600; }

/* ── Meta footer ── */
.ca-deal-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: .78rem; color: #64748b; border-top: 1px solid #f0f0f0; padding-top: 9px; }
.ca-deal-meta span { display: flex; align-items: center; gap: 4px; }
.ca-expired-text { color: #dc2626 !important; }

/* ── Grid ── */
.ca-deals-grid { display: grid; gap: 1.4rem; margin: 1.5rem 0; }
.ca-deals-grid .ca-deal-card { margin: 0; max-width: none; }
.ca-cols-1 { grid-template-columns: 1fr; }
.ca-cols-2,
.ca-cols-3,
.ca-cols-4 { grid-template-columns: repeat(2, 1fr); }
.ca-compact .ca-deal-title { font-size: .88rem; }
.ca-compact .ca-sale-price    { font-size: 1.5rem; }
.ca-compact .ca-regular-price { font-size: 1.5rem; }
.ca-compact .ca-stats-row  { grid-template-columns: repeat(2,1fr); }

.ca-error { color: #dc2626; font-size: .9rem; font-style: italic; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .ca-cols-1,
    .ca-cols-2,
    .ca-cols-3,
    .ca-cols-4 { grid-template-columns: 1fr; }
    .ca-sale-price { font-size: 1.7rem; }
    .ca-stats-row  { grid-template-columns: repeat(2,1fr); }
}

/* ============================================================
   Videos Section
   ============================================================ */
.ca-videos-section {
    margin: 2rem 0;
}
.ca-section-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}
.ca-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.ca-video-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.ca-video-platform-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    font-size: .82rem;
    font-weight: 700;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.ca-video-youtube  .ca-video-platform-badge { color: #cc0000; }
.ca-video-tiktok   .ca-video-platform-badge { color: #010101; }
.ca-video-instagram .ca-video-platform-badge { color: #c13584; }
.ca-video-facebook  .ca-video-platform-badge { color: #1877F2; }

.ca-video-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; }
.ca-video-embed iframe,
.ca-video-embed blockquote { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; border: 0; }

/* TikTok embeds don't suit the 16:9 ratio — give them natural height */
.ca-video-tiktok .ca-video-embed { padding-bottom: 0; height: auto; }
.ca-video-tiktok .ca-video-embed blockquote { position: static; width: 100% !important; }

/* Link card (Instagram / Facebook — can't iframe embed) */
.ca-video-link-card {
    display: block;
    text-decoration: none;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fb, #fff);
    transition: background .15s;
}
.ca-video-link-card:hover { background: linear-gradient(135deg, #f0f4ff, #f8f9fb); }
.ca-video-link-inner { text-align: center; }
.ca-video-play-icon  { font-size: 2.5rem; margin-bottom: .5rem; }
.ca-video-link-label { font-weight: 700; color: #1e293b; font-size: .95rem; margin-bottom: .25rem; }
.ca-video-link-url   { font-size: .75rem; color: #94a3b8; }

/* ============================================================
   Reviews / Ratings Section
   ============================================================ */
.ca-reviews-section { margin: 2.5rem 0; }

/* Summary */
.ca-reviews-summary {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.ca-reviews-avg { text-align: center; min-width: 80px; }
.ca-avg-score   { font-size: 3rem; font-weight: 900; color: #1e293b; line-height: 1; }
.ca-avg-stars   { margin: .25rem 0; }
.ca-avg-count   { font-size: .78rem; color: #94a3b8; margin-top: .2rem; }

.ca-rating-bars { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 5px; }
.ca-rating-bar-row { display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.ca-rb-label { width: 26px; color: #64748b; text-align: right; flex-shrink: 0; font-weight: 600; }
.ca-rb-track { flex: 1; height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.ca-rb-fill  { height: 100%; background: #fbbf24; border-radius: 4px; transition: width .4s ease; }
.ca-rb-count { width: 20px; color: #94a3b8; font-size: .75rem; }

/* Star display */
.ca-stars        { display: inline-flex; gap: 1px; }
.ca-star-full    { color: #fbbf24; font-size: 1.1rem; }
.ca-star-half    { color: #fbbf24; font-size: 1.1rem; opacity: .5; }
.ca-star-empty   { color: #d1d5db; font-size: 1.1rem; }

/* Individual review card */
.ca-reviews-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.ca-review-card  {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.ca-review-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .6rem;
    flex-wrap: wrap;
}
.ca-avatar          { border-radius: 50%; }
.ca-reviewer-info   { flex: 1; }
.ca-reviewer-name   { display: block; font-size: .9rem; color: #1e293b; }
.ca-review-date     { font-size: .75rem; color: #94a3b8; }
.ca-review-stars    { margin-left: auto; }
.ca-review-body     { font-size: .9rem; color: #334155; line-height: 1.6; }
.ca-review-body p   { margin: 0 0 .5em; }
.ca-review-admin-actions { margin-top: .5rem; }
.ca-no-reviews      { color: #94a3b8; font-style: italic; font-size: .9rem; margin-bottom: 1.5rem; }

/* Star picker in form */
.ca-rating-field    { margin-bottom: 1rem; }
.ca-rating-field label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: .4rem; color: #374151; }
.ca-star-picker     { display: flex; gap: 4px; cursor: pointer; }
.ca-star            { font-size: 2rem; color: #d1d5db; transition: color .1s; line-height: 1; user-select: none; }
.ca-star.hover,
.ca-star.selected   { color: #fbbf24; }
.ca-rating-label    { font-size: .8rem; color: #64748b; margin-top: .3rem; min-height: 1.2em; }

/* Review form wrapper */
.ca-review-form-wrap { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 1.5rem; }
.ca-review-form-title { font-size: 1rem; font-weight: 700; margin: 0 0 1rem; color: #1e293b; }
.ca-commentform label { display: block; font-weight: 600; font-size: .85rem; color: #374151; margin-bottom: .3rem; margin-top: .8rem; }
.ca-commentform input[type=text],
.ca-commentform input[type=email],
.ca-commentform input[type=url],
.ca-commentform textarea {
    width: 100%; padding: 8px 10px; border: 1px solid #d1d5db;
    border-radius: 6px; font-size: .9rem; box-sizing: border-box;
    font-family: inherit; background: #fff;
}
.ca-commentform textarea    { resize: vertical; min-height: 100px; }
.ca-commentform input[type=text]:focus,
.ca-commentform input[type=email]:focus,
.ca-commentform textarea:focus { outline: none; border-color: #2271b1; box-shadow: 0 0 0 2px rgba(34,113,177,.15); }
.ca-mf-comment label { display: block; font-weight: 600; font-size: .85rem; color: #374151; margin-bottom: .3rem; }
.ca-commentform .form-submit { margin-top: 1rem; }
.ca-commentform .submit {
    background: #2271b1; color: #fff; border: none; border-radius: 7px;
    padding: 10px 24px; font-size: .9rem; font-weight: 700; cursor: pointer; transition: background .15s;
}
.ca-commentform .submit:hover { background: #135e96; }

/* Logged-out note */
.ca-commentform .must-log-in,
.ca-commentform .logged-in-as { font-size: .82rem; color: #64748b; margin-bottom: .75rem; }

/* ============================================================
   Nutrition Facts Panel
   ============================================================ */
.ca-nutrition-section { margin: 2rem 0; }

.ca-nutrition-panel {
    border: 3px solid #1e293b;
    border-radius: 4px;
    max-width: 340px;
    font-family: Arial, sans-serif;
    overflow: hidden;
    margin-bottom: 1rem;
}
.ca-nf-serving {
    background: #f8fafc;
    padding: 8px 12px;
    font-size: .8rem;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ca-nf-calories-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #1e293b;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    border-bottom: 4px solid #fff;
}
.ca-nf-calories-val { font-size: 1.6rem; font-weight: 900; line-height: 1; }

.ca-nf-rows { padding: 4px 0; }
.ca-nf-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 12px;
    font-size: .82rem;
    border-bottom: 1px solid #e2e8f0;
}
.ca-nf-row:last-child { border-bottom: none; }
.ca-nf-indent { padding-left: 28px; }
.ca-nf-indent .ca-nf-label { color: #64748b; }
.ca-nf-val { font-weight: 700; color: #1e293b; }

.ca-ingredients {
    font-size: .8rem;
    color: #475569;
    line-height: 1.5;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: .75rem;
}
.ca-allergens {
    font-size: .82rem;
    font-weight: 600;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: .75rem;
}
.ca-cooking {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: .75rem;
}
.ca-cooking h4 { font-size: .9rem; font-weight: 700; margin: 0 0 .5rem; color: #166534; }
.ca-cooking p  { font-size: .85rem; color: #374151; margin: 0; line-height: 1.6; }
.ca-storage {
    font-size: .82rem;
    color: #475569;
    margin-bottom: .5rem;
}

/* ── Front-end filter toggle bar ── */
.ca-filter-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.ca-fb-btn {
    padding: 5px 13px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #475569;
    transition: all .13s;
    line-height: 1.4;
}
.ca-fb-btn:hover { border-color: #2271b1; color: #2271b1; }
.ca-fb-btn.active { background: #2271b1; color: #fff; border-color: #2271b1; }
.ca-fb-btn[data-filter="regular"].active  { background: #475569; border-color: #475569; }
.ca-fb-btn[data-filter="sale"].active     { background: #dc2626; border-color: #dc2626; }
.ca-fb-btn[data-filter="clearance"].active { background: #d97706; border-color: #d97706; }
.ca-fb-sep { color: #cbd5e1; font-size: .85rem; margin: 0 2px; }
.ca-card-hidden { display: none !important; }
   FAVORITES — Heart Button
   ═══════════════════════════════════════════════════════════════ */
.ca-fav-btn {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 20;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.92);
    box-shadow: 0 1px 5px rgba(0,0,0,.22);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s, background .15s, color .15s;
    color: #94a3b8;
    padding: 0;
    pointer-events: all;
    -webkit-tap-highlight-color: transparent;
}
.ca-fav-btn:hover  { background: #fff; color: #ef4444; transform: scale(1.12); }
.ca-fav-btn:active { transform: scale(.92); }
.ca-fav-btn.ca-fav-active { color: #ef4444; background: #fff5f5; }
/* Card must be position:relative for absolute heart to work */
.ca-deal-card { position: relative; }

/* Nav count badge */
.ca-fav-nav-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
    background: #ef4444; color: #fff; font-size: .65rem; font-weight: 700;
    vertical-align: top; margin-left: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   FAVORITES — Page & Account
   ═══════════════════════════════════════════════════════════════ */
.ca-fav-page { max-width: 1200px; margin: 0 auto; padding: 0 0 4rem; }
.ca-fav-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 1rem 0 1.25rem; border-bottom: 2px solid #f1f5f9; margin-bottom: 1.5rem; }
.ca-fav-toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ca-fav-title { margin: 0; font-size: 1.4rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.ca-fav-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px; background: #ef4444; color: #fff; border-radius: 13px; font-size: .85rem; font-weight: 700; }
.ca-view-toggle { display: flex; border: 1.5px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.ca-vbtn { width: 36px; height: 34px; border: none; background: #fff; color: #94a3b8; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.ca-vbtn:hover { color: #2271b1; }
.ca-vbtn.active { background: #2271b1; color: #fff; }
.ca-fav-action-btn { display: flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 8px; border: 1.5px solid #e2e8f0; background: #fff; font-size: .83rem; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; white-space: nowrap; }
.ca-fav-action-btn:hover { border-color: #2271b1; background: #f0f6ff; }
.ca-btn-shopping { background: #2271b1; color: #fff; border-color: #2271b1; }
.ca-btn-shopping:hover { background: #1a5a9a; border-color: #1a5a9a; }
@media (max-width: 480px) { .ca-btn-label { display: none; } }
.ca-fav-empty { text-align: center; padding: 4rem 2rem; color: #64748b; }
.ca-fav-empty-icon { font-size: 4rem; margin-bottom: 1rem; color: #e2e8f0; }
.ca-fav-table { width: 100%; border-collapse: collapse; }
.ca-fav-table th { text-align: left; font-size: .72rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; padding: 8px 10px; border-bottom: 2px solid #f1f5f9; }
.ca-fav-row { border-bottom: 1px solid #f1f5f9; transition: background .15s, transform .2s, opacity .2s; }
.ca-fav-row:hover { background: #f8fafc; }
.ca-fav-row td { padding: 10px; vertical-align: middle; }
.ca-fav-row-thumb img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; display: block; }
.ca-fav-row-brand { display: block; font-size: .68rem; color: #94a3b8; text-transform: uppercase; font-weight: 600; margin-bottom: 2px; }
.ca-fav-row-title a { color: #0f172a; text-decoration: none; font-weight: 600; font-size: .9rem; }
.ca-fav-row-title a:hover { color: #2271b1; }
.ca-fav-row-num { font-size: .8rem; color: #64748b; white-space: nowrap; }
.ca-fav-row-price { white-space: nowrap; }
.ca-fav-row-actions { text-align: right; }
.ca-fav-delete-btn { width: 28px; height: 28px; border-radius: 50%; border: none; background: transparent; color: #94a3b8; font-size: .9rem; cursor: pointer; transition: background .15s, color .15s; display: inline-flex; align-items: center; justify-content: center; }
.ca-fav-delete-btn:hover { background: #fee2e2; color: #ef4444; }
@media (max-width: 600px) { .ca-fav-table th:nth-child(3), .ca-fav-row td:nth-child(3) { display: none; } }
.ca-account-wrap { max-width: 420px; margin: 2rem auto; background: #fff; border: 1.5px solid #e2e8f0; border-radius: 16px; padding: 2rem; box-shadow: 0 4px 24px rgba(0,0,0,.06); }
.ca-account-header { display: flex; align-items: center; gap: 14px; margin-bottom: 1.5rem; }
.ca-account-avatar { width: 52px; height: 52px; border-radius: 50%; background: #2271b1; color: #fff; font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ca-account-name { font-weight: 700; font-size: 1.05rem; }
.ca-account-email { font-size: .83rem; color: #64748b; }
.ca-account-stats { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.ca-account-stat { flex: 1; text-align: center; padding: .75rem; background: #f8fafc; border-radius: 10px; }
.ca-account-stat-num { display: block; font-size: 1.6rem; font-weight: 800; color: #2271b1; }
.ca-account-stat-label { font-size: .75rem; color: #64748b; }
.ca-account-actions { display: flex; flex-direction: column; gap: 8px; }
.ca-account-tabs { display: flex; border-bottom: 2px solid #f1f5f9; margin-bottom: 1.5rem; }
.ca-atab { flex: 1; padding: 10px; border: none; background: transparent; font-size: .9rem; font-weight: 600; color: #64748b; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .15s, border-color .15s; }
.ca-atab.active { color: #2271b1; border-bottom-color: #2271b1; }
.ca-account-form label { display: flex; flex-direction: column; gap: 5px; font-size: .83rem; font-weight: 600; color: #374151; margin-bottom: 1rem; }
.ca-account-form input[type=text], .ca-account-form input[type=email], .ca-account-form input[type=password] { padding: 9px 12px; border: 1.5px solid #e2e8f0; border-radius: 8px; font-size: .95rem; transition: border-color .15s; width: 100%; box-sizing: border-box; }
.ca-account-form input:focus { outline: none; border-color: #2271b1; }
.ca-account-error { background: #fee2e2; color: #b91c1c; padding: 10px 14px; border-radius: 8px; font-size: .85rem; margin-bottom: 1rem; }
.ca-account-ok { background: #dcfce7; color: #166534; padding: 10px 14px; border-radius: 8px; font-size: .85rem; margin-bottom: 1rem; }
.ca-account-switch, .ca-account-note { font-size: .8rem; color: #64748b; text-align: center; margin: .75rem 0 0; }
.ca-account-switch a { color: #2271b1; text-decoration: none; font-weight: 600; }
.ca-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 9px; font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer; border: none; transition: background .15s, transform .1s; }
.ca-btn:active { transform: scale(.97); }
.ca-btn-primary { background: #2271b1; color: #fff; }
.ca-btn-primary:hover { background: #1a5a9a; color: #fff; }
.ca-btn-secondary { background: #f1f5f9; color: #374151; }
.ca-btn-secondary:hover { background: #e2e8f0; }
.ca-btn-full { width: 100%; }
.ca-hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   SHOPPING MODE
   ═══════════════════════════════════════════════════════════════ */
.ca-shop-overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 999999; background: #0f172a; display: flex; flex-direction: column; color: #fff; font-family: inherit; overscroll-behavior: contain; }
.ca-shop-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: #1e293b; flex-shrink: 0; border-bottom: 1px solid #334155; }
.ca-shop-header-left { display: flex; align-items: center; gap: 10px; }
.ca-shop-header-right { display: flex; align-items: center; gap: 12px; }
.ca-shop-logo { font-size: 1.4rem; }
.ca-shop-header-title { font-size: 1.05rem; font-weight: 700; color: #f1f5f9; }
.ca-shop-item-count { font-size: .82rem; color: #64748b; font-weight: 600; }
.ca-shop-close { background: #334155; border: none; color: #f1f5f9; font-size: .82rem; font-weight: 700; cursor: pointer; padding: 7px 14px; border-radius: 8px; transition: background .15s; white-space: nowrap; }
.ca-shop-close:hover { background: #475569; }
.ca-shop-list { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; -webkit-overflow-scrolling: touch; }
.ca-shop-row { display: flex; align-items: center; gap: 14px; background: #1e293b; border-radius: 14px; padding: 12px 14px; border: 1px solid #334155; }
.ca-shop-row-img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #0f172a; }
.ca-shop-row-placeholder { width: 64px; height: 64px; border-radius: 10px; background: #0f172a; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; flex-shrink: 0; }
.ca-shop-row-info { flex: 1; min-width: 0; }
.ca-shop-row-brand { font-size: .68rem; color: #64748b; text-transform: uppercase; font-weight: 700; letter-spacing: .07em; margin-bottom: 3px; }
.ca-shop-row-title { display: block; font-size: 1rem; font-weight: 700; color: #f1f5f9; line-height: 1.3; text-decoration: none; margin-bottom: 4px; }
.ca-shop-row-title:hover { color: #93c5fd; }
.ca-shop-row-num { font-size: .8rem; color: #64748b; }
.ca-shop-row-price { font-size: 1.3rem; font-weight: 800; color: #34d399; flex-shrink: 0; white-space: nowrap; }
@media (min-width: 600px) { .ca-shop-list { padding: 16px 24px; max-width: 700px; margin: 0 auto; width: 100%; } .ca-shop-row-img, .ca-shop-row-placeholder { width: 80px; height: 80px; } .ca-shop-row-title { font-size: 1.1rem; } .ca-shop-row-price { font-size: 1.5rem; } }

/* ═══════════════════════════════════════════════════════════════
   PRINT
   ═══════════════════════════════════════════════════════════════ */
@media print { body > *:not(#ca-print-area) { display: none !important; } #ca-print-area { display: block !important; } .ca-print-table { width: 100%; border-collapse: collapse; font-size: 13pt; } .ca-print-table th, .ca-print-table td { border: 1px solid #ccc; padding: 8px 10px; text-align: left; } .ca-print-table th { background: #f5f5f5; font-weight: 700; } .ca-print-date, .ca-print-footer { color: #666; font-size: 10pt; margin: 6px 0; } h1 { font-size: 18pt; margin-bottom: 6px; } }
