/*
 * PenCarrie Catalogue - front-end styles.
 * Everything is scoped to .pcc / .pcc-* so it sits quietly inside any theme.
 * Colours come from --pcc-accent (Settings > Accent colour).
 */
.pcc, .pcc * , .pcc *::before, .pcc *::after { box-sizing: border-box; }
.pcc {
	--pcc-ink: #111827;
	--pcc-muted: #6b7280;
	--pcc-line: #e5e7eb;
	--pcc-soft: #f6f7f9;
	--pcc-radius: 10px;
	--pcc-accent: #1b6ef3;
	--pcc-accent-ink: #fff;
	color: var(--pcc-ink);
	font-size: 16px;
	line-height: 1.5;
}
.pcc-main { width: 100%; }
.pcc-wrap { max-width: 1240px; margin: 0 auto; padding: 24px 16px 56px; }
.pcc a { color: inherit; }
.pcc img { max-width: 100%; height: auto; }
.pcc [hidden], .pcc-float[hidden] { display: none !important; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Headings ---------- */
.pcc-head { margin: 0 0 20px; }
.pcc-head__title { margin: 0 0 6px; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; }
.pcc-head__intro { color: var(--pcc-muted); max-width: 70ch; }
.pcc-head__intro p { margin: 0 0 .6em; }
.pcc h2 { font-size: 1.25rem; line-height: 1.25; margin: 0 0 .6em; }
.pcc h3 { font-size: 1.05rem; line-height: 1.3; margin: 0; }

/* ---------- Buttons & links ---------- */
.pcc-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 18px; border-radius: 8px; border: 1px solid var(--pcc-line);
	background: #fff; color: var(--pcc-ink); font: inherit; font-weight: 600; line-height: 1.2;
	text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
}
.pcc-btn:hover { border-color: #cbd0d8; background: var(--pcc-soft); }
.pcc-btn:active { transform: translateY(1px); }
.pcc-btn:focus-visible, .pcc-swatch:focus-visible, .pcc-heart:focus-visible, .pcc input:focus-visible, .pcc select:focus-visible, .pcc textarea:focus-visible, .pcc-tabs button:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--pcc-accent) 45%, transparent); outline-offset: 2px;
}
.pcc-btn--primary { background: var(--pcc-accent); border-color: var(--pcc-accent); color: var(--pcc-accent-ink); }
.pcc-btn--primary:hover { background: var(--pcc-accent); filter: brightness(.93); border-color: var(--pcc-accent); }
.pcc-btn--small { padding: 8px 12px; font-size: .9rem; }
.pcc-btn--wide { width: 100%; padding: 14px 18px; font-size: 1.05rem; }
.pcc-btn--danger { background: #b42318; border-color: #b42318; color: #fff; }
.pcc-btn--danger:hover { background: #912018; border-color: #912018; }
.pcc-btn[disabled] { opacity: .6; cursor: wait; }
.pcc-link { background: none; border: 0; padding: 0; color: var(--pcc-accent); text-decoration: underline; cursor: pointer; font: inherit; }
.pcc-hint { color: var(--pcc-muted); font-size: .9rem; margin: 4px 0 0; display: block; }
.pcc-opt { color: var(--pcc-muted); font-weight: 400; font-size: .85em; }

/* ---------- Filters ---------- */
.pcc-filters {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 14px; align-items: end;
	background: var(--pcc-soft); border: 1px solid var(--pcc-line); border-radius: var(--pcc-radius); padding: 14px; margin: 0 0 14px;
}
.pcc-filters__search { grid-column: 1 / -1; }
@media (min-width: 900px) { .pcc-filters__search { grid-column: span 2; } }
.pcc-filters label { display: block; font-size: .8rem; font-weight: 600; color: var(--pcc-muted); margin: 0 0 4px; }
.pcc-filters input, .pcc-filters select, .pcc-form input:not([type=checkbox]), .pcc-form textarea, .pcc-card-box input:not([type=checkbox]), .pcc-card-box textarea,
.pcc-product textarea, .pcc-line textarea, .pcc-line input, .pcc-size input {
	width: 100%; padding: 10px 12px; border: 1px solid #cfd4dc; border-radius: 8px; background: #fff; color: var(--pcc-ink); font: inherit; line-height: 1.3; min-height: 44px;
}
.pcc-filters__actions { display: flex; gap: 14px; align-items: center; }
.pcc-count-line { margin: 0 0 14px; color: var(--pcc-muted); font-size: .95rem; }

/* ---------- Grid & cards ---------- */
.pcc-grid { display: grid; gap: 22px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .pcc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .pcc-grid { grid-template-columns: repeat(var(--pcc-cols, 4), minmax(0, 1fr)); } }
.pcc-card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.pcc-card__media {
	position: relative; display: block; aspect-ratio: 400 / 462; background: var(--pcc-soft); border-radius: var(--pcc-radius); overflow: hidden; border: 1px solid var(--pcc-line);
}
.pcc-card__media img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .25s ease; }
.pcc-card:hover .pcc-card__media img { transform: scale(1.03); }
.pcc-card__noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--pcc-muted); font-size: .85rem; text-align: center; padding: 8px; }
.pcc-badge {
	position: absolute; top: 10px; left: 10px; background: var(--pcc-accent); color: var(--pcc-accent-ink); font-size: .72rem; font-weight: 700;
	letter-spacing: .04em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; line-height: 1;
}
.pcc-card__body { padding: 10px 2px 0; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.pcc-card__brand { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--pcc-muted); font-weight: 600; }
.pcc-card__title { font-size: 1rem; font-weight: 600; }
.pcc-card__title a { text-decoration: none; }
.pcc-card__title a:hover { text-decoration: underline; }
.pcc-card__meta { display: flex; align-items: center; gap: 8px; color: var(--pcc-muted); font-size: .85rem; margin-top: 2px; }
.pcc-dots { display: inline-flex; }
.pcc-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.18); margin-right: -4px; display: block; }
.pcc-card .pcc-btn { margin-top: 8px; align-self: flex-start; }

/* Heart */
.pcc-heart {
	position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0;
	background: rgba(255,255,255,.92); border: 1px solid var(--pcc-line); border-radius: 50%; cursor: pointer; color: #6b7280;
}
.pcc-heart svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.pcc-heart:hover { color: #d92d20; }
.pcc-heart.is-on { color: #d92d20; }
.pcc-heart.is-on svg { fill: currentColor; }
.pcc-heart--inline { position: static; width: auto; height: auto; border-radius: 999px; padding: 6px 12px 6px 8px; display: inline-flex; gap: 6px; align-items: center; margin: 4px 0 0; font: inherit; font-size: .9rem; }

/* Pager */
.pcc-pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin: 36px 0 0; }
.pcc-pager a, .pcc-pager span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--pcc-line); text-decoration: none; background: #fff; }
.pcc-pager a:hover { background: var(--pcc-soft); }
.pcc-pager__current { background: var(--pcc-accent) !important; color: var(--pcc-accent-ink); border-color: var(--pcc-accent) !important; font-weight: 700; }
.pcc-pager__gap { border: 0 !important; background: none !important; }
.pcc-empty { text-align: center; padding: 48px 16px; background: var(--pcc-soft); border-radius: var(--pcc-radius); color: var(--pcc-muted); }

/* ---------- Product page ---------- */
.pcc-crumbs { font-size: .9rem; color: var(--pcc-muted); margin: 0 0 18px; }
.pcc-crumbs a { text-decoration: none; } .pcc-crumbs a:hover { text-decoration: underline; }
.pcc-product__grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .pcc-product__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: start; } }
.pcc-gallery__main { position: relative; background: var(--pcc-soft); border: 1px solid var(--pcc-line); border-radius: var(--pcc-radius); overflow: hidden; aspect-ratio: 886 / 1024; max-height: 80vh; margin: 0 auto; }
.pcc-gallery__main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pcc-gallery__none { height: 100%; display: grid; place-items: center; color: var(--pcc-muted); }
.pcc-gallery__thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pcc-gallery__thumbs button { width: 72px; height: 83px; padding: 0; border: 2px solid var(--pcc-line); border-radius: 8px; overflow: hidden; background: #fff; cursor: pointer; }
.pcc-gallery__thumbs button.is-active { border-color: var(--pcc-accent); }
.pcc-gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcc-buy__brand { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--pcc-muted); font-weight: 700; }
.pcc-buy__title { margin: 2px 0 6px; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.15; }
.pcc-buy__code { margin: 0 0 8px; color: var(--pcc-muted); font-size: .95rem; }
.pcc-field { margin: 18px 0 0; border: 0; padding: 0; min-width: 0; }
.pcc-field > label, .pcc-field__label { display: block; font-weight: 600; margin: 0 0 8px; font-size: .95rem; padding: 0; }
.pcc-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.pcc-swatch {
	width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #c9ced6; cursor: pointer; padding: 0; background: #ddd;
}
.pcc-swatch:hover { box-shadow: 0 0 0 2px #98a0ad; }
.pcc-swatch.is-active { box-shadow: 0 0 0 2px var(--pcc-accent); }
.pcc-swatch--text { width: auto; min-width: 38px; padding: 0 12px; border-radius: 999px; background: #fff; font: inherit; font-size: .85rem; }
.pcc-spec { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 12px 0 0; font-size: .92rem; }
.pcc-spec div { display: flex; gap: 6px; } .pcc-spec dt { color: var(--pcc-muted); } .pcc-spec dd { margin: 0; font-weight: 600; }
.pcc-sizes { margin-top: 22px; }
.pcc-sizes__grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.pcc-size { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--pcc-line); border-radius: 8px; padding: 8px; background: #fff; margin: 0; }
.pcc-size__label { font-weight: 700; font-size: .95rem; }
.pcc-size__conv { font-size: .75rem; color: var(--pcc-muted); min-height: 1em; }
.pcc-size input { padding: 6px 8px; min-height: 38px; margin-top: 4px; text-align: center; }
.pcc-actions { margin-top: 22px; }
.pcc-actions--row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pcc-added { margin: 12px 0 0; padding: 10px 12px; background: #ecfdf3; border: 1px solid #abefc6; color: #067647; border-radius: 8px; font-size: .92rem; }
.pcc-added a { color: inherit; font-weight: 700; }
.pcc-details { display: grid; gap: 32px; margin: 48px 0 0; padding: 32px 0 0; border-top: 1px solid var(--pcc-line); }
@media (min-width: 800px) { .pcc-details { grid-template-columns: 1.4fr 1fr; } }
.pcc-details h2 { margin-top: 1.2em; } .pcc-details h2:first-child { margin-top: 0; }
.pcc-prose ul { padding-left: 1.2em; } .pcc-prose li { margin: .25em 0; }
.pcc-prose--note { margin-top: 12px; padding: 12px 14px; background: var(--pcc-soft); border-radius: 8px; }
.pcc-list { padding-left: 1.2em; margin: 0; } .pcc-list li { margin: .3em 0; }
.pcc-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pcc-tags li { background: var(--pcc-soft); border: 1px solid var(--pcc-line); border-radius: 999px; padding: 3px 10px; font-size: .85rem; }
.pcc-tags--cert li { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.pcc-related { margin-top: 48px; }

/* ---------- Forms ---------- */
.pcc-form, .pcc-card-box { background: #fff; border: 1px solid var(--pcc-line); border-radius: var(--pcc-radius); padding: 20px; margin-top: 24px; }
.pcc-card-box { margin-top: 0; }
.pcc-form h2, .pcc-card-box h2, .pcc-card-box h3 { margin-bottom: 12px; }
.pcc-form__grid { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .pcc-form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pcc-form .pcc-field > label, .pcc-card-box .pcc-field > label { font-weight: 600; font-size: .92rem; }
.pcc-check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; font-size: .92rem; }
.pcc-check input { width: 18px; height: 18px; margin-top: 3px; flex: none; }
.pcc-trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.pcc-form-msg { margin: 12px 0; padding: 10px 12px; border-radius: 8px; background: #fef3f2; border: 1px solid #fecdca; color: #b42318; font-size: .92rem; }
.pcc-form-msg--ok { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.pcc-notice { padding: 12px 14px; border-radius: 8px; margin: 0 0 18px; }
.pcc-notice--ok { background: #ecfdf3; border: 1px solid #abefc6; color: #067647; }
.pcc-notice--warn { background: #fffaeb; border: 1px solid #fedf89; color: #93370d; }
.pcc-success { text-align: center; padding: 40px 16px; background: #ecfdf3; border: 1px solid #abefc6; border-radius: var(--pcc-radius); }
.pcc-success h2 { color: #067647; }

/* ---------- Enquiry list ---------- */
.pcc-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.pcc-line { display: grid; gap: 16px; grid-template-columns: 72px minmax(0, 1fr); border: 1px solid var(--pcc-line); border-radius: var(--pcc-radius); padding: 14px; background: #fff; }
@media (min-width: 700px) { .pcc-line { grid-template-columns: 110px minmax(0, 1fr); padding: 18px; } }
.pcc-line__img { display: block; background: var(--pcc-soft); border-radius: 8px; overflow: hidden; align-self: start; aspect-ratio: 400 / 462; }
.pcc-line__img img { width: 100%; height: 100%; object-fit: contain; }
.pcc-line__head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pcc-line__head h3 a { text-decoration: none; }
.pcc-line .pcc-field { margin-top: 12px; }
.pcc-line .pcc-swatch { width: 32px; height: 32px; }
.pcc-line--gone { grid-template-columns: 1fr auto; align-items: center; background: #fffaeb; border-color: #fedf89; }
.pcc-total { text-align: right; font-weight: 700; margin: 14px 0 0; }

/* ---------- Account ---------- */
.pcc-account__cols { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .pcc-account__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pcc-account__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 18px; flex-wrap: wrap; }
.pcc-account__head h2 { margin: 0; }
.pcc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--pcc-line); margin: 0 0 22px; overflow-x: auto; overflow-y: hidden; }
.pcc-tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 16px; font: inherit; font-weight: 600; color: var(--pcc-muted); cursor: pointer; white-space: nowrap; margin-bottom: -1px; }
.pcc-tabs button.is-active { color: var(--pcc-ink); border-bottom-color: var(--pcc-accent); }
.pcc-pill { display: inline-block; min-width: 22px; padding: 1px 7px; background: var(--pcc-soft); border-radius: 999px; font-size: .78rem; text-align: center; }
.pcc-panel > .pcc-quote, .pcc-panel > .pcc-card-box { margin: 0 0 16px; }
.pcc-quote { border: 1px solid var(--pcc-line); border-radius: var(--pcc-radius); padding: 18px; background: #fff; }
.pcc-quote__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 0 0 10px; }
.pcc-quote__items { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.pcc-quote__items li { padding: 8px 0; border-bottom: 1px dashed var(--pcc-line); }
.pcc-quote__sizes { display: block; color: var(--pcc-muted); font-size: .9rem; }
.pcc-quote__msg { margin: 8px 0; color: #374151; }
.pcc-quote__reply { background: var(--pcc-soft); border-left: 3px solid var(--pcc-accent); padding: 12px 14px; border-radius: 0 8px 8px 0; margin: 12px 0; }
.pcc-quote__reply p { margin: 6px 0 0; }
.pcc-quote__foot { margin-top: 12px; }
.pcc-status { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #eef2f6; color: #344054; white-space: nowrap; }
.pcc-status--quoted { background: #e0f2fe; color: #075985; }
.pcc-status--accepted { background: #ecfdf3; color: #067647; }
.pcc-status--closed { background: #f2f4f7; color: #667085; }
.pcc-danger { border-color: #fecdca; margin-top: 16px; }

/* ---------- Picture tiles: brands, types, categories ---------- */
.pcc-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .pcc-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .pcc-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .pcc-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.pcc-cat { margin: 0; padding: 0; min-width: 0; }
.pcc-cat__link { position: relative; display: block; aspect-ratio: 373 / 533; border-radius: 4px; overflow: hidden; background: var(--pcc-soft); text-decoration: none; color: #fff; }
.pcc-cat__media { position: absolute; inset: 0; display: block; }
.pcc-cat__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.pcc-cat__link:hover .pcc-cat__media img, .pcc-cat__link:focus-visible .pcc-cat__media img { transform: scale(1.04); }
.pcc-cat__label {
	position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 14px 10px; border-radius: 4px; text-align: center; line-height: 1.2;
	background: rgba(84, 84, 90, .92); color: #fff; font-weight: 700; font-size: 1.02rem; transition: background .15s;
}
.pcc-cat__link:hover .pcc-cat__label, .pcc-cat__link:focus-visible .pcc-cat__label { background: var(--pcc-accent); color: var(--pcc-accent-ink); }
.pcc-cat__link:focus-visible { outline: 3px solid color-mix(in srgb, var(--pcc-accent) 60%, transparent); outline-offset: 2px; }
.pcc-cats--hub { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1100px; }
@media (min-width: 700px) { .pcc-cats--hub { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .pcc-cats--hub { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.pcc-cats--hub .pcc-cat__label { font-size: 1.2rem; padding: 18px 10px; }
.pcc-subcats { margin: 0 0 28px; }
.pcc-subcats .pcc-cats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pcc-subcats .pcc-cat__link { aspect-ratio: 4 / 3.4; }
.pcc-subcats .pcc-cat__label { padding: 10px 8px; font-size: .95rem; }
@media (prefers-reduced-motion: reduce) { .pcc-cat__media img { transition: none; } }

/* ---------- Toast & floating button ---------- */
.pcc-toast {
	position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 99999;
	display: flex; gap: 14px; align-items: center; background: #111827; color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
	transition: opacity .2s, transform .2s; max-width: calc(100vw - 24px); font-size: .95rem;
}
.pcc-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.pcc-toast a { color: #fff; font-weight: 700; white-space: nowrap; }
.pcc-float {
	position: fixed; right: 16px; bottom: 16px; z-index: 99998; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px;
	background: var(--pcc-accent, #1b6ef3); color: var(--pcc-accent-ink, #fff); text-decoration: none; font-weight: 700; box-shadow: 0 6px 18px rgba(0,0,0,.16); font-size: .95rem;
}
.pcc-float__count { background: #fff; color: #111827; min-width: 24px; height: 24px; border-radius: 12px; display: inline-grid; place-items: center; font-size: .82rem; padding: 0 6px; }
.pcc-menu-count { display: inline-block; margin-left: 6px; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--pcc-accent, #1b6ef3); color: var(--pcc-accent-ink, #fff); font-size: .75rem; line-height: 20px; text-align: center; }
.pcc-count { font-weight: 700; }

@media (max-width: 600px) {
	.pcc-gallery__thumbs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
	.pcc-gallery__thumbs li { flex: none; }
}
@media (max-width: 520px) {
	.pcc-float__label { display: none; }
	.pcc-wrap { padding-top: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.pcc-card__media img, .pcc-toast { transition: none; }
}
