/* Grabs the Deal — components */

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font-size: var(--fs-sm); font-weight: 600; padding: .72rem 1.45rem; min-height: 44px;
  border-radius: var(--radius-full); border: 1px solid transparent; cursor: pointer; line-height: 1.2; text-align: center;
  transition: transform var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard), background var(--duration-fast), border-color var(--duration-fast), color var(--duration-fast); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 1.1em; height: 1.1em; }
.btn-primary { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)); color: #fff; box-shadow: 0 6px 16px rgba(91,33,182,.28); }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(91,33,182,.36); transform: translateY(-1px); }
.btn-accent { background: var(--color-accent); color: var(--color-on-accent); box-shadow: var(--shadow-accent); }
.btn-accent:hover { background: #fb8a3c; transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--color-primary); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-primary); background: var(--color-primary-tint); }
.btn-ghost-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.2); }
.btn-ghost-light:hover { background: rgba(255,255,255,.16); }
.btn-danger { background: #fff; color: var(--color-danger); border-color: #f3c6c6; }
.btn-danger:hover { background: var(--color-danger-bg); border-color: var(--color-danger); }
.btn-sm { padding: .45rem 1rem; font-size: var(--fs-xs); min-height: 38px; }
.btn-lg { padding: .9rem 1.8rem; font-size: var(--fs-base); min-height: 50px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: var(--fs-xs); font-weight: 700; padding: .25rem .7rem; border-radius: var(--radius-full); line-height: 1.3; }
.badge .icon { width: 1em; height: 1em; }
.badge-discount { background: var(--color-accent); color: var(--color-on-accent); }
.badge-verified { background: var(--color-success-bg); color: var(--color-success); }
.badge-expired { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-soft { background: var(--color-primary-tint); color: var(--color-primary); }
.badge-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

/* ---------- Forms ---------- */
.field { margin-bottom: var(--space-5); }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: var(--space-2); }
.field .req { color: var(--color-danger); }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="number"], .field input[type="date"],
.field input[type="url"], .field input[type="search"], .field input[type="file"], .field select, .field textarea,
.input, .select { width: 100%; font-size: var(--fs-sm); padding: .7rem .95rem; min-height: 44px; border: 1px solid #cfc9de; border-radius: var(--radius-sm); background: #fff; color: var(--color-text); transition: border-color var(--duration-fast), box-shadow var(--duration-fast); }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .select:focus { border-color: var(--color-primary); outline: none; box-shadow: 0 0 0 4px rgba(91,33,182,.14); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--color-danger); background: #fffafa; }
.field-hint { font-size: var(--fs-xs); color: var(--color-text-muted); margin-top: var(--space-1); }
.field-error { font-size: var(--fs-xs); color: var(--color-danger); font-weight: 600; margin-top: var(--space-1); }
.field-check label { display: flex; align-items: flex-start; gap: var(--space-3); font-weight: 600; cursor: pointer; }
.field-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--color-primary); flex-shrink: 0; }
.check-inline { display: flex; gap: var(--space-2); align-items: center; font-size: var(--fs-sm); margin-bottom: var(--space-2); }
.form-card { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-8); box-shadow: var(--shadow-sm); max-width: 640px; }
.form-card.wide { max-width: 980px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-6); }
.check-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 var(--space-6); margin-bottom: var(--space-2); }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } .form-card { padding: var(--space-5); } }

/* ---------- Alerts ---------- */
.alert { padding: var(--space-4) var(--space-5); border-radius: var(--radius-sm); font-size: var(--fs-sm); margin-bottom: var(--space-5); border: 1px solid transparent; }
.alert a { text-decoration: underline; font-weight: 600; }
.alert-success { background: var(--color-success-bg); color: var(--color-success); border-color: #bfe5cb; }
.alert-error { background: var(--color-danger-bg); color: var(--color-danger); border-color: #f4c3c3; }
.alert-warn { background: var(--color-warning-bg); color: var(--color-warning); border-color: #f3dca0; }
.alert-info { background: var(--color-info-bg); color: var(--color-info); border-color: #c4d6fb; }
.alert-note { background: var(--color-bg-soft); color: var(--color-text-muted); border-color: var(--color-border); }
.flash-wrap { padding-top: var(--space-4); }

/* ---------- Header ---------- */
.announcement-bar { background: var(--color-primary-deep); color: #fff; text-align: center; font-size: var(--fs-xs); font-weight: 500; padding: .55rem var(--space-4); }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--color-border); }
.header-row { display: flex; align-items: center; gap: var(--space-6); height: var(--header-height); }
.brand-logo { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.brand-logo img { border-radius: 11px; box-shadow: 0 4px 12px rgba(91,33,182,.3); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.18rem; letter-spacing: -.02em; color: var(--color-primary-dark); }
.brand-name em { font-style: normal; color: var(--color-accent-dark); }
.brand-tag { font-size: .62rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--color-text-muted); margin-top: 3px; }
.brand-logo-light .brand-name { color: #fff; } .brand-logo-light .brand-name em { color: #FDBA74; }
.main-nav { display: flex; gap: var(--space-5); margin-left: auto; }
.main-nav a { font-size: var(--fs-sm); font-weight: 600; color: var(--color-text-muted); padding: .5rem .1rem; border-bottom: 2px solid transparent; transition: color var(--duration-fast), border-color var(--duration-fast); }
.main-nav a:hover { color: var(--color-primary); }
.main-nav a.active { color: var(--color-primary); border-color: var(--color-accent); }
.search-box { flex: 1; max-width: 380px; position: relative; }
.search-box .icon { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--color-text-muted); pointer-events: none; }
.search-box input { width: 100%; padding: .65rem 1rem .65rem 2.6rem; min-height: 44px; border-radius: var(--radius-full); border: 1px solid var(--color-border); background: var(--color-bg-soft); font-size: var(--fs-sm); }
.search-box input:focus { background: #fff; border-color: var(--color-primary); outline: none; box-shadow: 0 0 0 4px rgba(91,33,182,.12); }
.mobile-menu-toggle { display: none; background: none; border: 1px solid var(--color-border); border-radius: var(--radius-sm); cursor: pointer; width: 46px; height: 46px; align-items: center; justify-content: center; margin-left: auto; color: var(--color-primary-dark); }
.mobile-menu-toggle .icon { width: 24px; height: 24px; }
.mobile-menu-toggle .icon-close { display: none; }
.mobile-menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.mobile-menu-toggle[aria-expanded="true"] .icon-close { display: inline; }
.mobile-nav { display: none; border-top: 1px solid var(--color-border); padding: var(--space-3) 0 var(--space-5); background: #fff; }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: .9rem 0; font-weight: 600; border-bottom: 1px solid var(--color-border); min-height: 48px; }
.mobile-search { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }
.mobile-search input { flex: 1; min-height: 46px; border: 1px solid #cfc9de; border-radius: var(--radius-full); padding: 0 1rem; }
@media (max-width: 960px) {
  .main-nav, .search-box { display: none; }
  .mobile-menu-toggle { display: inline-flex; }
}
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: var(--space-2); z-index: 60; max-height: 340px; overflow-y: auto; }
.search-suggestion { display: flex; gap: var(--space-2); align-items: baseline; padding: .6rem var(--space-3); border-radius: var(--radius-sm); font-size: var(--fs-sm); min-height: 44px; }
.search-suggestion:hover, .search-suggestion:focus { background: var(--color-bg-soft); }
.search-suggestion .type { font-size: .68rem; font-weight: 700; color: var(--color-primary); background: var(--color-primary-tint); padding: .1rem .5rem; border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: .05em; flex-shrink: 0; }
.search-no-results { padding: var(--space-3); font-size: var(--fs-sm); color: var(--color-text-muted); }

/* ---------- Logos ---------- */
.logo-box { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 1px solid var(--color-border); border-radius: 14px; background: #fff; overflow: hidden; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; padding: 14%; }
.logo-fallback { background: linear-gradient(135deg, var(--color-primary-tint), #fff); color: var(--color-primary); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.logo-lg { border-radius: 20px; box-shadow: var(--shadow-sm); }
.logo-lg.logo-fallback { font-size: 2rem; }

/* ---------- Deal card ---------- */
.deal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--space-5); }
.deal-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; transition: box-shadow var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard), border-color var(--duration-base); }
.deal-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #d6cbef; }
.deal-card.is-expired { opacity: .72; }
.deal-card-top { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-4) var(--space-3); }
.deal-card-top .badge { margin-left: auto; }
.deal-card-meta { min-width: 0; }
.deal-card-store { font-size: var(--fs-sm); font-weight: 700; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-card-store a:hover { color: var(--color-primary); }
.deal-type { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--color-primary); }
.deal-card-body { padding: 0 var(--space-4) var(--space-4); flex: 1; display: flex; flex-direction: column; gap: var(--space-2); }
.deal-card-title { font-size: var(--fs-base); font-weight: 700; line-height: 1.35; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.deal-card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-md); } /* whole card is clickable */
.deal-card-title a:hover { color: var(--color-primary); }
.deal-card-price { display: flex; align-items: baseline; gap: var(--space-2); }
.deal-card-price .sale { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-md); color: var(--color-primary); }
.deal-card-price .original { text-decoration: line-through; color: var(--color-text-muted); font-size: var(--fs-sm); }
.deal-card-price-lg .sale { font-size: var(--fs-xl); } .deal-card-price-lg { margin-bottom: var(--space-5); }
.deal-card-footer { position: relative; margin-top: auto; padding: var(--space-3) var(--space-4); border-top: 2px dashed var(--color-border); display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.deal-card-footer::before, .deal-card-footer::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--color-bg); border: 1px solid var(--color-border); }
.section-soft .deal-card-footer::before, .section-soft .deal-card-footer::after { background: var(--color-bg-soft); }
.deal-card-footer::before { left: -11px; clip-path: inset(0 0 0 50%); } .deal-card-footer::after { right: -11px; clip-path: inset(0 50% 0 0); }
.deal-card-expiry { font-size: var(--fs-xs); color: var(--color-text-muted); }
.deal-card-footer .btn { position: relative; z-index: 1; }

/* ---------- Store / category tiles ---------- */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: var(--space-4); }
.store-tile { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-5) var(--space-3); text-align: center; background: #fff; transition: border-color var(--duration-base), box-shadow var(--duration-base), transform var(--duration-base); }
.store-tile:hover { border-color: var(--color-primary-light); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.store-name { font-weight: 700; font-size: var(--fs-sm); }
.offer-count { font-size: var(--fs-xs); color: var(--color-text-muted); }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-4); }
.category-grid-lg { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.category-tile { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-5) var(--space-3); text-align: center; transition: transform var(--duration-base) var(--ease-standard), box-shadow var(--duration-base), border-color var(--duration-base); }
.category-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--color-primary-light); }
.category-tile .name { font-size: var(--fs-sm); font-weight: 700; }
.icon-bubble { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, var(--color-primary-tint), #fff 120%); color: var(--color-primary); border: 1px solid #e3d8fb; flex-shrink: 0; }
.icon-bubble .icon { width: 28px; height: 28px; }
.icon-bubble-lg { width: 72px; height: 72px; border-radius: 22px; } .icon-bubble-lg .icon { width: 36px; height: 36px; }
.icon-bubble-sm { width: 40px; height: 40px; border-radius: 12px; } .icon-bubble-sm .icon { width: 20px; height: 20px; }

/* ---------- Coupon code reveal ---------- */
.code-reveal { display: flex; align-items: stretch; border: 2px dashed var(--color-primary-light); border-radius: var(--radius-sm); overflow: hidden; background: var(--color-primary-tint); max-width: 440px; }
.code-reveal .code-text { flex: 1; padding: .85rem 1.1rem; font-weight: 800; letter-spacing: .08em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--color-primary-dark); font-size: 1.1rem; word-break: break-all; user-select: all; }
.code-reveal button { display: inline-flex; align-items: center; gap: .4rem; border: none; background: var(--color-primary); color: #fff; padding: 0 1.3rem; min-height: 52px; font-weight: 700; cursor: pointer; transition: background var(--duration-fast); }
.code-reveal button:hover { background: var(--color-primary-light); }
.code-reveal button .icon { width: 18px; height: 18px; }
.code-reveal button.copied { background: var(--color-success); }

/* ---------- Sections / states ---------- */
.section { padding: var(--space-16) 0; }
.section-soft { background: var(--color-bg-soft); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: var(--space-8); gap: var(--space-4); flex-wrap: wrap; }
.section-head.center { justify-content: center; text-align: center; }
.section-head h2 { font-size: var(--fs-xl); margin: 0 0 var(--space-2); }
.section-head p { color: var(--color-text-muted); margin: 0; max-width: 56ch; }
.section-head.on-dark h2 { color: #fff; } .section-head.on-dark p { color: rgba(255,255,255,.78); }
.eyebrow { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--color-accent-dark); margin-bottom: var(--space-2); }
.eyebrow-light { color: #FDBA74; }
.state-panel { text-align: center; padding: var(--space-12) var(--space-6); border: 2px dashed var(--color-border); border-radius: var(--radius-lg); color: var(--color-text-muted); background: #fff; }
.state-panel h3 { color: var(--color-text); margin-bottom: var(--space-2); font-size: var(--fs-md); }
.state-panel a:not(.btn) { color: var(--color-primary); font-weight: 600; text-decoration: underline; }
.state-404 h1 { font-size: var(--fs-xl); color: var(--color-text); } .state-404 .inline-search { margin: var(--space-5) auto; }
.big-404 { font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 14vw, 8rem); line-height: 1; background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.state-404 .btn-row { justify-content: center; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-question { width: 100%; text-align: left; background: none; border: none; padding: var(--space-5) 0; min-height: 56px; font-weight: 700; font-size: var(--fs-base); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); }
.faq-question .icon { width: 22px; height: 22px; flex-shrink: 0; transition: transform var(--duration-base); color: var(--color-primary); }
.faq-item.open .faq-question .icon { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height var(--duration-base) var(--ease-standard); color: var(--color-text-muted); }
.faq-item.open .faq-answer { max-height: 400px; padding-bottom: var(--space-4); }
.faq-answer a { color: var(--color-primary); text-decoration: underline; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: var(--space-2); justify-content: center; align-items: center; flex-wrap: wrap; margin-top: var(--space-10); }
.pagination-gap { color: var(--color-text-muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-primary-deep); color: rgba(255,255,255,.78); padding: var(--space-16) 0 var(--space-8); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: var(--space-8); }
.footer-blurb { max-width: 36ch; margin-top: var(--space-4); font-size: var(--fs-sm); }
.footer-grid h4 { color: #fff; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .1em; margin-bottom: var(--space-3); }
.footer-grid a:not(.brand-logo) { display: block; font-size: var(--fs-sm); padding: .4rem 0; color: rgba(255,255,255,.75); }
.footer-grid a:not(.brand-logo):hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: var(--space-10); padding-top: var(--space-6); font-size: var(--fs-xs); display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
