/*
Theme Name: Trendy Treasures
Theme URI: https://example.com/trendy-treasures
Author: Trendy Treasures and Trinkets
Description: A curio-cabinet block theme for Trendy Treasures and Trinkets, an Amazon affiliate finds and gift-guide site. Includes product-card, gift-guide and disclosure patterns, an automatic affiliate disclosure on posts, and automatic rel="sponsored" on Amazon links.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trendy-treasures
*/

/* ---------- Basics ---------- */
:root { --ttt-radius: 16px; }
:where(a):focus-visible, :where(button):focus-visible { outline: 2px solid var(--wp--preset--color--brass); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, .wp-block-site-title { text-wrap: balance; }

.ttt-eyebrow,
.ttt-eyebrow a,
.wp-block-post-terms.ttt-eyebrow a {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.72rem !important;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--brass);
	text-decoration: none;
	margin-bottom: 0;
}

/* ---------- Header ---------- */
.ttt-disclose { background: var(--wp--preset--color--plum); color: var(--wp--preset--color--cream); }
.ttt-disclose p { margin: 0; font-size: 0.82rem; text-align: center; }
.ttt-header { position: sticky; top: 0; z-index: 50; background: var(--wp--preset--color--base); border-bottom: 1px solid var(--wp--preset--color--line); }
.admin-bar .ttt-header { top: var(--wp-admin--admin-bar--height, 32px); }
.ttt-header .wp-block-site-title { font-family: var(--wp--preset--font-family--display); font-size: 1.35rem; }
.ttt-header .wp-block-site-title a { text-decoration: none; }
.ttt-header .wp-block-navigation a { color: var(--wp--preset--color--muted); text-decoration: none; font-weight: 500; }
.ttt-header .wp-block-navigation a:hover { color: var(--wp--preset--color--ink); }

/* ---------- Hero ---------- */
.ttt-hero-title { font-size: clamp(2.4rem, 5.4vw, 4.2rem) !important; }
.ttt-hero-title em { color: var(--wp--preset--color--plum); }
.ttt-lede { font-size: 1.12rem; color: var(--wp--preset--color--muted); max-width: 52ch; }
.ttt-case {
	position: relative;
	border: 1px solid var(--wp--preset--color--brass);
	border-radius: 200px 200px 18px 18px;
	padding: 48px 22px 22px !important;
	background: var(--wp--preset--color--surface);
	max-width: 380px;
	margin-inline: auto;
	text-align: center;
}
.ttt-case::before { content: ""; position: absolute; inset: 8px; border: 1px solid var(--wp--preset--color--line); border-radius: 192px 192px 12px 12px; pointer-events: none; }
.ttt-case h2 { font-size: 1.5rem; margin-top: 4px; }
.ttt-shelf { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 10px !important; border-bottom: 3px solid var(--wp--preset--color--brass); padding-bottom: 10px; margin-block: 14px !important; }
.ttt-shelf > * { margin: 0 !important; }
.ttt-tile { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-family: var(--wp--preset--font-family--display); font-size: 1.6rem; }
.ttt-case-note { font-size: 0.85rem; color: var(--wp--preset--color--muted); }

/* ---------- Tints (used by product thumbs and tiles) ---------- */
.t-blush { background: var(--wp--preset--color--blush); }
.t-sage  { background: var(--wp--preset--color--sage); }
.t-sky   { background: var(--wp--preset--color--sky); }
.t-sand  { background: var(--wp--preset--color--sand); }

/* ---------- Section heads ---------- */
.ttt-section-sub { color: var(--wp--preset--color--muted); max-width: 46ch; }

/* ---------- Product cards ---------- */
.ttt-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--ttt-radius);
	overflow: hidden;
	display: flex !important;
	flex-direction: column;
	padding: 0 !important;
	min-width: 0;
	height: 100%;
}
.ttt-card > * { margin-block: 0 !important; }
.ttt-card .ttt-thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative; margin: 0 !important; }
.ttt-card .ttt-thumb img, .ttt-card figure.ttt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ttt-letter { font-family: var(--wp--preset--font-family--display); font-size: 3.4rem; line-height: 1; opacity: 0.85; margin: 0 !important; }
.ttt-card-body { padding: 16px 16px 18px !important; display: flex !important; flex-direction: column; gap: 8px; flex: 1; }
.ttt-card-body > * { margin-block: 0 !important; }
.ttt-card-title { font-size: 1.15rem !important; }
.ttt-card-desc { color: var(--wp--preset--color--muted); font-size: 0.92rem; line-height: 1.5; }
.ttt-why { font-size: 0.85rem; border-top: 1px dashed var(--wp--preset--color--line); padding-top: 8px; margin-top: auto !important; color: var(--wp--preset--color--muted); }
.ttt-why strong { color: var(--wp--preset--color--ink); }
.ttt-badge { display: inline-block; align-self: flex-start; font-family: var(--wp--preset--font-family--mono); font-size: 0.66rem !important; letter-spacing: 0.1em; text-transform: uppercase; background: var(--wp--preset--color--surface); padding: 3px 8px; border-radius: 999px; position: absolute; top: 10px; left: 10px; margin: 0 !important; }
.ttt-amz { width: 100%; }
.ttt-amz .wp-block-button__link { width: 100%; background: var(--wp--preset--color--brass) !important; color: #1c1408 !important; border-radius: 10px !important; font-weight: 700; font-size: 0.9rem; padding: 10px !important; }
.ttt-amz .wp-block-button__link:hover { filter: brightness(1.06); }
@media (prefers-reduced-motion: no-preference) {
	.ttt-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
	.ttt-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px -14px rgba(40, 20, 45, 0.45); }
}

/* ---------- Gift guides ---------- */
.ttt-guides { background: var(--wp--preset--color--surface); border-block: 1px solid var(--wp--preset--color--line); }
.ttt-guide { border: 1px solid var(--wp--preset--color--line); border-radius: var(--ttt-radius); padding: 24px !important; background: var(--wp--preset--color--base); display: flex !important; flex-direction: column; gap: 10px; height: 100%; }
.ttt-guide > * { margin-block: 0 !important; }
.ttt-guide .ttt-eyebrow { color: var(--wp--preset--color--plum); }
.ttt-guide h3 { font-size: 1.45rem; }
.ttt-guide ul { color: var(--wp--preset--color--muted); font-size: 0.93rem; padding-left: 18px; }
.ttt-guide .ttt-more { margin-top: auto !important; font-weight: 600; }
.ttt-guide .ttt-more a { color: var(--wp--preset--color--plum); text-decoration: none; }
.ttt-guide .ttt-more a:hover { text-decoration: underline; }

/* ---------- How we pick ---------- */
.ttt-steps { list-style: none; margin: 0; padding: 0 !important; display: grid; gap: 18px; counter-reset: s; }
.ttt-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; counter-increment: s; color: var(--wp--preset--color--muted); }
.ttt-steps li::before { content: counter(s); font-family: var(--wp--preset--font-family--display); font-size: 1.6rem; color: var(--wp--preset--color--brass); border: 1px solid var(--wp--preset--color--brass); border-radius: 50%; width: 44px; height: 44px; display: grid; place-items: center; }
.ttt-steps strong { display: block; color: var(--wp--preset--color--ink); }

/* ---------- Newsletter ---------- */
.ttt-news { background: var(--wp--preset--color--plum); color: var(--wp--preset--color--cream); border-radius: 24px; }
.ttt-news h2 { color: var(--wp--preset--color--cream); }
.ttt-news .ttt-eyebrow { color: var(--wp--preset--color--cream); opacity: 0.8; }
.ttt-news .wp-block-button__link { background: var(--wp--preset--color--brass) !important; color: #1c1408 !important; font-weight: 700; }

/* ---------- Affiliate disclosure box on posts ---------- */
.ttt-post-disclosure { background: var(--wp--preset--color--blush); border-left: 3px solid var(--wp--preset--color--plum); padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; }

/* ---------- Footer ---------- */
.ttt-footer { border-top: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--muted); font-size: 0.88rem; }
.ttt-footer .wp-block-site-title { font-family: var(--wp--preset--font-family--display); font-size: 1.15rem; }
.ttt-footer .wp-block-site-title a, .ttt-footer .wp-block-navigation a { text-decoration: none; }
.ttt-fine { max-width: 80ch; }

/* ---------- Post cards in query loops ---------- */
.wp-block-post-template .wp-block-post-featured-image img { border-radius: var(--ttt-radius); }
.wp-block-post-template .wp-block-post-title a { text-decoration: none; }
