/* Storefront polish: cleaner cards, richer home, readability modes. Loaded after all other styles. */

/* ---- Cleaner product cards ---- */
.product-card .product-meta { display: none; }
.product-card h3 { min-height: 0; margin: 10px 0 4px; }
.product-card .price { font-size: 24px; font-weight: 800; margin: 2px 0 4px; }
.product-card .stock { margin-bottom: 8px; }
.product-card { transition: transform .15s ease, border-color .15s ease; }
.product-card:hover { transform: translateY(-2px); border-color: var(--lime); }
.add-row button:focus-visible, .qty button:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---- Header tools ---- */
.cf-tool { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; display: grid; justify-items: center; gap: 2px; padding: 4px 8px; }
.cf-aa { font-weight: 800; font-size: 18px; line-height: 1; }
.cf-tool small { font-size: 12px; }

/* ---- Home ---- */
.cf-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 28px; }
.cf-trust div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.cf-trust b { display: block; font-size: 17px; }
.cf-trust small { color: var(--muted); font-size: 14px; }
.cf-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 30px; }
.cf-cat { position: relative; display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px; min-height: 120px; overflow: hidden; transition: transform .15s ease, border-color .15s ease; }
.cf-cat:hover { transform: translateY(-2px); border-color: var(--lime); }
.cf-cat img { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: 14px; flex: none; }
.cf-cat b { display: block; font-size: 22px; font-family: "Playfair Display", serif; }
.cf-cat small { color: var(--muted); font-size: 15px; }
.cf-steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0; margin: 0 0 30px; }
.cf-steps li { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.cf-steps span { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--lime); color: #17210c; font-weight: 800; font-size: 19px; margin-bottom: 8px; }
.cf-steps b { display: block; font-size: 19px; }
.cf-steps small { color: var(--muted); font-size: 15px; }
.cf-visit { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; background: linear-gradient(120deg, #254f3d, #183a30); color: #f7f2e9; border-radius: 22px; padding: 26px 28px; margin: 10px 0 34px; }
.cf-visit h2 { margin: 4px 0 6px; font-family: "Playfair Display", serif; font-size: 28px; }
.cf-visit p { margin: 0; font-size: 17px; color: #e8efe6; }

/* ---- Contact button ---- */
.cf-contact { position: fixed; left: 16px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.cf-contact a { display: block; padding: 13px 18px; border-radius: 999px; font-weight: 800; font-size: 16px; box-shadow: 0 8px 24px #0006; text-align: center; }
.cf-wa { background: #25d366; color: #06310f; }
.cf-ph { background: var(--lime); color: #17210c; }

/* ---- Larger text mode ---- */
html.big-text body { font-size: 20px; }
html.big-text .product-card h3 { font-size: 20px; }
html.big-text .product-card .price { font-size: 28px; }
html.big-text .stock, html.big-text .add-row button, html.big-text .qty { font-size: 18px; }
html.big-text .add-row button, html.big-text .qty { min-height: 52px; }
html.big-text .category-scroll a, html.big-text .head-action small { font-size: 16px; }
html.big-text .cf-steps small, html.big-text .cf-cat small, html.big-text .cf-trust small { font-size: 17px; }

/* ---- Light theme ---- */
html[data-theme="light"] { --ink: #1f1b16; --muted: #5a5246; --bg: #fbf8f1; --panel: #ffffff; --panel2: #f4efe3; --line: #ddd3bf; --shadow: 0 12px 30px #0002; color-scheme: light; }
html[data-theme="light"] body { background: var(--bg); color: var(--ink); }
html[data-theme="light"] .utility { background: #efe8d6; color: #4a4338; }
html[data-theme="light"] .header, html[data-theme="light"] .category-nav { background: #fffdf8; border-color: var(--line); }
html[data-theme="light"] .search-wrap input, html[data-theme="light"] .sort, html[data-theme="light"] select, html[data-theme="light"] input, html[data-theme="light"] textarea { background: #fff; color: var(--ink); border-color: var(--line); }
html[data-theme="light"] .product-card, html[data-theme="light"] .summary, html[data-theme="light"] .cart-panel, html[data-theme="light"] .trust-card, html[data-theme="light"] .shortcut, html[data-theme="light"] .filters { background: #fff; border-color: var(--line); }
html[data-theme="light"] .product-card h3, html[data-theme="light"] .price { color: var(--ink); }
html[data-theme="light"] .category-scroll a, html[data-theme="light"] .head-action, html[data-theme="light"] .cf-tool { color: var(--ink); }
html[data-theme="light"] .stock { color: #2f7a1d; }
html[data-theme="light"] .stock.out { color: #b3402a; }
html[data-theme="light"] .footer { background: #efe8d6; color: var(--ink); border-color: var(--line); }
html[data-theme="light"] .mobile-nav { background: #fffdf8; border-color: var(--line); }
html[data-theme="light"] .mobile-nav a { color: #4a4338; }
html[data-theme="light"] .btn-primary, html[data-theme="light"] .add-row button { color: #17210c; }
html[data-theme="light"] .favorite { border-color: var(--line) !important; }
html[data-theme="light"] .section-title h2, html[data-theme="light"] .page-title, html[data-theme="light"] h1, html[data-theme="light"] h2, html[data-theme="light"] h3 { color: var(--ink); }
html[data-theme="light"] .hero h1, html[data-theme="light"] .hero p, html[data-theme="light"] .hero .eyebrow, html[data-theme="light"] .cf-visit h2 { color: #f7f2e9; }

/* ---- Phones ---- */
@media (max-width: 760px) {
  .cf-trust, .cf-cats, .cf-steps { grid-template-columns: 1fr; }
  .cf-cat { min-height: 104px; }
  .cf-cat img { width: 80px; height: 80px; }
  .cf-visit { padding: 20px; }
  .cf-contact { bottom: 82px; left: 12px; }
  .cf-tool small { display: none; }
  .header-actions { gap: 4px; }
}

/* Heart and badge must sit above the photo. */
.product-card .favorite, .product-card .badge { z-index: 5 !important; }
.product-card .favorite { color: #4b473f; }
.product-card .favorite.active { color: #d8452f; }
.product-card .badge { background: var(--orange); color: #1f1206; font-weight: 800; border-radius: 6px; }
html[data-theme="light"] .section-title a, html[data-theme="light"] .detail-copy .product-meta, html[data-theme="light"] .eyebrow { color: #3a6b12 !important; }
html[data-theme="light"] .hero .eyebrow, html[data-theme="light"] .cf-visit .eyebrow { color: #b9d96d !important; }
html[data-theme="light"] .price small, html[data-theme="light"] .product-meta { color: var(--muted); }
html[data-theme="light"] .cf-cat img { border: 1px solid var(--line); }
.cf-trust b { display: flex; align-items: center; gap: 8px; }
.cf-trust .icon { width: 22px; height: 22px; color: var(--lime); flex: none; }
html[data-theme="light"] .cf-trust .icon { color: #3a6b12; }

/* Offers line */
.cf-offers-empty { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px dashed var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 30px; }
.cf-offers-empty .icon { width: 30px; height: 30px; color: var(--orange); flex: none; }
.cf-offers-empty b { display: block; font-size: 18px; }
.cf-offers-empty small { color: var(--muted); font-size: 15px; }

/* Desktop: keep the "Boa compra" tag off the photo, next to the price (phones keep the overlay). */
@media (min-width: 761px) {
  .product-card { display: flex; flex-direction: column; }
  .product-card .price { order: 1; }
  .product-card .badge { order: 2; position: static !important; align-self: flex-start; margin: 0 0 6px; }
  .product-card .stock { order: 3; }
  .product-card .add-row { order: 4; margin-top: auto; }
}

.cf-delivery-contact { padding-top: 32px; padding-bottom: 32px; scroll-margin-top: 130px; }
.cf-delivery-contact h2 { font-family: "Playfair Display", serif; font-size: 30px; margin: 8px 0; }
.cf-delivery-contact p { line-height: 1.6; }
.cf-contact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-top: 24px; }
.cf-contact-grid article { padding: 24px; border: 1px solid var(--line); background: var(--panel2); border-radius: 16px; }
.cf-contact-grid h3 { margin: 0 0 12px; font-size: 20px; }
.cf-contact-grid a { text-decoration: underline; text-underline-offset: 4px; }
.cf-contact-grid .cf-contact-number { font-size: clamp(20px,3vw,28px); font-weight: 700; }
@media(max-width:600px) { .cf-contact-grid { grid-template-columns: 1fr; } .brand span { font-size: 16px; } }
