/**
 * Tech PayPal Store — main stylesheet
 * Layout inspired by the sample tech e-commerce homepage.
 */

:root {
	--tps-red: #e31c23;
	--tps-red-dark: #c4181e;
	--tps-ink: #333e48;
	--tps-muted: #747474;
	--tps-border: #e6e6e6;
	--tps-bg: #f5f5f5;
	--tps-white: #ffffff;
	--tps-topbar: #f8f8f8;
	--tps-radius: 4px;
	--tps-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	--tps-container: 1200px;
	--tps-font: "Inter", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--tps-font);
	font-size: 14px;
	line-height: 1.5;
	color: var(--tps-ink);
	background: var(--tps-white);
}

a {
	color: var(--tps-ink);
	text-decoration: none;
}

a:hover {
	color: var(--tps-red);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.container {
	width: min(100% - 2rem, var(--tps-container));
	margin-inline: auto;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
}

/* Top bar */
.top-bar {
	background: var(--tps-topbar);
	border-bottom: 1px solid var(--tps-border);
	font-size: 13px;
}

.top-bar-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	min-height: 36px;
}

.top-bar-left,
.top-bar-right,
.top-menu {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.top-phone,
.top-email {
	color: var(--tps-muted);
}

@media (max-width: 991px) {
	.top-bar {
		display: none;
	}
}

/* Header */
.site-header {
	background: var(--tps-white);
	border-bottom: 1px solid var(--tps-border);
	position: sticky;
	top: 0;
	z-index: 100;
}

.header-desktop {
	display: none;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem 0;
}

.header-mobile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.65rem 0;
}

.header-logo-area,
.custom-logo-link,
.site-brand {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--tps-ink);
}

.custom-logo {
	max-height: 64px;
	width: auto;
}

.header-mobile .custom-logo {
	max-height: 48px;
}

.nav-toggle {
	appearance: none;
	border: 1px solid var(--tps-border);
	background: var(--tps-white);
	width: 40px;
	height: 40px;
	border-radius: var(--tps-radius);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.hamburger,
.hamburger::before,
.hamburger::after {
	display: block;
	width: 18px;
	height: 2px;
	background: var(--tps-ink);
	position: relative;
}

.hamburger::before,
.hamburger::after {
	content: "";
	position: absolute;
	left: 0;
}

.hamburger::before {
	top: -6px;
}

.hamburger::after {
	top: 6px;
}

.navbar-search {
	flex: 1;
	display: flex;
	border: 2px solid var(--tps-red);
	border-radius: var(--tps-radius);
	overflow: hidden;
	background: var(--tps-white);
}

.navbar-search .search-field {
	flex: 1;
	border: 0;
	padding: 0.7rem 0.9rem;
	font: inherit;
	min-width: 0;
}

.navbar-search .search-categories {
	border: 0;
	border-left: 1px solid var(--tps-border);
	padding: 0 0.5rem;
	background: #fafafa;
	max-width: 180px;
	font: inherit;
	color: var(--tps-muted);
}

.navbar-search .search-submit {
	border: 0;
	background: var(--tps-red);
	color: var(--tps-white);
	padding: 0 1.1rem;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.navbar-search .search-submit:hover {
	background: var(--tps-red-dark);
}

.secondary-menu {
	display: flex;
	gap: 1rem;
	font-weight: 600;
}

.header-icons {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.header-icon__cart {
	position: relative;
}

.cart-toggle {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-weight: 600;
}

.cart-items-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--tps-red);
	color: var(--tps-white);
	font-size: 11px;
}

.mini-cart-dropdown {
	display: none;
	position: absolute;
	right: 0;
	top: calc(100% + 8px);
	width: 320px;
	background: var(--tps-white);
	border: 1px solid var(--tps-border);
	box-shadow: var(--tps-shadow);
	padding: 1rem;
	z-index: 120;
}

.header-icon__cart:hover .mini-cart-dropdown,
.header-icon__cart:focus-within .mini-cart-dropdown {
	display: block;
}

@media (min-width: 992px) {
	.header-desktop {
		display: flex;
	}

	.header-mobile {
		display: none;
	}
}

/* Category drawer */
.category-drawer {
	position: fixed;
	inset: 0 auto 0 0;
	width: min(320px, 88vw);
	background: var(--tps-white);
	box-shadow: var(--tps-shadow);
	transform: translateX(-105%);
	transition: transform 0.25s ease;
	z-index: 200;
	padding: 1.25rem;
	overflow-y: auto;
}

.category-drawer.is-open {
	transform: translateX(0);
}

.drawer-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 190;
}

.drawer-close {
	appearance: none;
	border: 0;
	background: transparent;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	float: right;
}

.category-menu {
	clear: both;
	padding-top: 1rem;
}

.category-menu a {
	display: block;
	padding: 0.65rem 0.25rem;
	border-bottom: 1px solid var(--tps-border);
	font-weight: 500;
}

/* Content */
.site-content {
	padding: 1.5rem 0 3rem;
	background: var(--tps-bg);
	min-height: 50vh;
}

.site-content-inner {
	background: transparent;
}

.content-area {
	width: 100%;
}

/* Home hero */
.home-hero {
	position: relative;
	min-height: 280px;
	border-radius: 8px;
	overflow: hidden;
	background:
		linear-gradient(120deg, rgba(51, 62, 72, 0.88), rgba(227, 28, 35, 0.55)),
		#333e48;
	background-size: cover;
	background-position: center;
	color: var(--tps-white);
	margin-bottom: 2rem;
	display: flex;
	align-items: center;
}

.home-hero-inner {
	padding: 2.5rem;
	max-width: 560px;
}

.home-hero-title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 300;
	letter-spacing: -0.02em;
}

.home-hero-text {
	margin: 0 0 1.25rem;
	opacity: 0.95;
	font-size: 1rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.7rem 1.25rem;
	border-radius: var(--tps-radius);
	font-weight: 600;
	border: 0;
	cursor: pointer;
}

.btn-primary,
.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	background: var(--tps-red);
	color: var(--tps-white) !important;
}

.btn-primary:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
	background: var(--tps-red-dark);
}

/* Product sections */
.tps-product-section {
	background: var(--tps-white);
	border-radius: 8px;
	padding: 1.25rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--tps-shadow);
}

.section-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
	border-bottom: 2px solid var(--tps-bg);
	padding-bottom: 0.75rem;
}

.section-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
}

.section-link {
	color: var(--tps-red);
	font-weight: 600;
	font-size: 13px;
}

ul.products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	ul.products.columns-4,
	ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.product-item .product-outer,
.woocommerce ul.products li.product {
	background: var(--tps-white);
	border: 1px solid var(--tps-border);
	border-radius: 6px;
	height: 100%;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-item .product-outer:hover,
.woocommerce ul.products li.product:hover {
	border-color: #f0b0b2;
	box-shadow: var(--tps-shadow);
}

.product-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 0.85rem;
}

.loop-product-categories {
	display: block;
	font-size: 12px;
	color: var(--tps-muted);
	margin-bottom: 0.35rem;
}

.woocommerce-loop-product__title {
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 0.75rem;
	line-height: 1.35;
	min-height: 2.7em;
}

.product-thumbnail {
	margin-bottom: 0.75rem;
}

.product-thumbnail img,
.woocommerce ul.products li.product img {
	margin: 0 auto;
	object-fit: contain;
	max-height: 180px;
}

.product-loop-body {
	margin-top: auto;
}

.woocommerce ul.products li.product .price,
.price {
	color: var(--tps-red);
	font-weight: 700;
	font-size: 1.05rem;
}

.product-loop-footer {
	margin-top: 0.75rem;
}

.woocommerce ul.products li.product .button {
	width: 100%;
	text-align: center;
}

/* Entries */
.entry,
.home-page-content {
	background: var(--tps-white);
	padding: 1.5rem;
	border-radius: 8px;
	box-shadow: var(--tps-shadow);
}

.entry-title {
	margin-top: 0;
}

/* Footer */
.site-footer {
	background: #2b343b;
	color: #cfd5da;
}

.site-footer a {
	color: #e8ecef;
}

.site-footer a:hover {
	color: var(--tps-white);
}

.footer-newsletter {
	background: #243038;
	padding: 1.5rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-bottom-widgets {
	padding: 2.5rem 0;
}

.footer-grid {
	display: grid;
	gap: 2rem;
}

@media (min-width: 900px) {
	.footer-grid {
		grid-template-columns: 1.1fr 2fr;
	}
}

.footer-call-us {
	margin: 1rem 0;
}

.call-us-text {
	display: block;
	font-size: 13px;
	opacity: 0.8;
}

.call-us-number {
	display: block;
	font-size: 1.35rem;
	font-weight: 700;
	color: var(--tps-white);
}

.footer-address address {
	font-style: normal;
	margin: 0.35rem 0 0;
	line-height: 1.6;
}

.social-icons {
	display: flex;
	gap: 0.75rem;
	margin-top: 1rem;
}

.footer-menus {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.footer-menu-col .widget-title {
	color: var(--tps-white);
	margin: 0 0 0.75rem;
	font-size: 1rem;
}

.footer-menu li + li {
	margin-top: 0.45rem;
}

.copyright-bar {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding: 1rem 0;
	font-size: 13px;
}

.copyright-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.paypal-badge {
	display: inline-block;
	background: #003087;
	color: #fff;
	font-weight: 700;
	padding: 0.35rem 0.7rem;
	border-radius: 4px;
	letter-spacing: 0.02em;
}

.payment-logos {
	max-height: 38px;
	width: auto;
}

.site-footer .custom-logo {
	max-height: 72px;
	filter: brightness(1.05);
}

/* Back to top */
.back-to-top {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--tps-red);
	color: var(--tps-white);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--tps-shadow);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s ease;
	z-index: 150;
}

.back-to-top.is-visible {
	opacity: 1;
	pointer-events: auto;
}

/* WooCommerce pages */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border-top-color: var(--tps-red);
}

.tps-paypal-note {
	font-size: 13px;
	color: var(--tps-muted);
	margin: 0 0 1rem;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
	border-bottom-color: var(--tps-red);
}

.woocommerce span.onsale {
	background: var(--tps-red);
}

.tps-shop .woocommerce-products-header__title {
	margin-top: 0;
}

body.drawer-open {
	overflow: hidden;
}
