/**
 * One Product Data Tab — tabs, collapsible description, reviews layout.
 */

.oe-pdt {
	--oe-pdt-tab-border: #e8e8e8;
	--oe-pdt-bar-bg: #e5e7eb;
	--oe-pdt-bar-fill: #2563eb;
	--oe-pdt-star: #f5c518;
	--oe-pdt-star-empty: #d1d5db;
	--oe-pdt-seller-bg: #eff6ff;
	width: 100%;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 12px;
	overflow: hidden;
	font-family: inherit;
}

.oe-pdt-notice {
	padding: 1rem 1.25rem;
	background: #fff8e6;
	border-radius: 8px;
	color: #856404;
	margin: 0;
}

.oe-pdt-tabs {
	display: flex;
	gap: 0;
	padding: 0 1rem;
	border-bottom: 1px solid var(--oe-pdt-tab-border);
}

.oe-pdt-tab {
	flex: 1;
	position: relative;
	margin: 0;
	padding: 1rem 0.5rem 0.875rem;
	border: none;
	background: transparent;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.3;
	color: #888;
	cursor: pointer;
	text-transform: uppercase;
	border-bottom: 3px solid transparent;
	transition: color 0.2s, border-color 0.2s;
}

.oe-pdt-tab.is-active {
	color: #111;
	border-bottom-color: #111;
	font-weight: 700;
}

.oe-pdt-line {
	height: 0;
	margin: 0;
	border: none;
}

.oe-pdt-panel {
	padding: 1.25rem 1.5rem 1.5rem;
}

.oe-pdt-panel[hidden] {
	display: none !important;
}

/* ----- Tab 1: description ----- */

.oe-pdt-detail-body {
	position: relative;
	overflow: hidden;
	max-height: 300px;
	transition: max-height 0.45s ease;
}

.oe-pdt.is-expanded .oe-pdt-detail-body {
	max-height: 9999px;
}

.oe-pdt-detail-inner {
	font-size: 15px;
	line-height: 1.65;
	color: #333;
}

.oe-pdt-detail-inner > *:first-child {
	margin-top: 0;
}

.oe-pdt-detail-inner > *:last-child {
	margin-bottom: 0;
}

.oe-pdt-detail-inner iframe,
.oe-pdt-detail-inner img {
	max-width: 100%;
	height: auto;
}

.oe-pdt-detail-fade {
	pointer-events: none;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 72px;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 85%);
	opacity: 1;
	transition: opacity 0.25s;
}

.oe-pdt.is-expanded .oe-pdt-detail-fade,
.oe-pdt-panel-detail.no-fade .oe-pdt-detail-fade {
	opacity: 0;
	visibility: hidden;
}

.oe-pdt-detail-toggle-wrap {
	text-align: center;
	padding-top: 0.5rem;
}

.oe-pdt-detail-toggle-wrap.is-hidden {
	display: none;
}

.oe-pdt-detail-toggle {
	background: none;
	border: none;
	padding: 0.5rem 1rem;
	font-size: 15px;
	font-weight: 600;
	color: #111;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.oe-pdt-detail-toggle:hover {
	color: #2563eb;
}

.oe-pdt-empty {
	margin: 0;
	color: #777;
}

/* ----- Tab 2: summary grid ----- */

.oe-pdt-review-summary {
	display: grid;
	grid-template-columns: minmax(140px, 180px) 1fr minmax(200px, 260px);
	gap: 1.5rem 2rem;
	align-items: start;
	padding-bottom: 1.25rem;
	border-bottom: 1px solid var(--oe-pdt-tab-border);
	margin-bottom: 1rem;
}

.oe-pdt-review-col-score {
	text-align: center;
}

.oe-pdt-score-star {
	color: var(--oe-pdt-star);
	line-height: 1;
	margin-bottom: 0.35rem;
}

.oe-pdt-score-star .oe-pdt-star {
	width: 48px;
	height: 48px;
	display: inline-block;
	vertical-align: top;
}

.oe-pdt-score-num {
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1;
	color: #111;
}

.oe-pdt-score-count {
	margin-top: 0.35rem;
	font-size: 14px;
	color: #6b7280;
}

/* Bars */
.oe-pdt-bar-row {
	display: grid;
	grid-template-columns: 100px 1fr 36px;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.oe-pdt-bar-row:last-child {
	margin-bottom: 0;
}

.oe-pdt-mini-stars {
	display: inline-flex;
	gap: 1px;
	align-items: center;
}

.oe-pdt-mini .oe-pdt-star {
	width: 14px;
	height: 14px;
	display: block;
}

.oe-pdt-mini.on {
	color: var(--oe-pdt-star);
}

.oe-pdt-mini.off {
	color: var(--oe-pdt-star-empty);
}

.oe-pdt-bar-track {
	height: 8px;
	background: var(--oe-pdt-bar-bg);
	border-radius: 99px;
	overflow: hidden;
}

.oe-pdt-bar-fill {
	display: block;
	height: 100%;
	background: var(--oe-pdt-bar-fill);
	border-radius: 99px;
	transition: width 0.4s ease;
}

.oe-pdt-bar-num {
	font-size: 13px;
	color: #6b7280;
	text-align: right;
}

/* Right column — rate */
.oe-pdt-rate-title {
	font-size: 15px;
	font-weight: 700;
	color: #111;
	margin-bottom: 0.5rem;
}

.oe-pdt-rate-hint {
	margin: 0 0 0.5rem;
	font-size: 13px;
	color: #6b7280;
}

.oe-pdt-login-msg {
	margin: 0.5rem 0;
	font-size: 13px;
	color: #6b7280;
	line-height: 1.5;
}

.oe-pdt-login-link {
	display: inline-block;
	margin-top: 0.25rem;
	font-size: 14px;
	font-weight: 600;
	color: #2563eb;
	text-decoration: none;
}

.oe-pdt-login-link:hover {
	text-decoration: underline;
}

.oe-pdt-stars-input {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 6px;
	margin-bottom: 0;
}

.oe-pdt-stars-input input[type="radio"] {
	position: absolute;
	left: -9999px;
	opacity: 0;
}

.oe-pdt-stars-input label {
	cursor: pointer;
	margin: 0;
	line-height: 0;
}

.oe-pdt-stars-input label .oe-pdt-star {
	width: 32px;
	height: 32px;
	color: var(--oe-pdt-star-empty);
	transition: color 0.15s, transform 0.15s;
}

.oe-pdt-stars-input label:hover .oe-pdt-star,
.oe-pdt-stars-input label:hover ~ label .oe-pdt-star,
.oe-pdt-stars-input label.hover .oe-pdt-star {
	color: var(--oe-pdt-star);
}

.oe-pdt-stars-input input:checked ~ label .oe-pdt-star {
	color: var(--oe-pdt-star);
}

.oe-pdt-rate-stars--static {
	display: flex;
	gap: 6px;
	margin-bottom: 0.25rem;
}

.oe-pdt-rate-stars--static .oe-pdt-star-outline {
	color: var(--oe-pdt-star-empty);
	line-height: 0;
}

.oe-pdt-rate-stars--static .oe-pdt-star {
	width: 32px;
	height: 32px;
}

/* Form below summary */
.oe-pdt-review-form.oe-review-form {
	margin-top: 1rem;
	padding: 1.25rem 0;
	background: #f9fafb;
	border-radius: 10px;
}

.oe-pdt-review-form .oe-review-form-inner {
	gap: 16px;
}

/* Filter */
.oe-pdt-filter-bar {
	margin-bottom: 1rem;
}

.oe-pdt-filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0.5rem 1rem;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 5px;
	font-size: 14px;
	color: #374151;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
}

.oe-pdt-filter-btn:hover {
	background: #f9fafb;
	border-color: #9ca3af;
}

.oe-pdt-filter-panel {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
	padding: 10px 0 0;
}

.oe-pdt-filter-panel[hidden] {
	display: none !important;
}

.oe-pdt-filter-opt {
	padding: 6px 12px;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	background: #fff;
	font-size: 13px;
	cursor: pointer;
	color: #4b5563;
}

.oe-pdt-filter-opt.is-active,
.oe-pdt-filter-opt:hover {
	border-color: #2563eb;
	color: #2563eb;
	background: #eff6ff;
}

/* Review list */
.oe-pdt-review-empty {
	padding: 2rem;
	text-align: center;
	color: #9ca3af;
	background: #f9fafb;
	border-radius: 8px;
}

.oe-pdt-review-list {
	display: flex;
	flex-direction: column;
}

.oe-pdt-review-item {
	padding: 1rem 0;
	border-bottom: 1px solid #eee;
}

.oe-pdt-review-item:last-child {
	border-bottom: none;
}

.oe-pdt-review-item-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 6px;
}

.oe-pdt-review-author {
	font-weight: 600;
	color: #111;
	font-size: 15px;
}

.oe-pdt-review-date {
	font-size: 13px;
	color: #9ca3af;
	flex-shrink: 0;
}

.oe-pdt-review-stars {
	display: flex;
	gap: 2px;
	margin-bottom: 8px;
	color: var(--oe-pdt-star);
}

.oe-pdt-review-stars .oe-pdt-sv {
	line-height: 0;
}

.oe-pdt-review-stars .oe-pdt-star {
	width: 18px;
	height: 18px;
}

.oe-pdt-review-stars .oe-pdt-sv--empty {
	color: var(--oe-pdt-star-empty);
}

.oe-pdt-review-text {
	font-size: 14px;
	line-height: 1.6;
	color: #374151;
}

.oe-pdt-review-text p {
	margin: 0 0 0.5rem;
}

.oe-pdt-review-text p:last-child {
	margin-bottom: 0;
}

.oe-pdt-review-actions {
	display: flex;
	gap: 16px;
	margin-top: 10px;
}

.oe-pdt-thumb {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 6px;
	border: none;
	background: none;
	font-size: 14px;
	color: #6b7280;
	cursor: pointer;
	border-radius: 6px;
	transition: background 0.15s, color 0.15s;
}

.oe-pdt-thumb:hover {
	background: #f3f4f6;
	color: #111827;
}

.oe-pdt-thumb.is-active {
	color: #1d4ed8;
	background: #eff6ff;
	font-weight: 600;
}

.oe-pdt-thumb:disabled {
	cursor: wait;
	opacity: 0.65;
}

.oe-pdt-seller-reply {
	margin-top: 12px;
	padding: 12px 14px;
	background: var(--oe-pdt-seller-bg);
	border-radius: 8px;
}

.oe-pdt-seller-name {
	font-size: 14px;
	font-weight: 700;
	color: #1e40af;
	margin-bottom: 6px;
}

.oe-pdt-seller-body {
	font-size: 14px;
	line-height: 1.55;
	color: #334155;
}

.oe-pdt-seller-body p {
	margin: 0 0 0.5rem;
}

.oe-pdt-seller-body p:last-child {
	margin-bottom: 0;
}

/* Admin reply to review */
.oe-pdt-admin-reply {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px dashed #e5e7eb;
}

.oe-pdt-admin-reply-toggle {
	display: inline-block;
	padding: 6px 12px;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	cursor: pointer;
}

.oe-pdt-admin-reply-toggle:hover {
	border-color: #111827;
	color: #111827;
}

.oe-pdt-admin-reply-form {
	margin-top: 10px;
}

.oe-pdt-admin-reply-form[hidden] {
	display: none !important;
}

.oe-pdt-admin-reply-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #374151;
}

.oe-pdt-admin-reply-text {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.5;
	font-family: inherit;
	resize: vertical;
	min-height: 80px;
}

.oe-pdt-admin-reply-text:focus {
	outline: none;
	border-color: #111827;
}

.oe-pdt-admin-reply-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.oe-pdt-admin-reply-submit {
	padding: 8px 18px;
	background: #111;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.oe-pdt-admin-reply-submit:hover {
	background: #000;
}

.oe-pdt-admin-reply-submit:disabled {
	opacity: 0.65;
	cursor: wait;
}

.oe-pdt-admin-reply-cancel {
	padding: 8px 14px;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
	cursor: pointer;
	color: #4b5563;
}

.oe-pdt-admin-reply-cancel:hover {
	background: #f9fafb;
}

.oe-pdt-admin-reply-feedback {
	margin: 8px 0 0;
	font-size: 13px;
}

.oe-pdt-admin-reply-feedback.is-success {
	color: #15803d;
}

.oe-pdt-admin-reply-feedback.is-error {
	color: #b91c1c;
}

@media (max-width: 1024px) {
	.oe-pdt-review-summary {
		grid-template-columns: 1fr 1fr;
	}

	.oe-pdt-review-col-form {
		grid-column: 1 / -1;
	}
}

@media (max-width: 640px) {
	.oe-pdt-review-summary {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.oe-pdt-bar-row {
		grid-template-columns: 88px 1fr 28px;
		gap: 6px;
	}

	.oe-pdt-tabs {
		padding: 0 0.75rem;
	}

	.oe-pdt-tab {
		font-size: 0.75rem;
		padding-left: 0.25rem;
		padding-right: 0.25rem;
	}

	.oe-pdt-panel {
		padding: 1rem;
	}
}
