/*
Theme Name: Performance Hobbies
Description: Recreates the look of the original performancehobbies.com ASP store.
Version: 1.0
Requires PHP: 8.0
*/

/* the old site: white page, blue text, red links, serif body, Arial headings */
:root { --ph-blue: #0000ff; --ph-red: #ff0033; }
html { background: #fff; }
body { margin: 0; background: #fff; color: var(--ph-blue); font: 16px/1.25 "Times New Roman", Times, serif; }
a, a:visited { color: var(--ph-red); }
a:active { color: #00ff33; }
img { max-width: 100%; }
td, th { color: var(--ph-blue); }
.arial, h1, h2, h3 { font-family: Arial, Helvetica, sans-serif; }

/* header */
.ph-top { display: flex; align-items: center; gap: 20px; padding: 14px; }
.ph-top img { display: block; width: 200px; }
.ph-sitename { font: 20pt "Arial Black", Arial, sans-serif; color: var(--ph-blue); text-decoration: none; }
.ph-sitename:visited { color: var(--ph-blue); }
.ph-divider { text-align: center; padding: 4px 0 10px; line-height: 0; }
.ph-divider img { width: 460px; max-width: 48%; height: 14px; }

/* two columns: button box on the left, content centred on the right */
.ph-wrap { display: flex; align-items: flex-start; gap: 4px; padding: 0 4px 0 4px; }
.ph-side { flex: 0 0 210px; border: 3px solid #000; padding: 6px 2px 10px; text-align: center; background: #fff; }
.ph-main { flex: 1 1 auto; min-width: 0; text-align: center; padding: 0 8px; }

.ph-btn { display: block; width: 140px; height: 32px; margin: 0 auto; position: relative; }
.ph-btn img { position: absolute; left: 0; top: 0; width: 140px; height: 32px; }
.ph-btn .on { visibility: hidden; }
.ph-btn:hover .on, .ph-btn:focus .on { visibility: visible; }
.ph-side form { margin: 18px 0 10px; font-weight: bold; }
.ph-side input[type=search] { width: 170px; box-sizing: border-box; }
.ph-side p { margin: 12px 4px; }
.ph-cards img { vertical-align: bottom; }
.ph-discount { font: bold 16px Arial, sans-serif; }
.ph-phone { color: red; }

/* "browse groups" tree under the buttons: top level + the branch you are in */
.ph-tree { text-align: left; margin: 14px 6px 0; padding-top: 8px; border-top: 1px solid #999; font: 13px Arial, sans-serif; }
.ph-tree h3 { font-size: 14px; margin: 0 0 4px; text-align: center; }
.ph-tree ul { list-style: none; margin: 0; padding-left: 10px; }
.ph-tree > ul { padding-left: 0; }
.ph-tree li { margin: 3px 0; }
.ph-tree li.current > a { font-weight: bold; color: var(--ph-blue); text-decoration: none; }

/* page/group titles and text */
.ph-title { font: 20pt Arial, sans-serif; color: var(--ph-blue); margin: 4px 0 16px; font-weight: normal; }
.ph-desc { margin: 0 0 12px; }
.ph-crumbs { margin: 14px 0; }
.ph-cartlinks { margin: 0 0 14px; }
.ph-subgroups { display: inline-block; text-align: left; margin: 0 0 18px; }
.ph-subgroups li { font: bold 16px Arial, sans-serif; }

/* product table, as on the old store.aspx */
.ph-scroll { overflow-x: auto; margin: 0 auto 6px; max-width: 100%; }
table.ph-products { border: 2px outset var(--ph-blue); border-spacing: 2px; margin: 0 auto; text-align: left; }
table.ph-products td, table.ph-products th { border: 1px inset var(--ph-blue); padding: 2px; vertical-align: top; font-weight: normal; }
table.ph-products th { font-weight: bold; }
table.ph-products th.red, .ph-price { color: red; }
.ph-item b { font-weight: bold; }
.ph-pl, .ph-pl:visited { color: var(--ph-blue); text-decoration: none; }
.ph-pl:hover { text-decoration: underline; }
.ph-item .ph-d p:first-child { margin-top: 0; }
.ph-item .ph-d p:last-child { margin-bottom: 0; }
.ph-buy { text-align: center; white-space: nowrap; }
.ph-oos { font-size: 8pt; }
.ph-haz { color: red; }
.ph-std { color: #000; }
tr.ph-section td { border: 0; padding-top: 10px; }
tr.ph-section b { text-decoration: underline; }
.ph-strike { text-decoration: line-through; }

/* home page */
.ph-news { font: bold 1.6em Arial, sans-serif; color: #ff0000; margin: 0 0 10px; }
.ph-news img { width: 64px; height: 54px; vertical-align: middle; }
.ph-home { font: 12pt Arial, sans-serif; }

/* footer */
.ph-foot { text-align: center; margin: 30px 0 20px; font: 13px Arial, sans-serif; }
.ph-foot .shuttle { width: 526px; height: 17px; }
.ph-foot-row { display: inline-flex; align-items: center; gap: 6px; text-align: center; }
.ph-foot-row img { width: 108px; height: 108px; }

/* launches / generic page tables */
table.ph-launches { border: 1px solid var(--ph-blue); border-collapse: collapse; margin: 0 auto; text-align: left; }
table.ph-launches td, table.ph-launches th { border: 1px solid var(--ph-blue); padding: 3px 6px; }
.ph-main .entry { text-align: left; max-width: 1000px; margin: 0 auto; }
.ph-main .entry.center { text-align: center; }

/* WooCommerce pages (cart, checkout, account, single product) */
.woocommerce-notices-wrapper, .woocommerce-message, .woocommerce-info, .woocommerce-error { text-align: left; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border: 1px solid var(--ph-blue); padding: 8px 10px; margin: 0 auto 12px; max-width: 900px; list-style: none; }
.woocommerce-error { border-color: red; color: red; }
.single-product .ph-main .product { text-align: left; max-width: 1000px; margin: 0 auto; }
.single-product div.product .woocommerce-product-gallery { max-width: 400px; float: left; margin: 0 20px 10px 0; }
.single-product .woocommerce-product-gallery__trigger { display: none; }
.single-product .summary .price { color: red; font-size: 1.3em; }
.single-product .related, .single-product .upsells { clear: both; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
button, .button, input[type=submit] { font: inherit; cursor: pointer; }

/* Add to Cart (and Woo's own buttons): red like the old nav buttons */
a.ph-cartbtn, a.ph-cartbtn:visited, .woocommerce .button, .woocommerce button.button, .woocommerce button.button.alt, .woocommerce a.button.alt, .woocommerce .single_add_to_cart_button, .single_add_to_cart_button {
	display: inline-block; background: #e00000; color: #fff !important; border: 1px solid #900; border-radius: 3px;
	padding: 3px 10px; font: bold 13px Arial, sans-serif; text-decoration: none; white-space: nowrap;
	box-shadow: 2px 2px 0 #777; cursor: pointer;
}
a.ph-cartbtn:hover, .woocommerce .button:hover, .woocommerce button.button.alt:hover, .single_add_to_cart_button:hover { background: #ff2a2a !important; }
.woocommerce button.button.alt, .woocommerce .single_add_to_cart_button { background: #e00000 !important; font-size: 15px; padding: 5px 14px; }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: red !important; font-size: 1.4em; }
.woocommerce div.product .product_title { font: bold 24pt Arial, sans-serif; }
a.ph-cartbtn:active { box-shadow: none; transform: translate(2px, 2px); }

/* phones: button box goes on top, buttons wrap in two columns */
@media (max-width: 760px) {
	img { height: auto; }
	.ph-top { padding: 10px 16px; gap: 12px; }
	.ph-top img { width: 110px; }
	.ph-sitename { font-size: 15pt; }
	.ph-wrap { flex-direction: column; padding: 0 16px; }
	.ph-side { flex: none; width: 100%; box-sizing: border-box; }
	.ph-btns { display: grid; grid-template-columns: repeat(2, 140px); justify-content: center; gap: 4px 12px; }
	.ph-btn { margin: 0; }
	.ph-tree { display: none; }
	.ph-main { padding: 0; width: 100%; }
	.ph-foot .shuttle { width: 90%; }
	.ph-foot-row { flex-direction: column; }
}
