/* Peninsula catalogue design: navy, white, one gold accent. Loaded by pen-design.php. */
:root {
	--pen-navy: #0B1B33;
	--pen-ink: #0F172A;
	--pen-text: #334155;
	--pen-muted: #475569;
	--pen-line: #E3E7EE;
	--pen-ground: #F5F6F8;
	--pen-gold: #C9A24B;
	--pen-gold-ink: #6B4D12;
	--pen-gold-soft: #F6EDD8;
	--pen-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
.pen-mono { font-family: var(--pen-mono); }

/* Buttons */
.pen-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 12px; border: 0; font: inherit; font-weight: 700; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
.pen-btn--navy { background: var(--pen-navy); color: #fff !important; }
.pen-btn--navy:hover { background: #13294A; }
.pen-btn--gold { background: var(--pen-gold); color: var(--pen-navy) !important; }
.pen-btn--gold:hover { background: #D6B25F; }
.pen-btn--line { background: #fff; color: var(--pen-navy) !important; border: 1px solid var(--pen-line); }
.pen-btn--sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.pen-btn--block { display: flex; width: 100%; min-height: 54px; font-size: 16px; }
.pen-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--pen-line); background: #fff; color: var(--pen-navy) !important; cursor: pointer; }
.pen-btn:focus-visible, .pen-icon-btn:focus-visible, .pen-card a:focus-visible, .pen-cats__tile:focus-visible, .pen-qty button:focus-visible { outline: 3px solid var(--pen-gold); outline-offset: 2px; }

/* Aftermarket parts must never look genuine: slate badge instead of gold. */
.pen-badge--am { color: #1E3A5F !important; background: #E3EAF4 !important; }
.pen-bulk__alt { display: block; margin-top: 4px; font-size: 13px; color: var(--pen-muted); }
.pen-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pen-gold-ink); background: var(--pen-gold-soft); padding: 6px 10px; border-radius: 999px; }

/* Product grid and cards */
.pen-design ul.products { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 18px; margin: 0 0 32px !important; padding: 0 !important; }
.pen-design ul.products::before, .pen-design ul.products::after { display: none !important; }
.pen-design ul.products li.pen-card { min-width: 0; overflow-wrap: anywhere; width: auto !important; margin: 0 !important; float: none !important; padding: 18px !important; }
.pen-card { list-style: none; background: #fff; border: 1px solid var(--pen-line); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 14px; min-height: 240px; box-sizing: border-box; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.pen-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(11, 27, 51, .35); border-color: var(--pen-gold); }
.pen-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pen-card__cat { font-size: 13px; color: var(--pen-muted); text-align: right; }
.pen-card__main { display: flex; align-items: flex-start; gap: 14px; text-decoration: none !important; }
.pen-card__text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pen-card__img { flex: 0 0 72px; width: 72px; height: 72px; border: 1px solid var(--pen-line); border-radius: 12px; overflow: hidden; background: #fff; }
.pen-card__img img { width: 100% !important; height: 100% !important; object-fit: contain; margin: 0 !important; }
/* Product page: a smaller picture, since most parts show their category's picture for now. */
.single-product .woocommerce-product-gallery img { max-height: 280px; width: auto !important; margin: 0 auto; object-fit: contain; }
.pen-img-note { font-size: 12px; color: var(--pen-muted); text-align: center; margin: 6px 0 0; }
@media (max-width: 767px) {
	.single-product .woocommerce-product-gallery img { max-height: 200px; }
	.single-product #ht-ctc-chat { display: none !important; } /* The page has its own WhatsApp button; the floating one covered the price. */
}
.pen-card__pn { font-size: 21px; font-weight: 600; color: var(--pen-navy); letter-spacing: .01em; word-break: break-all; }
.pen-card__name { font-size: 16px; line-height: 1.45; color: var(--pen-text); }
.pen-card__main:hover .pen-card__pn { color: #8A6420; }
.pen-card__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pen-card__price { font-size: 24px; font-weight: 800; color: var(--pen-navy); }
.pen-card__price .woocommerce-Price-currencySymbol { font-size: 13px; font-weight: 600; color: var(--pen-muted); margin-right: 2px; }
.pen-card__price a { font-size: 15px; font-weight: 700; color: var(--pen-navy); }
.pen-card__actions { display: flex; gap: 8px; }
.pen-card__actions .pen-icon-btn { flex: none; width: 44px !important; min-width: 0 !important; padding: 0 !important; }
.pen-card__top .pen-badge { flex: none; white-space: nowrap; }
.pen-card__cat { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Part finder */
.pen-finder { background: var(--pen-navy); color: #fff; border-radius: 24px; padding: clamp(24px, 3.5vw, 44px) clamp(20px, 4vw, 48px); display: flex; flex-direction: column; gap: 16px; }
.pen-finder__eyebrow { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--pen-gold); }
.pen-finder__title { margin: 0; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; color: #fff; max-width: 900px; }
.pen-finder__sub { margin: 0; font-size: 16px; line-height: 1.6; color: #C3CEDF; max-width: 640px; }
.pen-finder__form { position: relative; max-width: 820px; margin: 0; }
.pen-finder__modes { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 14px; background: rgba(255, 255, 255, .08); }
.pen-finder__modes > * { padding: 10px 18px; border-radius: 10px; font-size: 15px; font-weight: 700; color: #C3CEDF !important; text-decoration: none !important; }
.pen-finder__modes .is-on { background: #fff; color: var(--pen-navy) !important; }
.pen-finder__modes a:hover, .pen-finder__modes a:focus-visible { color: #fff !important; background: rgba(255, 255, 255, .12); outline: none; }
.pen-finder__label { display: block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #C3CEDF; margin-bottom: 10px; }
.pen-finder__box { display: flex; align-items: center; gap: 12px; background: #fff; color: var(--pen-muted); border-radius: 16px; padding: 8px 8px 8px 20px; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .6); }
.pen-finder__input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; font-family: var(--pen-mono) !important; font-size: 19px !important; color: var(--pen-ink) !important; padding: 14px 4px !important; height: auto !important; }
.pen-finder__input:focus { outline: none; }
.pen-finder__box:focus-within { outline: 3px solid var(--pen-gold); outline-offset: 2px; }
.pen-finder__results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 0; list-style: none; background: #fff; border-radius: 16px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .55); overflow: hidden; z-index: 50; }
.pen-finder__results a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid #EEF1F5; text-decoration: none; color: var(--pen-ink); }
.pen-finder__results a:hover, .pen-finder__results a:focus { background: var(--pen-ground); outline: none; }
.pen-finder__results .pen-r-pn { display: block; font-family: var(--pen-mono); font-size: 17px; font-weight: 600; color: var(--pen-navy); }
.pen-finder__results .pen-r-name { display: block; font-size: 14px; color: var(--pen-muted); margin-top: 4px; }
.pen-finder__results .pen-r-price { font-weight: 700; color: var(--pen-navy); white-space: nowrap; }
.pen-finder__results .pen-r-none { padding: 18px 22px; color: var(--pen-muted); }

/* Bulk list search */
.pen-bulk { background: #fff; border: 1px solid var(--pen-line); border-radius: 24px; padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 16px; }
.pen-bulk__title { margin: 0; font-size: clamp(26px, 3.5vw, 38px); font-weight: 800; color: var(--pen-navy); letter-spacing: -.01em; }
.pen-bulk__sub { margin: 0; font-size: 17px; line-height: 1.6; color: var(--pen-text); max-width: 680px; }
.pen-bulk__form { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.pen-bulk__drop { position: relative; display: flex; align-items: center; gap: 16px; padding: 22px; border: 2px dashed #C8D0DC; border-radius: 16px; background: var(--pen-ground); color: var(--pen-navy); cursor: pointer; transition: border-color .2s ease; }
.pen-bulk__drop:hover, .pen-bulk__drop:focus-within { border-color: var(--pen-gold); }
.pen-bulk__drop > span { display: flex; flex-direction: column; gap: 4px; }
.pen-bulk__file { font-size: 14px; color: var(--pen-muted); }
.pen-bulk__drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pen-bulk__label { font-size: 14px; font-weight: 600; color: var(--pen-muted); }
.pen-bulk__text { width: 100%; box-sizing: border-box; border: 1px solid var(--pen-line); border-radius: 14px; padding: 14px; font-size: 16px; color: var(--pen-ink); resize: vertical; }
.pen-bulk__text:focus { outline: 3px solid var(--pen-gold); outline-offset: 1px; }
.pen-bulk__form .pen-btn { align-self: flex-start; }
.pen-bulk__form .pen-btn:disabled { opacity: .6; cursor: wait; }
.pen-bulk__note { margin: 0; color: var(--pen-muted); }
.pen-bulk__note--err { color: #B42318; }
.pen-bulk__sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 0; }
.pen-bulk__sum p { margin: 0; font-size: 17px; color: var(--pen-ink); }
.pen-bulk__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pen-bulk__wrap { overflow-x: auto; border: 1px solid var(--pen-line); border-radius: 14px; }
.pen-bulk__table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 0; }
.pen-bulk__table th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--pen-muted); background: var(--pen-ground); padding: 12px 14px; white-space: nowrap; }
.pen-bulk__table td { padding: 12px 14px; border-top: 1px solid #EEF1F5; color: var(--pen-text); vertical-align: top; }
.pen-bulk__table td:first-child { white-space: nowrap; font-weight: 600; }
.pen-bulk__table td:first-child a { color: var(--pen-navy); }
.pen-bulk__table td:nth-child(n+3) { white-space: nowrap; }
.pen-bulk__miss td { color: var(--pen-muted); background: #FFFBF2; }

/* Category tiles */
.pen-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.pen-cats__tile { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--pen-line); color: var(--pen-ink) !important; text-decoration: none !important; transition: border-color .2s ease, background .2s ease, color .2s ease; }
.pen-cats__tile:hover { background: var(--pen-navy); border-color: var(--pen-navy); color: #fff !important; }
.pen-cats__icon { display: inline-flex; width: 46px; height: 46px; border-radius: 12px; align-items: center; justify-content: center; background: var(--pen-gold-soft); color: var(--pen-gold-ink); }
.pen-cats__tile:hover .pen-cats__icon { background: rgba(201, 162, 75, .22); color: #E7C67A; }
.pen-cats__name { font-size: 16px; font-weight: 700; }
.pen-cats__count { font-size: 13px; opacity: .75; }

/* Quick view */
.pen-qv { position: fixed; inset: 0; z-index: 99999; display: flex; justify-content: flex-end; }
.pen-qv[hidden] { display: none; }
.pen-qv__backdrop { position: absolute; inset: 0; border: 0; background: rgba(11, 27, 51, .55); cursor: pointer; }
.pen-qv__panel { position: relative; width: 440px; max-width: 100%; height: 100%; overflow-y: auto; background: #fff; color: var(--pen-ink); padding: 32px; box-sizing: border-box; display: flex; flex-direction: column; gap: 14px; animation: pen-in .3s ease; }
/* The theme styles every <button>; keep the backdrop behind the panel and the close icon visible. */
.pen-qv__backdrop { z-index: 0; padding: 0 !important; margin: 0 !important; min-height: 0 !important; box-shadow: none !important; }
.pen-qv__panel { z-index: 1; }
.pen-qv .pen-icon-btn { background: #fff !important; border: 1px solid var(--pen-line) !important; padding: 0 !important; color: var(--pen-navy) !important; }
.pen-icon-btn svg { display: block !important; flex: none; width: 18px !important; height: 18px; stroke: currentColor !important; fill: none !important; }
@keyframes pen-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.pen-qv__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.pen-qv__label { margin: 0; font-size: 12px; color: var(--pen-muted); letter-spacing: .08em; text-transform: uppercase; }
.pen-qv__pn { margin: 0; font-size: 28px; font-weight: 600; color: var(--pen-navy); word-break: break-all; }
.pen-qv__name { margin: 0 0 8px; font-size: 18px; line-height: 1.5; color: var(--pen-text); }
.pen-qv__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.pen-qv__facts > div { background: var(--pen-ground); border-radius: 14px; padding: 16px; }
.pen-qv__price { margin: 6px 0 0; font-size: 22px; font-weight: 800; color: var(--pen-navy); }
.pen-qv__cat { margin: 6px 0 0; font-size: 16px; font-weight: 700; color: var(--pen-navy); }
.pen-qty { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--pen-line); border-radius: 12px; width: fit-content; margin-bottom: 8px; }
.pen-qty button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--pen-navy); }
.pen-qty output { min-width: 36px; text-align: center; font-size: 18px; font-weight: 700; }
.pen-qv__actions { display: flex; flex-direction: column; gap: 10px; }
.pen-qv__help { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--pen-muted); }

@media (prefers-reduced-motion: reduce) {
	.pen-card, .pen-qv__panel { transition: none; animation: none; }
	.pen-card:hover { transform: none; }
}
@media (max-width: 600px) {
	.pen-design ul.products { grid-template-columns: minmax(0, 1fr); }
	.pen-finder__box { flex-wrap: wrap; padding: 8px; }
	.pen-finder__box svg { display: none; }
	.pen-finder__input { width: 100%; padding: 12px !important; }
	.pen-finder__box .pen-btn { width: 100%; min-height: 50px; }
	.pen-finder__results { top: calc(100% + 6px); }
}
