/**
 * pdh-detail-camera.css — Trang chi tiết CAMERA (gallery + cột info).
 *
 * Figma l8kJpYd2tamH71YgTHZucq (desktop 6627:107951 / mobile 6627:108370).
 * Scope `.iw-cam-detail`. Auto-enqueue qua glob assets/css/global/*.css.
 * Token màu theo template (--iw-accent); spacing dùng --iw-container-*.
 */

.iw-cam-detail {
	font-family: inherit;
	color: #3d3d3d;
}

.iw-cam-detail__container {
	max-width: var(--iw-container-max, 1200px);
	margin: 0 auto;
	padding: 0 var(--iw-container-pad-x, 16px);
	box-sizing: border-box;
}

/* Fullwidth breakout — mọi section span 100vw, container re-center (HỆT net,
   thoát ràng buộc .col-inner của page.php). */
.iw-cam-detail__breadcrumb,
.iw-cam-detail__hero,
.iw-cam-detail__content,
.iw-cam-detail__faq,
.iw-cam-detail__reviews,
.iw-cam-detail__notfound {
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* ── Breadcrumb (padding 0 như net; spacing do [iw_breadcrumb] tự lo). ── */
.iw-cam-detail__breadcrumb { padding: 0; }

/* ── Not found ── */
.iw-cam-detail__notfound { padding: 60px 0; text-align: center; }

/* ── Hero: 2 cột desktop / stack mobile ── */
.iw-cam-detail__hero { padding: 24px 0; }
/* Cả hero (gallery + info) nằm trên 1 card trắng (Figma 6627:107952). */
.iw-cam-detail__hero-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: start;
	background: #fff;
	border: 1px solid #e7e7e7;
	border-radius: 16px;
	padding: 32px 40px;
	box-sizing: border-box;
}

/* ===== Gallery ===== */
.iw-cam-gallery__main {
	position: relative;
	width: 100%;
	border: 1px solid #e7e7e7;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}
.iw-cam-gallery__slide {
	display: flex;
	align-items: center;
	justify-content: center;
}
.iw-cam-gallery__img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}
.iw-cam-gallery__video {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
}
.iw-cam-gallery__video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.iw-cam-gallery__counter {
	position: absolute;
	right: 12px;
	bottom: 12px;
	z-index: 2;
	padding: 2px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 13px;
	line-height: 20px;
}
.iw-cam-gallery__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(61, 61, 61, 0.6);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.iw-cam-gallery__nav::before {
	content: "";
	width: 11px;
	height: 11px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
}
.iw-cam-gallery__nav--prev { left: 12px; }
.iw-cam-gallery__nav--prev::before { transform: rotate(45deg); margin-left: 4px; }
.iw-cam-gallery__nav--next { right: 12px; }
.iw-cam-gallery__nav--next::before { transform: rotate(-135deg); margin-right: 4px; }
.iw-cam-gallery__nav.swiper-button-disabled { opacity: 0; pointer-events: none; }

/* Thumbnails */
.iw-cam-gallery__thumbs {
	margin-top: 12px;
}
.iw-cam-gallery__thumb {
	width: 88px;
	height: 88px;
	border: 2px solid transparent;
	border-radius: 10px;
	overflow: hidden;
	cursor: pointer;
	position: relative;
	box-sizing: border-box;
	background: #f3f3f3;
}
.iw-cam-gallery__thumb.swiper-slide-thumb-active { border-color: var(--iw-accent, #4564ed); }
.iw-cam-gallery__thumb-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.iw-cam-gallery__thumb-play {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
}
.iw-cam-gallery__thumb-play::before {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 0;
	height: 0;
	border-left: 9px solid #fff;
	border-top: 6px solid transparent;
	border-bottom: 6px solid transparent;
	transform: translateX(1px);
}

/* ── Thông số nổi bật (highlight) ── */
.iw-cam-detail__specs {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #ececec;
}
.iw-cam-detail__specs-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}
.iw-cam-detail__specs-title { font-size: 16px; font-weight: 700; line-height: 22px; color: #3d3d3d; }
/* Nút outline xanh (Figma Button-brand). */
.iw-cam-detail__specs-all {
	flex: 0 0 auto;
	padding: 6px 10px;
	border: 1.5px solid var(--iw-accent, #4564ed);
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	color: var(--iw-accent, #4564ed);
	text-decoration: none;
	white-space: nowrap;
	transition: background .15s, color .15s;
}
.iw-cam-detail__specs-all:hover { background: var(--iw-accent, #4564ed); color: #fff; }
.iw-cam-detail__specs-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}
/* Divider dọc giữa các feature (desktop). */
.iw-cam-detail__specs-grid .iw-cam-detail__spec { position: relative; }
.iw-cam-detail__specs-grid .iw-cam-detail__spec + .iw-cam-detail__spec::before {
	content: "";
	position: absolute;
	left: -12px;
	top: 0;
	bottom: 0;
	width: 1px;
	background: #e7e7e7;
}
.iw-cam-detail__spec { display: flex; align-items: center; gap: 10px; }
.iw-cam-detail__spec-icon { width: 36px; height: 36px; object-fit: contain; flex: 0 0 auto; }
.iw-cam-detail__spec-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.iw-cam-detail__spec-name { font-size: 14px; font-weight: 600; color: #3d3d3d; line-height: 20px; }
.iw-cam-detail__spec-value { font-size: 13px; color: #888; line-height: 18px; }

/* ===== Info col ===== */
.iw-cam-detail__name {
	margin: 0;
	font-size: 28px;
	line-height: 36px;
	font-weight: 700;
	color: #252525;
}
.iw-cam-detail__spec-link {
	display: inline-block;
	margin-top: 8px;
	font-size: 14px;
	color: var(--iw-accent, #4564ed);
	text-decoration: none;
}
.iw-cam-detail__spec-link:hover { text-decoration: underline; }
.iw-cam-detail__short-desc {
	margin: 12px 0 0;
	font-size: 15px;
	line-height: 24px;
	color: #5a5a5a;
}

/* Giá */
.iw-cam-detail__price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 10px;
	margin: 20px 0;
	padding-bottom: 20px;
	border-bottom: 1px solid #ececec;
}
.iw-cam-detail__price-label { font-size: 16px; color: #888; }
.iw-cam-detail__price-value {
	font-size: 32px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--iw-price, var(--iw-accent, #4564ed));
}
.iw-cam-detail__price-value--contact { font-size: 26px; }
.iw-cam-detail__price-currency { font-size: inherit; }
.iw-cam-detail__price-note { font-size: 13px; color: #888; width: 100%; }

/* Box "Đặc quyền" / "Ưu đãi" (Figma 6627:108050) — card + header bar + item icon. */
.iw-cam-detail__box {
	margin-top: 20px;
	background: #fff;
	border: 1px solid #e7e7e7;
	border-radius: 12px;
	overflow: hidden;
}
.iw-cam-detail__box-title {
	margin: 0;
	padding: 12px 16px;
	font-size: 20px;
	line-height: 28px;
	font-weight: 700;
	color: #3d3d3d;
	background: #f7f7f8;
	border-bottom: 1px solid #e7e7e7;
}
.iw-cam-detail__box-list {
	list-style: none;
	margin: 0;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
/* Reset margin-left list-item bị Flatsome đè. */
.iw-cam-detail__box-list li.iw-cam-detail__box-item { margin: 0; padding: 0; }
.iw-cam-detail__box-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 16px;
	line-height: 24px;
	color: #3d3d3d;
}
.iw-cam-detail__box-ico { flex: 0 0 auto; width: 24px; height: 24px; object-fit: contain; }
.iw-cam-detail__box-text { flex: 1 1 auto; min-width: 0; }
.iw-cam-detail__box-text strong { font-weight: 700; }
.iw-cam-detail__box-sub { color: #888; }

/* Nút Mua ngay */
.iw-cam-detail__buy {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 20px;
	padding: 16px 24px;
	width: 100%;
	box-sizing: border-box;
	border-radius: 12px;
	background: linear-gradient(90deg, var(--iw-cta-grad-from, var(--iw-accent, #4564ed)), var(--iw-cta-grad-to, var(--iw-accent-strong, #3a52c4)));
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	text-decoration: none;
	transition: filter 0.15s ease;
}
.iw-cam-detail__buy:hover { filter: brightness(1.05); color: #fff; }

/* ── Section "Thông tin sản phẩm" + FAQ — style HỆT net (.iw-pdh-detail__extra*) ── */
.iw-cam-detail__content,
.iw-cam-detail__faq,
.iw-cam-detail__reviews { padding: 30px 0; }
/* Head: căn giữa, title 40px, underline gradient banner (giống net section-head). */
.iw-cam-detail__section-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 0 0 24px;
}
.iw-cam-detail__section-title {
	margin: 0;
	font-size: 40px;
	line-height: 1.4;
	font-weight: 700;
	color: #3D3D3D;
	text-align: center;
}
.iw-cam-detail__section-underline {
	display: block;
	width: 48px;
	height: 3px;
	border-radius: 9999px;
	background: linear-gradient(to right, var(--iw-banner-grad-from, #0593eb), var(--iw-banner-grad-to, #1057cb));
}
/* Card trắng + shadow (giống .iw-pdh-detail__extra-card). */
.iw-cam-detail__content-card {
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 4px 24px rgba(16, 87, 203, 0.06);
}
/* Body: 18px, cỡ chữ con bám section (inherit !important), chỉ giữ màu (giống net). */
.iw-cam-detail__content-body { font-size: 18px; line-height: 1.5; color: #3D3D3D; }
.iw-cam-detail__content-body * { font-size: inherit !important; }
.iw-cam-detail__content-body > :first-child { margin-top: 0; }
.iw-cam-detail__content-body > :last-child { margin-bottom: 0; }
.iw-cam-detail__content-body img { max-width: 100%; height: auto; }

/* List ul/ol — bullet + thụt + giãn dòng (Portal content). */
.iw-cam-detail__content-body ul,
.iw-cam-detail__content-body ol { margin: 12px 0; padding-left: 24px; }
.iw-cam-detail__content-body ul { list-style: disc; }
.iw-cam-detail__content-body ol { list-style: decimal; }
.iw-cam-detail__content-body li { margin: 6px 0; line-height: 1.5; }

/* Bảng thông số — override inline width:1883px của Portal; cột nhãn (td đầu /
   th) nền nhạt + đậm, value cột phải; viền + padding đều, value tự xuống dòng. */
.iw-cam-detail__content-body table {
	width: 100% !important;
	max-width: 100% !important;
	table-layout: fixed;
	border-collapse: collapse;
	margin: 16px 0;
}
/* Dùng `table td/th` (specificity (0,1,2)) để THẮNG Flatsome `td:first-child{padding-left:0}`. */
.iw-cam-detail__content-body table th,
.iw-cam-detail__content-body table td {
	padding: 12px 16px;
	border: 1px solid #e7e7e7;
	text-align: left;
	vertical-align: top;
	word-break: break-word;
}
.iw-cam-detail__content-body table th,
.iw-cam-detail__content-body table td:first-child {
	width: 38%;
	background: #f7f7f8;
	font-weight: 600;
}
.iw-cam-detail__content-body table td:first-child b { font-weight: 600; }

/* Content collapsible — clip + fade + nút "Xem thêm/Thu gọn" (mirror iw-info--collapsible). */
.iw-cam-detail__content-clip {
	position: relative;
	transition: max-height 0.4s ease;
}
/* Chỉ kẹp khi ĐANG collapsed — không JS / chưa collapse thì content luôn hiện full
   (tránh "mất block" nếu collapse JS không chạy: dep Swiper thiếu, lỗi runtime…). */
.iw-cam-detail__content-card.is-collapsed .iw-cam-detail__content-clip {
	overflow: hidden;
}
.iw-cam-detail__content-card.is-collapsed .iw-cam-detail__content-clip::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 120px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.95) 60%, #fff 100%);
	pointer-events: none;
}
.iw-cam-detail__content-toggle {
	display: none; /* JS bật (.is-collapsible) khi nội dung dài hơn clamp. */
	margin: 16px auto 0;
	padding: 13px 24px;
	background: #fff;
	color: #3d3d3d;
	font-family: inherit;
	font-size: 16px;
	line-height: 22px;
	font-weight: 510;
	text-transform: none;
	border: 1px solid #d1d1d1;
	border-radius: 8px;
	box-shadow: none;
	cursor: pointer;
}
.iw-cam-detail__content-toggle:hover,
.iw-cam-detail__content-toggle:focus,
.iw-cam-detail__content-toggle:focus-visible,
.iw-cam-detail__content-toggle:active {
	background: #fff;
	color: #3d3d3d;
	border-color: #d1d1d1;
	box-shadow: none;
}
.iw-cam-detail__content-card.is-collapsible .iw-cam-detail__content-toggle {
	display: flex;
	width: -moz-fit-content;
	width: fit-content;
	max-width: 100%;
	margin: 16px auto 0;
	align-items: center;
	justify-content: center;
}

/* FAQ card — style hệt net (.iw-pdh-detail__faq-card): tắt full-bleed của [iw_qa]. */
.iw-cam-detail__faq-card {
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 4px 24px rgba(16, 87, 203, 0.06);
}
.iw-cam-detail__faq-card .iw-qa {
	width: auto;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
	padding: 0;
	background: transparent;
}
.iw-cam-detail__faq-card .iw-qa__inner { max-width: none; padding: 0; margin: 0; }
.iw-cam-detail__faq-card .iw-qa + .iw-qa { margin-top: 0; }

/* ── Responsive: tablet/mobile stack ── */
@media (max-width: 991px) {
	.iw-cam-detail__hero-grid { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
	.iw-cam-detail__name { font-size: 22px; line-height: 30px; }
	.iw-cam-detail__price-value { font-size: 26px; }
}

@media (max-width: 767px) {
	.iw-cam-detail__hero { padding: 16px 0; }
	.iw-cam-detail__hero-grid { padding: 16px; gap: 20px; }
	.iw-cam-detail__specs-grid { grid-template-columns: 1fr; gap: 12px; }
	.iw-cam-detail__specs-grid .iw-cam-detail__spec + .iw-cam-detail__spec::before { display: none; }
	.iw-cam-gallery__thumb { width: 72px; height: 72px; }
	.iw-cam-detail__buy { font-size: 16px; padding: 14px 20px; }
	.iw-cam-detail__section-head { margin-bottom: 16px; }
	.iw-cam-detail__section-title { font-size: 24px; }
	.iw-cam-detail__content-card { padding: 16px; }
	.iw-cam-detail__content-body { font-size: 16px; }
}
