/* =========================================================
   TecStore Eletrônicos - main.css
   ========================================================= */

:root {
	--ts-primary: #1a56db;
	--ts-primary-dark: #1443b0;
	--ts-dark: #0b1c3d;
	--ts-dark-2: #0f2247;
	--ts-red: #e02424;
	--ts-star: #f5a623;
	--ts-bg: #ffffff;
	--ts-bg-soft: #f5f6f8;
	--ts-border: #e5e7eb;
	--ts-text: #17203a;
	--ts-text-muted: #6b7280;
	--ts-radius: 10px;
	--ts-radius-sm: 6px;
	--ts-shadow: 0 2px 10px rgba(15, 27, 62, 0.06);
	--ts-shadow-hover: 0 10px 24px rgba(15, 27, 62, 0.12);
	--font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset básico ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--font-base);
	color: var(--ts-text);
	background: var(--ts-bg);
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, button { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; }

.container {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 20px;
}

.icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- Botões ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: none;
	border-radius: var(--ts-radius-sm);
	padding: 12px 22px;
	font-weight: 600;
	font-size: 14.5px;
	cursor: pointer;
	transition: background .15s ease, transform .1s ease;
}
.btn-primary {
	background: var(--ts-primary);
	color: #fff;
}
.btn-primary:hover { background: var(--ts-primary-dark); }
.btn-primary:active { transform: scale(0.98); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 13.5px; }
.btn.is-added { background: #16a34a; }

/* ---------- Topbar ---------- */
.topbar {
	background: var(--ts-dark);
	color: #cfd8ef;
	font-size: 13px;
}
.topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 38px;
}
.topbar-left { display: flex; align-items: center; gap: 8px; }
.topbar-left .icon { width: 14px; height: 14px; }
.topbar-right { display: flex; align-items: center; gap: 22px; }
.topbar-right a { display: flex; align-items: center; gap: 6px; color: #cfd8ef; opacity: .9; }
.topbar-right a:hover { opacity: 1; color: #fff; }
.topbar-right .icon { width: 14px; height: 14px; }

/* ---------- Header ---------- */
.site-header {
	background: #fff;
	border-bottom: 1px solid var(--ts-border);
	padding: 16px 0;
}
.header-inner {
	display: flex;
	align-items: center;
	gap: 32px;
}
.site-logo {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}
.logo-icon {
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background: var(--ts-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}
.logo-icon .icon { width: 22px; height: 22px; }
.logo-text {
	display: flex;
	flex-direction: column;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.1;
	color: var(--ts-dark);
}
.logo-text small {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1.5px;
	color: var(--ts-text-muted);
}

.header-search {
	flex: 1;
	display: flex;
	align-items: stretch;
	border: 1.5px solid var(--ts-border);
	border-radius: var(--ts-radius-sm);
	overflow: hidden;
	max-width: 620px;
}
.header-search input[type="search"] {
	flex: 1;
	border: none;
	padding: 0 16px;
	outline: none;
	min-width: 0;
}
.header-search-cat {
	border: none;
	border-left: 1px solid var(--ts-border);
	background: var(--ts-bg-soft);
	padding: 0 12px;
	color: var(--ts-text-muted);
	font-size: 13.5px;
	max-width: 170px;
}
.header-search button {
	background: var(--ts-primary);
	color: #fff;
	border: none;
	padding: 0 20px;
	display: flex;
	align-items: center;
}
.header-search button:hover { background: var(--ts-primary-dark); }

.header-actions { display: flex; align-items: center; gap: 26px; flex-shrink: 0; }
.header-action-item { display: flex; align-items: center; gap: 8px; }
.header-action-item span { display: flex; flex-direction: column; line-height: 1.3; }
.header-action-item small { font-size: 12px; color: var(--ts-text-muted); }
.header-action-item strong { font-size: 14px; font-weight: 700; }
.header-action-item .icon { width: 24px; height: 24px; color: var(--ts-dark); }
.cart-icon-wrap { position: relative; }
.cart-count {
	position: absolute;
	top: -8px;
	right: -8px;
	background: var(--ts-red);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	border-radius: 50%;
	width: 17px;
	height: 17px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Menu principal ---------- */
.main-nav {
	background: var(--ts-primary);
}
.main-nav-inner {
	display: flex;
	align-items: center;
	gap: 4px;
	position: relative;
}
.all-categories-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(255,255,255,.12);
	color: #fff;
	border: none;
	padding: 13px 18px;
	font-weight: 600;
	font-size: 14px;
	white-space: nowrap;
}
.all-categories-btn:hover { background: rgba(255,255,255,.2); }
.all-categories-btn .icon { width: 16px; height: 16px; }

.all-categories-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #fff;
	width: 260px;
	border-radius: 0 0 var(--ts-radius) var(--ts-radius);
	box-shadow: var(--ts-shadow-hover);
	z-index: 40;
	padding: 8px 0;
}
.all-categories-dropdown.is-open { display: block; }
.all-categories-dropdown li a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 18px;
	color: var(--ts-text);
	font-size: 14px;
}
.all-categories-dropdown li a:hover { background: var(--ts-bg-soft); color: var(--ts-primary); }
.all-categories-dropdown .icon { width: 17px; height: 17px; }

.primary-menu {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}
.primary-menu li a {
	display: flex;
	align-items: center;
	gap: 7px;
	padding: 13px 16px;
	color: #eef2ff;
	font-size: 14px;
	font-weight: 500;
}
.primary-menu li a:hover { background: rgba(255,255,255,.12); color: #fff; }
.primary-menu li a .icon { width: 16px; height: 16px; }
.primary-menu .promo-link { color: #ffd3d3 !important; }

/* ---------- Hero ---------- */
.hero { background: var(--ts-dark); overflow: hidden; }
.hero-slider { position: relative; }
.hero-slide {
	display: none;
	background: linear-gradient(120deg, var(--ts-dark) 0%, var(--ts-dark-2) 100%);
}
.hero-slide.is-active { display: block; }
.hero-slide-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	min-height: 420px;
	gap: 40px;
}
.hero-content { color: #fff; max-width: 480px; }
.hero-eyebrow {
	display: inline-block;
	color: #7ea6ff;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 1.5px;
	margin-bottom: 14px;
}
.hero-content h1 {
	font-size: 44px;
	line-height: 1.1;
	margin-bottom: 8px;
}
.hero-content h2 {
	font-size: 24px;
	font-weight: 600;
	color: #d7e0f7;
	margin-bottom: 16px;
}
.hero-content p {
	color: #aab6d6;
	font-size: 15px;
	margin-bottom: 26px;
	line-height: 1.6;
}
.hero-image img { width: 100%; height: auto; }
.hero-image { display: flex; align-items: center; justify-content: center; }

.hero-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: rgba(255,255,255,.12);
	border: none;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
}
.hero-arrow:hover { background: rgba(255,255,255,.25); }
.hero-arrow-prev { left: 24px; }
.hero-arrow-next { right: 24px; }

.hero-dots {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
}
.hero-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: rgba(255,255,255,.35);
	border: none;
	padding: 0;
}
.hero-dot.is-active { background: #fff; width: 22px; border-radius: 4px; }

/* ---------- Benefícios ---------- */
.benefits-bar {
	background: var(--ts-bg-soft);
	border-bottom: 1px solid var(--ts-border);
}
.benefits-inner {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 20px;
	padding: 22px 20px;
}
.benefit-item { display: flex; align-items: center; gap: 12px; }
.benefit-item .icon { width: 26px; height: 26px; color: var(--ts-primary); flex-shrink: 0; }
.benefit-item div { display: flex; flex-direction: column; }
.benefit-item strong { font-size: 14px; }
.benefit-item span { font-size: 12.5px; color: var(--ts-text-muted); }

/* ---------- Seções gerais ---------- */
.section { padding: 46px 0; }
.section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 22px;
}
.section-header h2 { font-size: 21px; }
.section-link {
	display: flex;
	align-items: center;
	gap: 4px;
	color: var(--ts-primary);
	font-weight: 600;
	font-size: 14px;
}
.section-link .icon { width: 16px; height: 16px; }
.section-link:hover { text-decoration: underline; }

/* ---------- Categorias ---------- */
.categories-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 16px;
}
.category-card {
	background: var(--ts-bg-soft);
	border-radius: var(--ts-radius);
	padding: 26px 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
	transition: box-shadow .15s ease, transform .15s ease;
	border: 1px solid transparent;
}
.category-card:hover {
	box-shadow: var(--ts-shadow-hover);
	transform: translateY(-2px);
	border-color: var(--ts-border);
}
.category-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: var(--ts-shadow);
}
.category-icon .icon { width: 26px; height: 26px; color: var(--ts-dark); }
.category-title { font-size: 13.5px; font-weight: 600; }

/* ---------- Produtos ---------- */
.products-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 18px;
}
.product-card {
	border: 1px solid var(--ts-border);
	border-radius: var(--ts-radius);
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
	transition: box-shadow .15s ease, transform .15s ease;
}
.product-card:hover { box-shadow: var(--ts-shadow-hover); transform: translateY(-3px); }
.product-image-wrap {
	position: relative;
	background: var(--ts-bg-soft);
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
}
.product-image-wrap img { max-height: 100%; object-fit: contain; }
.product-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: var(--ts-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 5px;
	z-index: 2;
}
.product-info {
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}
.product-title {
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.4;
	min-height: 37px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.product-title:hover { color: var(--ts-primary); }
.product-rating { display: flex; align-items: center; gap: 2px; }
.product-rating .icon { width: 13px; height: 13px; }
.star-filled { color: var(--ts-star); fill: var(--ts-star); }
.star-empty { color: var(--ts-border); fill: var(--ts-border); }
.review-count { color: var(--ts-text-muted); font-size: 12px; margin-left: 4px; }
.product-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-current { font-size: 17px; font-weight: 700; color: var(--ts-text); }
.price-old { font-size: 12.5px; color: var(--ts-text-muted); text-decoration: line-through; }
.product-installments { font-size: 12px; color: var(--ts-text-muted); }
.add-to-cart-btn { margin-top: auto; }

/* ---------- Banners promocionais ---------- */
.promo-banners-grid {
	display: grid;
	grid-template-columns: 1.1fr 1fr 1fr;
	gap: 18px;
}
.promo-banner {
	border-radius: var(--ts-radius);
	padding: 26px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	overflow: hidden;
	position: relative;
	min-height: 150px;
}
.promo-banner-dark {
	background: linear-gradient(120deg, var(--ts-dark) 0%, #1c1140 100%);
	color: #fff;
}
.promo-banner-light {
	background: #eef2ff;
}
.promo-banner-text h3 { font-size: 19px; margin-bottom: 6px; }
.promo-banner-dark p { color: #c6cbe8; margin-bottom: 16px; font-size: 13.5px; }
.promo-banner-light p { color: var(--ts-text-muted); margin-bottom: 16px; font-size: 13.5px; }
.promo-banner-light h3 { color: var(--ts-dark); }
.promo-banner-icon { width: 70px; height: 70px; color: #ff5fa2; opacity: .9; flex-shrink: 0; }
.promo-banner-icon .icon,
.promo-banner-icon { width: 70px; height: 70px; }
.promo-banner-image { width: 110px; height: auto; flex-shrink: 0; }

/* ---------- Newsletter ---------- */
.newsletter-bar { background: var(--ts-dark); padding: 26px 0; }
.newsletter-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}
.newsletter-text { display: flex; align-items: center; gap: 14px; color: #fff; }
.newsletter-text .icon { width: 26px; height: 26px; color: #7ea6ff; }
.newsletter-text strong { display: block; font-size: 16px; }
.newsletter-text span { display: block; color: #aab6d6; font-size: 13px; margin-top: 2px; }
.newsletter-form { display: flex; gap: 10px; flex: 1; max-width: 460px; }
.newsletter-form input {
	flex: 1;
	border: none;
	border-radius: var(--ts-radius-sm);
	padding: 12px 16px;
	outline: none;
}
.newsletter-form button {
	background: var(--ts-primary);
	color: #fff;
	border: none;
	border-radius: var(--ts-radius-sm);
	padding: 12px 22px;
	font-weight: 600;
	white-space: nowrap;
}
.newsletter-form button:hover { background: var(--ts-primary-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ts-dark); color: #b9c2e0; }
.footer-top {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
	gap: 30px;
	padding: 50px 20px 34px;
}
.footer-col p { font-size: 13.5px; line-height: 1.7; color: #97a2c7; }
.footer-logo { margin-bottom: 14px; }
.footer-logo .logo-text { color: #fff; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255,255,255,.08);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}
.footer-social a:hover { background: var(--ts-primary); }
.footer-social .icon { width: 16px; height: 16px; }
.footer-widget-title { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-menu li { margin-bottom: 11px; }
.footer-menu li a { font-size: 13.5px; color: #97a2c7; }
.footer-menu li a:hover { color: #fff; }
.payment-icons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.payment-badge {
	background: rgba(255,255,255,.08);
	color: #d8deee;
	font-size: 11px;
	font-weight: 700;
	padding: 6px 10px;
	border-radius: 5px;
}
.security-seal {
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(255,255,255,.06);
	border-radius: var(--ts-radius-sm);
	padding: 10px 14px;
	margin-top: 10px;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
}
.security-seal .icon { width: 20px; height: 20px; color: #7ea6ff; }
.footer-bottom {
	border-top: 1px solid rgba(255,255,255,.08);
	padding: 18px 0;
	text-align: center;
	font-size: 12.5px;
	color: #7d88ab;
}

/* ---------- Blog / páginas simples ---------- */
.page-title { font-size: 30px; margin: 30px 0 20px; }
.page-content { line-height: 1.8; }
.post-card { margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--ts-border); }
.post-title { font-size: 20px; margin: 14px 0 8px; }
.post-meta { color: var(--ts-text-muted); font-size: 13px; margin-bottom: 16px; }

/* ---------- Minha Conta (login / cadastro) ---------- */
.account-section { padding: 60px 0 90px; }
.account-container { display: flex; justify-content: center; }
.account-box {
	width: 100%;
	max-width: 420px;
	border: 1px solid var(--ts-border);
	border-radius: var(--ts-radius);
	padding: 30px;
	box-shadow: var(--ts-shadow);
	background: #fff;
}
.account-tabs {
	display: flex;
	border-bottom: 2px solid var(--ts-border);
	margin-bottom: 22px;
}
.account-tab {
	flex: 1;
	background: none;
	border: none;
	padding: 12px 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--ts-text-muted);
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
}
.account-tab.is-active { color: var(--ts-primary); border-bottom-color: var(--ts-primary); }

.account-notice {
	font-size: 13px;
	padding: 10px 14px;
	border-radius: var(--ts-radius-sm);
	margin-bottom: 18px;
}
.account-notice-error { background: #fdeaea; color: #b91c1c; }

.account-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--ts-text);
}
.account-field input {
	border: 1.5px solid var(--ts-border);
	border-radius: var(--ts-radius-sm);
	padding: 11px 14px;
	font-weight: 400;
	font-size: 14.5px;
	outline: none;
}
.account-field input:focus { border-color: var(--ts-primary); }
.account-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	margin-bottom: 18px;
	color: var(--ts-text-muted);
}
.account-terms { font-size: 12px; color: var(--ts-text-muted); margin-bottom: 18px; line-height: 1.6; }
.account-forgot {
	display: block;
	text-align: center;
	margin-top: 14px;
	font-size: 13px;
	color: var(--ts-primary);
}
.account-forgot:hover { text-decoration: underline; }

.account-loggedin {
	text-align: center;
	max-width: 400px;
	padding: 40px 30px;
	border: 1px solid var(--ts-border);
	border-radius: var(--ts-radius);
	box-shadow: var(--ts-shadow);
}
.account-avatar { display: inline-block; border-radius: 50%; overflow: hidden; margin-bottom: 16px; }
.account-avatar img { border-radius: 50%; }
.account-loggedin h1 { font-size: 22px; margin-bottom: 6px; }
.account-email { color: var(--ts-text-muted); font-size: 14px; margin-bottom: 4px; }
.account-hint { color: var(--ts-text-muted); font-size: 13px; margin-bottom: 22px; }

@media (max-width: 1100px) {
	.categories-grid { grid-template-columns: repeat(3, 1fr); }
	.products-grid { grid-template-columns: repeat(3, 1fr); }
	.promo-banners-grid { grid-template-columns: 1fr; }
	.footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
	.topbar-right a span { display: none; }
	.header-inner { flex-wrap: wrap; }
	.header-search { order: 3; max-width: 100%; flex-basis: 100%; }
	.hero-slide-inner { grid-template-columns: 1fr; text-align: center; min-height: auto; padding: 40px 0; }
	.hero-content { max-width: 100%; margin: 0 auto; }
	.hero-image { order: -1; max-width: 280px; margin: 0 auto; }
	.benefits-inner { justify-content: center; }
}

@media (max-width: 640px) {
	.topbar-inner { flex-direction: column; height: auto; padding: 8px 0; gap: 6px; }
	.header-actions { gap: 14px; }
	.header-action-item small { display: none; }
	.primary-menu { display: none; }
	.categories-grid { grid-template-columns: repeat(2, 1fr); }
	.products-grid { grid-template-columns: repeat(2, 1fr); }
	.footer-top { grid-template-columns: 1fr; text-align: left; }
	.hero-content h1 { font-size: 32px; }
	.hero-content h2 { font-size: 19px; }
	.newsletter-inner { flex-direction: column; align-items: stretch; text-align: center; }
	.newsletter-text { justify-content: center; }
}
