/**
 * STP Products — giao diện mục Sản phẩm.
 * Mọi class đều có tiền tố .stpsp- để không đụng vào CSS sẵn có của theme.
 */

.stpsp {
	--stpsp-primary: #253e8f;
	--stpsp-primary-dark: #1a2c68;
	--stpsp-cyan: #00bfff;
	--stpsp-accent: #b79660;
	--stpsp-accent-dark: #8d5924;
	--stpsp-ink: #16203f;
	--stpsp-body: #40495f;
	--stpsp-muted: #78829a;
	--stpsp-line: #e3e7ef;
	--stpsp-surface: #f6f8fc;
	--stpsp-radius: 12px;
	--stpsp-shadow-sm: 0 4px 14px rgba(37, 62, 143, .08);
	--stpsp-shadow: 0 16px 40px rgba(37, 62, 143, .14);
	color: var(--stpsp-body);
	font-size: 15px;
	line-height: 1.65;
}

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

.stpsp-container { width: 100%; max-width: 1350px; margin: 0 auto; padding: 0 15px; }

/* ---------- Nút ---------- */
.stpsp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 11px 20px; border: 1px solid transparent; border-radius: 999px;
	font-weight: 600; font-size: 14.5px; line-height: 1.2; cursor: pointer;
	text-decoration: none; transition: all .22s ease; white-space: nowrap;
}
.stpsp-btn-sm { padding: 8px 15px; font-size: 13.5px; }
.stpsp-btn-block { display: flex; width: 100%; margin-bottom: 9px; }
.stpsp-btn-primary { background: var(--stpsp-primary); color: #fff; box-shadow: var(--stpsp-shadow-sm); }
.stpsp-btn-primary:hover, .stpsp-btn-primary:focus { background: var(--stpsp-primary-dark); color: #fff; box-shadow: var(--stpsp-shadow); }
.stpsp-btn-accent { background: var(--stpsp-accent); color: #fff; box-shadow: 0 8px 22px rgba(183, 150, 96, .3); }
.stpsp-btn-accent:hover, .stpsp-btn-accent:focus { background: var(--stpsp-accent-dark); color: #fff; }
.stpsp-btn-ghost { background: #fff; color: var(--stpsp-primary); border-color: var(--stpsp-line); }
.stpsp-btn-ghost:hover { border-color: var(--stpsp-primary); color: var(--stpsp-primary-dark); }
.stpsp-btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.stpsp-btn-outline:hover { background: #fff; color: var(--stpsp-primary); }

/* ---------- Breadcrumb ---------- */
.stpsp-crumb { font-size: 13.5px; padding: 14px 0; background: #fff; border-bottom: 1px solid #e3e7ef; }
.stpsp-crumb .stpsp-container { max-width: 1350px; margin: 0 auto; padding: 0 15px; }
.stpsp-crumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.stpsp-crumb li { display: flex; align-items: center; gap: 6px; color: #78829a; }
.stpsp-crumb li:not(:last-child)::after { content: "/"; color: #cbd2e0; }
.stpsp-crumb a { color: #78829a; text-decoration: none; }
.stpsp-crumb a:hover { color: #253e8f; }
.stpsp-crumb span { color: #16203f; font-weight: 600; }

/* ---------- Lưới sản phẩm ---------- */
.stpsp-grid { display: grid; gap: 22px; }
.stpsp-grid--2 { grid-template-columns: repeat(2, 1fr); }
.stpsp-grid--3 { grid-template-columns: repeat(3, 1fr); }
.stpsp-grid--4 { grid-template-columns: repeat(4, 1fr); }

.stpsp-card {
	background: #fff; border: 1px solid var(--stpsp-line); border-radius: var(--stpsp-radius);
	overflow: hidden; display: flex; flex-direction: column;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.stpsp-card:hover { transform: translateY(-4px); box-shadow: var(--stpsp-shadow); border-color: transparent; }
.stpsp-card-thumb { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--stpsp-surface); }
.stpsp-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; display: block; }
.stpsp-card:hover .stpsp-card-thumb img { transform: scale(1.05); }
.stpsp-card-cat {
	position: absolute; top: 12px; left: 12px; background: rgba(37, 62, 143, .92); color: #fff;
	font-size: 11.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
}
.stpsp-noimg {
	display: grid; place-items: center; width: 100%; height: 100%; min-height: 160px;
	background: var(--stpsp-surface); color: #c3cade; font-weight: 800; font-size: 30px; letter-spacing: .12em;
}
.stpsp-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.stpsp-card-body h3 { font-size: 16px; line-height: 1.35; margin: 0 0 10px; font-weight: 700; }
.stpsp-card-body h3 a { color: var(--stpsp-ink); text-decoration: none; }
.stpsp-card-body h3 a:hover { color: var(--stpsp-primary); }
.stpsp-card-specs { list-style: none; margin: 0 0 14px; padding: 0; font-size: 13px; color: var(--stpsp-muted); }
.stpsp-card-specs li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--stpsp-line); }
.stpsp-card-specs li b { color: var(--stpsp-body); font-weight: 600; text-align: right; }
.stpsp-card-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; }
.stpsp-price { color: var(--stpsp-accent-dark); font-weight: 700; font-size: 15px; }

/* ---------- Bố cục danh sách ---------- */
.stpsp-archive { padding: 26px 0 60px; background: #fff; }
.stpsp-archive-intro { max-width: 900px; color: var(--stpsp-muted); margin: 0 0 24px; }
.stpsp-layout { display: grid; grid-template-columns: 290px 1fr; gap: 34px; align-items: start; }
.stpsp-toolbar { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; margin-bottom: 20px; border-bottom: 1px solid var(--stpsp-line); font-size: 14px; color: var(--stpsp-muted); }
.stpsp-toolbar b { color: var(--stpsp-primary); }
.stpsp-empty { text-align: center; padding: 50px 20px; border: 1px dashed var(--stpsp-line); border-radius: var(--stpsp-radius); }

.stpsp-sidebar { position: sticky; top: 20px; }
.stpsp-widget { background: #fff; border: 1px solid var(--stpsp-line); border-radius: var(--stpsp-radius); padding: 20px; margin-bottom: 22px; }
.stpsp-widget h3 { font-size: 17px; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--stpsp-surface); color: var(--stpsp-ink); font-weight: 700; }
.stpsp-catlist { list-style: none; margin: 0; padding: 0; }
.stpsp-catlist li a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; color: var(--stpsp-body); border-bottom: 1px dashed var(--stpsp-line); font-size: 14.5px; text-decoration: none; }
.stpsp-catlist li a:hover, .stpsp-catlist li.active a { color: var(--stpsp-primary); font-weight: 600; }
.stpsp-catlist li a span { color: var(--stpsp-muted); font-size: 12.5px; }
.stpsp-widget-cta { background: linear-gradient(160deg, var(--stpsp-primary-dark), var(--stpsp-primary)); border: 0; color: #fff; }
.stpsp-widget-cta h3 { color: #fff; border-color: rgba(255, 255, 255, .2); }
.stpsp-widget-cta p { color: rgba(255, 255, 255, .9); font-size: 14.5px; margin: 0 0 14px; }
.stpsp-cta-mail { margin: 10px 0 0; font-size: 13.5px; text-align: center; }
.stpsp-cta-mail a { color: #fff; text-decoration: underline; }
.stpsp-mini { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px dashed var(--stpsp-line); }
.stpsp-mini img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.stpsp-mini a { font-size: 13.5px; color: var(--stpsp-ink); font-weight: 600; line-height: 1.35; text-decoration: none; }
.stpsp-mini a:hover { color: var(--stpsp-primary); }

.stpsp-pagination { margin-top: 34px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.stpsp-pagination .page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--stpsp-line); color: var(--stpsp-body); font-weight: 600; text-decoration: none; }
.stpsp-pagination .page-numbers.current { background: var(--stpsp-primary); color: #fff; border-color: var(--stpsp-primary); }
.stpsp-pagination a.page-numbers:hover { border-color: var(--stpsp-primary); color: var(--stpsp-primary); }

/* ---------- Chi tiết ---------- */
.stpsp-single { padding: 26px 0 60px; background: #fff; }
.stpsp-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.stpsp-gmain { border-radius: 16px; overflow: hidden; border: 1px solid var(--stpsp-line); aspect-ratio: 4 / 3; background: var(--stpsp-surface); }
.stpsp-gmain img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stpsp-gthumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.stpsp-gthumbs img { width: 74px; height: 74px; object-fit: cover; border-radius: 10px; border: 2px solid var(--stpsp-line); cursor: pointer; }
.stpsp-gthumbs img.active { border-color: var(--stpsp-primary); }

.stpsp-eyebrow { display: inline-block; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--stpsp-primary); background: rgba(37, 62, 143, .08); padding: 5px 13px; border-radius: 999px; margin-bottom: 12px; text-decoration: none; }
.stpsp-info h1 { font-size: clamp(1.45rem, 3vw, 2rem); margin: 0 0 8px; color: var(--stpsp-ink); font-weight: 800; line-height: 1.25; }
.stpsp-code { color: var(--stpsp-muted); font-size: 14px; margin-bottom: 14px; }
.stpsp-bigprice { font-size: 1.35rem; color: var(--stpsp-accent-dark); font-weight: 800; margin-bottom: 18px; }
.stpsp-spectable { width: 100%; border-collapse: collapse; margin-bottom: 22px; border: 1px solid var(--stpsp-line); border-radius: var(--stpsp-radius); overflow: hidden; }
.stpsp-spectable th, .stpsp-spectable td { padding: 11px 16px; text-align: left; font-size: 14.5px; border-bottom: 1px solid var(--stpsp-line); }
.stpsp-spectable th { background: var(--stpsp-surface); color: var(--stpsp-ink); font-weight: 600; width: 42%; }
.stpsp-spectable tr:last-child th, .stpsp-spectable tr:last-child td { border-bottom: 0; }

.stpsp-options { border: 1px solid var(--stpsp-line); border-radius: var(--stpsp-radius); padding: 18px 20px; margin-bottom: 20px; background: var(--stpsp-surface); }
.stpsp-optrow { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.stpsp-optrow:last-child { margin-bottom: 0; }
.stpsp-optrow > label { width: 110px; flex-shrink: 0; font-weight: 600; color: var(--stpsp-ink); font-size: 14px; }
.stpsp-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.stpsp-chip { background: #fff; border: 1px solid var(--stpsp-line); border-radius: 999px; padding: 7px 15px; font-size: 13.5px; font-weight: 600; color: var(--stpsp-body); cursor: pointer; transition: all .18s ease; }
.stpsp-chip:hover { border-color: var(--stpsp-primary); color: var(--stpsp-primary); }
.stpsp-chip.active { background: var(--stpsp-primary); border-color: var(--stpsp-primary); color: #fff; }

.stpsp-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.stpsp-note { font-size: 13.5px; color: var(--stpsp-muted); margin: 0; }

.stpsp-tabs { margin-top: 50px; border: 1px solid var(--stpsp-line); border-radius: 16px; overflow: hidden; }
.stpsp-tabnav { display: flex; flex-wrap: wrap; background: var(--stpsp-surface); border-bottom: 1px solid var(--stpsp-line); }
.stpsp-tabnav button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 15px 24px; font-size: 15px; font-weight: 600; color: var(--stpsp-muted); cursor: pointer; }
.stpsp-tabnav button:hover { color: var(--stpsp-primary); }
.stpsp-tabnav button.active { color: var(--stpsp-primary); border-bottom-color: var(--stpsp-primary); background: #fff; }
.stpsp-tabpanel { display: none; padding: 26px 28px; }
.stpsp-tabpanel.active { display: block; }
.stpsp-prose h2, .stpsp-prose h3, .stpsp-prose h4 { color: var(--stpsp-ink); margin: 22px 0 10px; line-height: 1.35; }
.stpsp-prose h2:first-child, .stpsp-prose h3:first-child { margin-top: 0; }
.stpsp-prose p, .stpsp-prose li { font-size: 15px; }
.stpsp-prose ul, .stpsp-prose ol { padding-left: 22px; margin: 0 0 14px; }
.stpsp-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.stpsp-prose table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.stpsp-prose th, .stpsp-prose td { border: 1px solid var(--stpsp-line); padding: 10px 14px; text-align: left; font-size: 14.5px; }
.stpsp-prose thead th { background: var(--stpsp-surface); color: var(--stpsp-ink); }

.stpsp-related { margin-top: 56px; }
.stpsp-head { margin-bottom: 24px; }
.stpsp-head h2 { font-size: clamp(1.3rem, 2.6vw, 1.85rem); color: var(--stpsp-ink); font-weight: 800; margin: 0 0 8px; }
.stpsp-head p { color: var(--stpsp-muted); margin: 0; max-width: 780px; }

/* ---------- Khối sản phẩm mới ở trang chủ ---------- */
.stpsp-latest { padding: 56px 0; background: linear-gradient(180deg, #f6f8fc, #fff); }
.stpsp-latest .stpsp-head { text-align: center; }
.stpsp-latest .stpsp-head p { margin: 0 auto; }
.stpsp-more { text-align: center; margin-top: 34px; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
	.stpsp-grid--4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
	.stpsp-layout { grid-template-columns: 1fr; }
	.stpsp-sidebar { position: static; }
	.stpsp-detail { grid-template-columns: 1fr; gap: 28px; }
	.stpsp-grid--3, .stpsp-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
	.stpsp-grid, .stpsp-grid--2, .stpsp-grid--3, .stpsp-grid--4 { grid-template-columns: 1fr; gap: 16px; }
	.stpsp-tabpanel { padding: 20px 16px; }
	.stpsp-tabnav button { padding: 12px 16px; font-size: 14px; }
	.stpsp-optrow > label { width: 100%; }
}
