/* =========================================================
   SERVICE SPECIALS — coupon cards
   Mirrors the new-car card styling (monochrome, understated)
   but for the simpler service coupon layout:
     • .card-media wrapper + .store-logo overlay (CSS logo overlay)
     • .coupon-price  (the Price/Offer pill)
     • .coupon-sub    (Secondary Headline)
   Reuses the shared class names: .grid .card .days-left .title
   .separator .card-body .cta-container .cta-btn .disclaimer
   .card-modal-overlay .close and the skeleton classes.
   ========================================================= */

/* ========================= Skeleton Loader ========================= */
.card.skeleton {
	border: 1px solid #e8e8e8; border-radius: 8px; background: #fff; display: flex; flex-direction: column; overflow: hidden; min-height: 480px;
}

.skel-image,
.skel-title,
.skel-pill,
.skel-row,
.skel-cta,
.skel-link {
	position: relative; background: #efefef; overflow: hidden;
}

.skel-image::after,
.skel-title::after,
.skel-pill::after,
.skel-row::after,
.skel-cta::after,
.skel-link::after {
	content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .45), rgba(255, 255, 255, 0)); animation: skel 1.2s infinite;
}

@keyframes skel { 100% { transform: translateX(100%); } }

.skel-image { height: 0; padding-top: 56.25%; } /* 16:9 */
.skel-title { height: 56px; margin: 12px 14px; border-radius: 6px; }
.skel-pill  { height: 28px; margin: 0 14px 10px; border-radius: 999px; }
.skel-row   { height: 42px; margin: 8px 14px; border-radius: 6px; }
.skel-sep   { height: 1px; margin: 0 14px 8px; background: #eee; }
.skel-cta   { height: 48px; margin: 12px 14px 8px; border-radius: 10px; }
.skel-link  { height: 16px; width: 140px; margin: 6px auto 16px; border-radius: 4px; }

@media (max-width:600px) { .card.skeleton { min-height: 440px; } }

/* ========================= Base ========================= */
body {
	font-family: "Segoe UI", Inter, Roboto, system-ui, -apple-system, Arial, sans-serif; background: var(--soft-grey); color: var(--service-grey); margin: 0;
}

.page-heading {
	text-align: center; font-size: 2.1rem; font-weight: 700; letter-spacing: .01em; margin: 28px 20px 8px; color: var(--service-grey);
}

@media (max-width:600px) { .page-heading { font-size: 1.8rem; margin: 20px 10px; } }

/* ========================= Grid ========================= */
.grid {
	display: grid; gap: 20px; padding: 16px; max-width: 1200px; margin: auto; grid-template-columns: repeat(3, minmax(280px, 1fr));
}

@media (max-width:1024px) { .grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 16px; } }
@media (max-width:600px)  { .grid { grid-template-columns: 1fr; } }

/* ========================= Card ========================= */
:root {
	--card-min-h-desktop: 480px; --card-min-h-mobile: 440px;

	/* Apple Autos — Service palette (per branding standard) */
	--service-grey: #324048;      /* Soft Black — Service-reserved neutral, replaces black */
	--service-grey-deep: #26323a; /* darker service grey — hover / active states */
	--ink-muted:    #5c686f;      /* softened service grey for secondary text */
	--brand-red:    #EE243E;      /* brand red — reserved for small accents only, used sparingly */
	--brand-red-deep: #8E0D0D;    /* Accent Red 2 — hover on red accents */
	--soft-grey:    #F1F1F1;      /* light surface tint */
	--line:         #e2e5e7;      /* subtle borders / separators */
}

.card {
	position: relative; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; min-height: var(--card-min-h-desktop); height: auto;
}

@media (max-width:600px) { .card { min-height: var(--card-min-h-mobile); } }

/* ========================= Expiration bar (just above the CTAs) ========================= */
.coupon-expires {
	text-align: center; font-size: .95rem; font-weight: 700; color: var(--service-grey); background: var(--soft-grey); border-radius: 6px; padding: 7px 10px; margin-bottom: 10px;
}

/* ========================= Media + logo overlay ========================= */
.card-media {
	position: relative; display: block; width: 100%; line-height: 0;
}

.card-media .card-media-link { display: block; }

.card-media img {
	width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; display: block;
}

/* Store logo overlaid flush to the TOP-CENTER of the coupon image.
   object-fit: contain (with !important to beat the .card-media img rule)
   guarantees the FULL logo is always shown and never cropped — big logos
   just scale down to fit. Sits on a soft white chip so it reads on any image. */
.store-logo {
	position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 2;
	width: auto !important; height: 40px !important; max-width: 70% !important; aspect-ratio: auto !important;
	object-fit: contain !important; padding: 6px 14px; background: rgba(255, 255, 255, .94); border-radius: 0 0 10px 10px; box-shadow: 0 1px 4px rgba(50, 64, 72, .22);
}

@media (max-width:600px) { .store-logo { height: 34px !important; max-width: 70% !important; } }

/* ========================= Title (Primary Headline) ========================= */
.card .title {
	font-size: clamp(1.5rem, 1.6vw, 1.9rem) !important; line-height: 1.2; font-weight: 700; letter-spacing: .01em; padding: 14px 16px 6px; text-align: center; color: var(--service-grey);
	-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
}

/* ========================= Price / Offer pill ========================= */
.coupon-price {
	align-self: center; display: inline-flex; align-items: center; justify-content: center; margin: 2px 16px 10px; padding: 8px 18px; border-radius: 999px; background: var(--service-grey); color: #fff; font-size: 1.6rem; font-weight: 900; letter-spacing: .02em; text-align: center; font-variant-numeric: lining-nums tabular-nums;
}

@media (max-width:480px) { .coupon-price { font-size: 1.5rem; padding: 7px 16px; } }

/* ========================= Separator & body ========================= */
.separator { border-top: 1px solid var(--line); margin: 0 16px 10px; }

.card-body {
	padding: 6px 16px 14px; display: flex; flex-direction: column; flex-grow: 1; justify-content: space-between;
}

/* ========================= Secondary Headline ========================= */
.coupon-sub {
	font-size: 1.15rem; line-height: 1.4; color: var(--ink-muted); text-align: center; margin-bottom: 12px;
}

/* ========================= CTA ========================= */
.cta-container { margin-top: 8px; display: flex; flex-direction: column; align-items: stretch; }

.cta-btn {
	display: inline-block; width: 100%; background: var(--service-grey); color: #fff !important; text-align: center; padding: 13px 18px; font-weight: 800; font-size: 1.4rem; letter-spacing: .02em; text-decoration: none; border-radius: 10px; border: 1px solid var(--service-grey); transition: background-color .2s ease, border-color .2s ease, transform .05s ease; box-sizing: border-box;
}

.cta-btn:hover { background: var(--service-grey-deep); border-color: var(--service-grey-deep); text-decoration: none; }
.cta-btn:active { transform: translateY(1px); }

/* Secondary buttons — "Print Coupon" (desktop) / "Call Now" (mobile), outlined in service grey */
.print-btn,
.call-btn {
	display: inline-block; width: 100%; margin-top: 8px; background: #fff; color: var(--service-grey); text-align: center; padding: 11px 18px; font-family: inherit; font-weight: 700; font-size: 1.1rem; letter-spacing: .02em; border: 1px solid var(--service-grey); border-radius: 10px; cursor: pointer; text-decoration: none; transition: background-color .2s ease, color .2s ease; box-sizing: border-box;
}

.print-btn:hover,
.call-btn:hover { background: var(--service-grey); color: #fff; text-decoration: none; }

/* Responsive show/hide: Print on desktop, Call on mobile.
   (When a coupon has no phone, Print has no .show-desktop class and shows everywhere.) */
.show-mobile { display: none; }

@media (max-width:600px) {
	.show-desktop { display: none !important; }
	.show-mobile { display: inline-block; }
}

.disclaimer {
	font-size: .85rem; color: var(--brand-red); text-decoration: underline; cursor: pointer; margin-top: 8px; text-align: center; display: block;
}

.disclaimer:hover { color: var(--brand-red-deep); }

/* ========================= Modal ========================= */
.card-modal-overlay {
	display: none; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.97); padding: 20px; overflow-y: auto; z-index: 5; font-size: .95rem; line-height: 1.45; color: var(--service-grey);
}

.card-modal-overlay div { margin-bottom: 8px; }

.card-modal-overlay .close {
	position: absolute; top: 10px; right: 12px; font-size: 1.4rem; cursor: pointer; margin: 0;
}

@media (max-width:480px) { .cta-btn { font-size: 1.4rem; padding: 12px 16px; } }

/* ========================= Attribution footer (small, subtle) ========================= */
.specials-attribution {
	text-align: center; font-size: .68rem; letter-spacing: .03em; color: var(--ink-muted); opacity: .7; padding: 16px 16px 22px; max-width: 1200px; margin: 0 auto;
}
