/* Hycon Products — front-end styles */

.hp-wrap, .hp-grid, .hp-cat-grid, .hp-card, .hp-cat-card, .hp-btn, .hp-lightbox {
	box-sizing: border-box;
}
.hp-wrap *, .hp-grid *, .hp-cat-grid *, .hp-card *, .hp-cat-card * {
	box-sizing: border-box;
}

:root {
	--hp-primary: #F45A00;
	--hp-secondary: #128A1E;
	--hp-ink: #1A1A1A;
	--hp-ink-soft: #6B6B6B;
	--hp-line: rgba(26,26,26,0.08);
	--hp-whatsapp: #25D366;
	--hp-cols: 4;
}

.hp-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 24px 80px;
	font-family: 'Poppins', sans-serif;
	color: var(--hp-ink);
}

.hp-eyebrow {
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--hp-primary);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}
.hp-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--hp-primary); }

/* ---------- Grids ---------- */
.hp-grid {
	display: grid;
	grid-template-columns: repeat(var(--hp-cols), 1fr);
	gap: 24px;
}
.hp-cat-grid {
	display: grid;
	grid-template-columns: repeat(var(--hp-cols, 4), 1fr);
	gap: 22px;
}
@media (max-width: 980px) {
	.hp-grid, .hp-cat-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 720px) {
	.hp-grid, .hp-cat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px; }
}
@media (max-width: 460px) {
	.hp-grid, .hp-cat-grid { grid-template-columns: 1fr !important; }
}

/* ---------- Product card ---------- */
.hp-card {
	background: #ffffff;
	border: 1px solid var(--hp-line);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 6px 20px rgba(26,26,26,0.06), 0 2px 6px rgba(26,26,26,0.04);
	transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease, border-color .4s ease;
	display: flex;
	flex-direction: column;
	opacity: 0;
	animation: hpFadeUp .7s cubic-bezier(.2,.7,.2,1) forwards;
}
.hp-card:hover {
	transform: translateY(-10px);
	box-shadow: 0 30px 54px rgba(26,26,26,0.16), 0 0 0 1px rgba(244,90,0,0.12), 0 0 40px rgba(244,90,0,0.08);
	border-color: rgba(244,90,0,0.3);
}
.hp-card-thumb-link { display: block; }
.hp-card-thumb {
	height: 240px;
	background: radial-gradient(circle at 50% 35%, #ffffff 0%, #F3EFE6 100%);
	overflow: hidden;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
}
.hp-card-thumb::after {
	content: "";
	position: absolute;
	left: 12%; right: 12%; bottom: 14%;
	height: 14px;
	background: radial-gradient(ellipse at center, rgba(26,26,26,0.10) 0%, transparent 72%);
	border-radius: 50%;
	pointer-events: none;
}
.hp-card-thumb img {
	position: relative;
	z-index: 1;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.hp-card:hover .hp-card-thumb img { transform: scale(1.06) translateY(-4px); }
.hp-card-body {
	padding: 22px 20px 22px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
	position: relative;
	background: linear-gradient(180deg, #FFF3E3 0%, #FCE7CE 100%);
}
.hp-card-body::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0; height: 3px;
	background: linear-gradient(90deg, var(--hp-primary), var(--hp-secondary));
}
.hp-card-code { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; color: var(--hp-primary); text-transform: uppercase; margin-top: 4px; }
.hp-card-title {
	font-size: 16px; font-weight: 700; color: var(--hp-ink); text-decoration: none;
	line-height: 1.35; margin-bottom: 2px; letter-spacing: -.01em; transition: color .25s ease;
}
.hp-card-title:hover { color: var(--hp-primary); }
.hp-card-price {
	font-size: 12.5px; font-weight: 600; color: var(--hp-ink-soft); margin-bottom: 16px;
	display: inline-flex; align-items: center; gap: 6px;
}
.hp-card-price::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--hp-secondary); }
.hp-card-actions { display: flex; gap: 8px; margin-top: auto; }

/* ---------- Entrance animation (pure CSS — always plays, no JS needed) ---------- */
@keyframes hpFadeUp {
	from { opacity: 0; transform: translateY(28px); }
	to   { opacity: 1; transform: translateY(0); }
}
.hp-grid .hp-card:nth-child(1),  .hp-cat-grid .hp-cat-card:nth-child(1)  { animation-delay: .02s; }
.hp-grid .hp-card:nth-child(2),  .hp-cat-grid .hp-cat-card:nth-child(2)  { animation-delay: .08s; }
.hp-grid .hp-card:nth-child(3),  .hp-cat-grid .hp-cat-card:nth-child(3)  { animation-delay: .14s; }
.hp-grid .hp-card:nth-child(4),  .hp-cat-grid .hp-cat-card:nth-child(4)  { animation-delay: .20s; }
.hp-grid .hp-card:nth-child(5),  .hp-cat-grid .hp-cat-card:nth-child(5)  { animation-delay: .26s; }
.hp-grid .hp-card:nth-child(6),  .hp-cat-grid .hp-cat-card:nth-child(6)  { animation-delay: .32s; }
.hp-grid .hp-card:nth-child(7),  .hp-cat-grid .hp-cat-card:nth-child(7)  { animation-delay: .38s; }
.hp-grid .hp-card:nth-child(8),  .hp-cat-grid .hp-cat-card:nth-child(8)  { animation-delay: .44s; }
.hp-grid .hp-card:nth-child(n+9), .hp-cat-grid .hp-cat-card:nth-child(n+9) { animation-delay: .5s; }

/* Safety net: if animations are disabled/blocked for any reason, cards must still be visible */
@media (prefers-reduced-motion: reduce) {
	.hp-card, .hp-cat-card { animation: none; opacity: 1; transform: none; }
}

/* ---------- Buttons ---------- */
.hp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	font-family: 'Poppins', sans-serif; font-size: 12.5px; font-weight: 700;
	padding: 11px 14px; border-radius: 100px; text-decoration: none !important;
	border: 1.5px solid transparent; transition: transform .25s ease, box-shadow .25s ease, background .25s, color .25s, border-color .25s;
	flex: 1;
	white-space: nowrap;
	position: relative;
}
.hp-btn, .hp-btn:link, .hp-btn:visited { text-decoration: none !important; }
.hp-btn svg { width: 14px; height: 14px; flex: 0 0 auto; }

.hp-btn-whatsapp { background: var(--hp-whatsapp); color: #fff !important; }
.hp-btn-whatsapp:hover, .hp-btn-whatsapp:focus {
	color: #fff !important;
	transform: translateY(-3px) scale(1.02);
	box-shadow: 0 14px 28px rgba(244,90,0,.35), 0 0 0 2px rgba(244,90,0,.25);
}

.hp-btn-call { background: var(--hp-ink); color: #fff !important; }
.hp-btn-call:hover, .hp-btn-call:focus {
	color: #fff !important;
	transform: translateY(-3px) scale(1.02);
	box-shadow: 0 14px 28px rgba(244,90,0,.32), 0 0 0 2px rgba(244,90,0,.22);
}

.hp-btn-outline { border-color: var(--hp-ink); color: var(--hp-ink) !important; background: transparent; }
.hp-btn-outline:hover, .hp-btn-outline:focus {
	background: var(--hp-primary);
	border-color: var(--hp-primary);
	color: #fff !important;
	transform: translateY(-3px);
	box-shadow: 0 14px 28px rgba(244,90,0,.3);
}
.hp-btn-lg { padding: 15px 26px; font-size: 14px; flex: 0 0 auto; }

/* ---------- Category card ---------- */
.hp-cat-card {
	display: block; text-decoration: none; color: var(--hp-ink);
	background: #ffffff;
	border: 1px solid var(--hp-line); border-radius: 22px; overflow: hidden;
	box-shadow: 0 6px 20px rgba(26,26,26,0.06);
	transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s ease, border-color .4s ease;
	opacity: 0;
	animation: hpFadeUp .7s cubic-bezier(.2,.7,.2,1) forwards;
}
.hp-cat-card:hover {
	transform: translateY(-10px);
	box-shadow: 0 30px 54px rgba(26,26,26,0.16), 0 0 0 1px rgba(244,90,0,0.12), 0 0 40px rgba(244,90,0,0.08);
	border-color: rgba(244,90,0,0.3);
}
.hp-cat-thumb {
	height: 180px;
	background: radial-gradient(circle at 50% 35%, #ffffff 0%, #F3EFE6 100%);
	overflow: hidden;
	display: flex; align-items: center; justify-content: center; padding: 10px;
}
.hp-cat-thumb img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: transform .5s ease; }
.hp-cat-card:hover .hp-cat-thumb img { transform: scale(1.08); }
.hp-cat-info {
	background: linear-gradient(180deg, #FFF3E3 0%, #FCE7CE 100%);
	position: relative;
}
.hp-cat-info::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0; height: 3px;
	background: linear-gradient(90deg, var(--hp-primary), var(--hp-secondary));
}
.hp-cat-name { font-size: 16px; font-weight: 700; padding: 18px 18px 2px; letter-spacing: -.01em; }
.hp-cat-count { font-size: 12px; color: var(--hp-ink-soft); padding: 0 18px 18px; }

/* ---------- Empty state ---------- */
.hp-empty {
	text-align: center; padding: 50px 20px; color: var(--hp-ink-soft);
	background: #F7F5F1; border-radius: 20px; font-size: 14px;
}

/* ---------- Tag row (category filter chips) ---------- */
.hp-tag-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.hp-tag {
	font-size: 13px; font-weight: 600; padding: 10px 18px; border-radius: 100px;
	border: 1.5px solid var(--hp-line); color: var(--hp-ink); text-decoration: none; transition: .2s;
}
.hp-tag:hover { border-color: var(--hp-primary); background: rgba(244,90,0,.06); color: var(--hp-primary); }

/* ---------- Archive header ---------- */
.hp-archive-header { text-align: center; padding-bottom: 40px; }
.hp-archive-header h1 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; margin-bottom: 10px; }
.hp-archive-header p { color: var(--hp-ink-soft); max-width: 520px; margin: 0 auto; font-size: 14.5px; line-height: 1.7; }

/* ---------- Pagination ---------- */
.hp-pagination { display: flex; justify-content: center; gap: 10px; margin-top: 50px; flex-wrap: wrap; }
.hp-pagination a, .hp-pagination span {
	padding: 10px 18px; border-radius: 100px; border: 1.5px solid var(--hp-line);
	font-size: 13px; font-weight: 600; text-decoration: none; color: var(--hp-ink);
}
.hp-pagination .current { background: var(--hp-ink); color: #fff; border-color: var(--hp-ink); }

/* ---------- Single product ---------- */
.hp-single-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: flex-start; margin-bottom: 70px; }
.hp-single-image {
	border-radius: 26px; overflow: hidden;
	background: radial-gradient(circle at 50% 35%, #ffffff 0%, #F3EFE6 100%);
	aspect-ratio: 1/1; box-shadow: 0 16px 40px rgba(26,26,26,.10);
	display: flex; align-items: center; justify-content: center; padding: 16px;
}
.hp-single-image img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.hp-single-image a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; cursor: zoom-in; }
.hp-single-code { font-size: 13px; font-weight: 700; color: var(--hp-primary); margin-bottom: 8px; }
.hp-single-title { font-size: clamp(26px, 3vw, 38px); font-weight: 800; margin-bottom: 14px; line-height: 1.15; }
.hp-single-price { font-size: 17px; font-weight: 600; color: var(--hp-ink-soft); margin-bottom: 22px; }
.hp-single-desc { font-size: 15px; line-height: 1.8; color: var(--hp-ink-soft); margin-bottom: 30px; }
.hp-single-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Related products ---------- */
.hp-related-title { font-size: 24px; font-weight: 800; margin-bottom: 26px; }

/* ---------- Lightbox ---------- */
.hp-lightbox {
	position: fixed; inset: 0; background: rgba(26,26,26,.92); z-index: 99999;
	display: none; align-items: center; justify-content: center; padding: 40px;
}
.hp-lightbox.open { display: flex; }
.hp-lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 12px; }
.hp-lightbox-close {
	position: absolute; top: 24px; right: 32px; background: rgba(255,255,255,.14); color: #fff;
	width: 44px; height: 44px; border: none; border-radius: 50%; font-size: 26px; line-height: 1;
	display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.hp-lightbox-close:hover { background: rgba(255,255,255,.28); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.hp-single-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- Mobile only: stack card buttons (WhatsApp on top, Call below) ----------
 * Card par overflow:hidden hai aur .hp-btn par white-space:nowrap + flex:1 (bina min-width:0).
 * Narrow card par dusra button shrink nahi hota, bahar nikal ke clip ho jata hai.
 * Neeche wala block sirf <=720px par chalta hai — desktop/tablet bilkul untouched.
 */
@media (max-width: 720px) {
	.hp-card-actions {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}
	.hp-card-actions .hp-btn {
		flex: 0 0 auto;
		width: 100%;
		min-width: 0;
		white-space: normal;
		padding: 12px 12px;
	}
}
