/* Product Detail Page CSS */

.page-product .product-buy-col,
.page-product .review-summary,
.page-product .product-specs,
.page-product .product-features,
.page-product .product-gallery-main,
.page-product .product-specs-table,
.page-product .reply {
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(186, 230, 253, 0.9);
	box-shadow: var(--shadow-sm);
}

.page-product .product-gallery-thumbs img {
	background: #fff;
	border-color: rgba(186, 230, 253, 0.85);
}

.page-product .product-price-lg {
	background: none;
	color: var(--site-primary-hover);
	padding: 0;
	border-radius: 0;
}

.page-product .tab-btn.active {
	background: var(--site-dark);
	border-color: var(--site-dark);
	color: #fff;
}

.page-product .size-option,
.page-product .qty-control,
.page-product .size-chart-btn,
.page-product .specs-close,
.page-product .size-chart-close {
	border-color: rgba(205, 218, 233, 0.95);
}

.page-product .product-specs-table thead th {
	background: rgba(224, 242, 254, 0.74);
}

.page-product .review-rating {
	color: var(--site-primary-hover);
}

.page-product .size-option:hover,
.page-product .size-option.active {
	border-color: var(--site-primary);
	color: var(--site-primary-hover);
	background: var(--site-accent);
}

.product-detail-section {
	padding: 0px 0;
}

.product-detail-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 28px;
	align-items: start;
}

@media (min-width: 900px) {
	.product-detail-grid {
		grid-template-columns: minmax(420px, 1.18fr) minmax(320px, 0.82fr);
		grid-template-areas: "gallery buy";
		gap: 26px 22px;
	}
	.product-gallery {
		grid-area: gallery;
	}
	.product-buy-col {
		grid-area: buy;
		position: static;
		top: auto;
		align-self: start;
	}
	.product-gallery {
		display: grid;
		grid-template-rows: minmax(520px, 520px) auto;
	}
	.product-gallery-main {
		height: 100%;
		max-height: none;
		min-height: 0;
	}
	.product-info-col {
		min-height: 0;
	}
}

/* Image */
.product-gallery {
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
}
.product-info-col {
	min-width: 0;
	background: rgba(248, 252, 255, 0.92);
	border: 1px solid var(--border-color);
	border-radius: 14px;
	padding: 16px;
}
.product-info-col-inline {
	background: transparent;
	border: none;
	border-radius: 0;
	padding: 0;
}
.product-buy-col {
	background: var(--surface-color);
	border: 1px solid var(--border-color);
	border-radius: 14px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	z-index: 100;
}
.product-gallery-main {
	width: 100%;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	/* min-height: 560px; */
	/* max-height: 580px; */
	background: var(--surface-color);
	border: 1px solid var(--border-color);
	box-sizing: border-box;
	padding: 12px;
}
.product-gallery-main .swiper-wrapper,
.product-gallery-main .swiper-slide {
	height: 100%;
}
.product-gallery-main img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.product-gallery-thumbs {
	margin-top: 14px;
	padding: 0 4px 2px;
	position: relative;
	cursor: grab;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow: hidden;
}
.product-gallery-thumbs:active {
	cursor: grabbing;
}
.product-gallery-thumbs::before,
.product-gallery-thumbs::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 2px;
	width: 26px;
	pointer-events: none;
	z-index: 3;
	display: none;
}
.product-gallery-thumbs::before {
	left: 0;
	background: linear-gradient(to right, rgba(245, 249, 255, 0.98) 0%, rgba(245, 249, 255, 0) 100%);
}
.product-gallery-thumbs::after {
	right: 0;
	background: linear-gradient(to left, rgba(245, 249, 255, 0.98) 0%, rgba(245, 249, 255, 0) 100%);
}
.product-gallery-thumbs .swiper-wrapper {
	align-items: center;
	max-width: 100%;
}
.product-gallery-thumbs .swiper-slide {
	width: 86px !important;
	flex-shrink: 0;
	opacity: 0.48;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid rgba(196, 216, 239, 0.8);
	cursor: pointer;
	transform: scale(0.94);
	transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.product-gallery-thumbs .swiper-slide-thumb-active {
	opacity: 1;
	border-color: var(--primary-color);
	transform: scale(1);
	box-shadow: 0 8px 16px rgba(20, 63, 112, 0.12);
}
.product-gallery-thumbs img {
	width: 100%;
	height: 56px;
	object-fit: contain;
	background: var(--surface-color);
}
.product-gallery-next,
.product-gallery-prev {
	color: var(--white);
	background: rgba(31, 95, 169, 0.42);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex !important;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 16px rgba(20, 63, 112, 0.18);
}
.product-gallery-next::after,
.product-gallery-prev::after {
	display: none;
}
.product-gallery-next:hover,
.product-gallery-prev:hover {
	background: var(--primary-color);
}

/* Info */
.product-title {
	font-size: clamp(1.6rem, 2.3vw, 2.2rem);
	margin-bottom: 10px;
	line-height: 1.22;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	line-clamp: 4;
	overflow: hidden;
	text-overflow: ellipsis;
	max-height: calc(1.22em * 4);
	word-break: break-word;
}
.product-meta {
	margin-bottom: 10px;
	color: var(--text-light);
	font-size: 0.92rem;
}
.product-rating-line {
	margin-bottom: 14px;
	font-size: 0.92rem;
	color: var(--text-light);
}
.product-info-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}
.product-excerpt {
    margin-bottom: 30px;
    line-height: 1.8;
	max-width: 560px;
}
.product-features {
    margin: -10px 0 20px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--accent-color);
    padding: 10px 12px;
}
.product-features summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--heading-color);
    list-style: none;
    position: relative;
    padding-right: 18px;
}
.product-features summary::-webkit-details-marker {
    display: none;
}
.product-features summary::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
}
.product-features[open] summary::after {
    transform: rotate(180deg);
}
.product-features ul {
    margin-top: 10px;
    padding-left: 18px;
    color: var(--text-light);
}
.product-features li {
    margin-bottom: 6px;
}
.size-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.size-chart-btn {
	border: 1px solid var(--border-color);
	background: var(--surface-color);
	padding: 4px 10px;
	font-size: 0.85rem;
	cursor: pointer;
}
.size-chart-btn,
.size-chart-modal {
	display: none;
}
.size-selector {
    margin-bottom: 18px;
}
.size-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}
.size-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.size-option {
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    padding: 6px 12px;
    min-width: 48px;
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    border-radius: 6px;
}
.size-option.active {
    border-color: var(--primary-color);
    background: var(--accent-color);
    color: var(--primary-color);
}
.size-chart-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
}
.size-chart-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(78, 43, 12, 0.4);
}
.size-chart-card {
    position: relative;
    width: min(880px, 92%);
    margin: 6vh auto 0;
    background: var(--surface-color);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    max-height: 82vh;
    display: flex;
    flex-direction: column;
}

.specs-modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6vh 0;
}
.specs-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(78, 43, 12, 0.4);
    z-index: 0;
}
.specs-card {
    position: relative;
    width: min(820px, 92%);
    margin: 0 auto;
    background: var(--surface-color);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
}
.specs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}
.specs-header h3 {
    margin: 0;
    font-size: 1.1rem;
}
.specs-close {
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}
.specs-body {
    padding: 0;
    overflow: auto;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.specs-product-name {
    padding: 18px 20px 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading-color);
    line-height: 1.45;
}
.specs-section {
    padding: 16px 20px;
}
.specs-section + .specs-section {
    border-top: 1px solid var(--border-color);
}
.specs-section h4 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--heading-color);
}
.specs-features {
    margin: 0;
    padding-left: 18px;
    color: var(--text-light);
}
.specs-features li {
    margin-bottom: 6px;
}
.specs-empty {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}
.product-specs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-color);
    border-radius: 10px;
    overflow: hidden;
}
.product-specs-table thead th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    background: #edf4fc;
}
.product-specs-table thead th,
.product-specs-table tbody td,
.product-specs-table tbody th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}
.product-specs-table tbody th {
    font-weight: 600;
    color: var(--heading-color);
}
.size-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}
.size-chart-header h3 {
    margin: 0;
    font-size: 1.1rem;
}
.size-chart-close {
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}
.size-chart-body {
    padding: 16px 20px 20px;
    overflow: auto;
}
.size-chart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.size-chart-table th,
.size-chart-table td {
    border-bottom: 1px solid var(--border-color);
    padding: 8px 10px;
    text-align: left;
    white-space: nowrap;
}
.product-specs {
    margin-bottom: 20px;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	background: var(--accent-color);
	padding: 10px 12px;
}
.product-specs summary {
	cursor: pointer;
	font-weight: 600;
	color: var(--heading-color);
	list-style: none;
	position: relative;
	padding-right: 18px;
}
.product-specs summary::-webkit-details-marker {
	display: none;
}
.product-specs summary::after {
	content: "";
	position: absolute;
	right: 0;
	top: 0;
}
.product-specs[open] summary::after {
	transform: rotate(180deg);
}
.product-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.product-specs-table {
	margin-top: 10px;
	background: var(--surface-color);
	border-radius: 10px;
	overflow: hidden;
}
.product-specs-table th,
.product-specs-table td {
    border-bottom: 1px solid var(--border-color);
    padding: 8px 10px;
    text-align: left;
}
.product-specs-table th {
    width: 40%;
    color: var(--text-light);
    font-weight: 600;
}
.product-price-lg {
	font-size: 1.5rem;
	color: var(--primary-color);
	font-weight: 700;
	margin-bottom: 20px;
}

#product-old-price {
	font-size: 1rem;
	color: #b89573;
	font-weight: 400;
	margin-left: 10px;
}

.buy-now-btn {
	background: var(--site-secondary);
	color: var(--white);
	border: 1px solid var(--site-secondary);
}
.buy-now-btn:hover {
	background: var(--site-primary);
	color: var(--white);
	border-color: var(--site-primary);
}
.add-actions {
	display: flex;
	gap: 15px;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-start;
	row-gap: 10px;
}

@media (max-width: 900px) {
	.product-detail-grid {
		gap: 18px;
	}
	.product-buy-col {
		padding: 14px;
	}
	.product-info-col,
	.product-description-card {
		padding: 14px;
	}
	.product-gallery-main {
		max-height: 380px;
	}
	.product-info-actions .btn {
		width: 100%;
	}
	.product-description-head {
		flex-direction: column;
		align-items: flex-start;
	}
	.product-description-head .btn {
		width: 100%;
	}
}
.add-actions .btn {
	height: 40px;
	padding: 0 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	white-space: nowrap;
	flex: 0 0 auto;
}
.add-actions .btn-outline {
	padding: 0 12px;
}
.product-description-col {
	min-width: 0;
}
.product-description-card {
	background: rgba(248, 252, 255, 0.92);
	border: 1px solid var(--border-color);
	border-radius: 16px;
	padding: 18px 20px;
}
.product-description-head {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	margin-bottom: 12px;
}
.product-description-head h3 {
	margin: 0;
	font-size: 1.1rem;
}
.product-description-preview {
	margin: 0;
	color: var(--text-light);
	line-height: 1.72;
}

.description-modal {
	position: fixed;
	inset: 0;
	z-index: 5200;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vh 0;
}
.description-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(11, 27, 49, 0.42);
}
.description-card {
	position: relative;
	width: min(760px, 92%);
	background: #fbfdff;
	border: 1px solid var(--border-color);
	border-radius: 14px;
	box-shadow: var(--shadow);
	max-height: 78vh;
	display: flex;
	flex-direction: column;
	z-index: 1;
}
.description-header {
	padding: 16px 20px;
	border-bottom: 1px solid var(--border-color);
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.description-header h3 {
	margin: 0;
	font-size: 1.08rem;
}
.description-close {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	border: 1px solid var(--border-color);
	background: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.description-body {
	padding: 16px 20px 20px;
	overflow: auto;
}
.description-body p {
	margin: 0;
	color: var(--text-color);
	line-height: 1.82;
	white-space: pre-wrap;
}
.qty-input {
	width: 70px;
	padding: 8px 6px;
	border: none;
	text-align: center;
	background: transparent;
	font-weight: 600;
	height: 40px;
}
.qty-input:hover {
	background: transparent;
}
.qty-control {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--border-color);
	border-radius: 0;
	overflow: hidden;
	height: 40px;
}
.qty-control .qty-input {
	border-radius: 0;
}
.qty-control .qty-input:hover {
	background-color: transparent;
}
.qty-control .qty-input:focus {
	border: 1px solid var(--border-color);
	box-shadow: none;
}
.qty-btn {
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--surface-color);
	font-size: 18px;
	color: var(--text-color);
	flex: 0 0 40px;
	border-radius: 0;
}
.qty-btn:hover {
	background: var(--accent-color);
}

/* Reviews */
.product-reviews-section {
	margin-top: 50px;
}
.related-section {
	margin-top: 50px;
}
.related-section .product-desc {
	display: none;
}
.review-list {
    margin-top: 20px;
}
.review-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-color);
    color: var(--primary-color);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.review-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.review-summary {
	margin-top: 20px;
	padding: 16px;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	background: var(--accent-color);
	display: flex;
	gap: 24px;
	align-items: center;
	flex-wrap: wrap;
}
.review-average {
	min-width: 140px;
	text-align: center;
}
.review-average-label {
	font-size: 0.9rem;
	color: var(--text-light);
}
.review-average-value {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1.2;
}
.review-average-stars {
	margin-top: 4px;
}
.review-average-count {
	margin-top: 4px;
	color: var(--text-light);
	font-size: 0.85rem;
}
.review-breakdown {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 220px;
}
.review-bar {
	display: grid;
	grid-template-columns: 18px 1fr 36px;
	align-items: center;
	gap: 10px;
}
.review-bar-label {
	font-size: 0.85rem;
	color: var(--text-light);
}
.review-bar-track {
	display: block;
	width: 100%;
	height: 8px;
	border: 0;
	background: var(--border-color);
	border-radius: 999px;
	overflow: hidden;
	appearance: none;
}
.review-bar-track::-webkit-progress-bar {
	background: var(--border-color);
	border-radius: inherit;
}
.review-bar-track::-webkit-progress-value {
	background: var(--primary-color);
	border-radius: inherit;
}
.review-bar-track::-moz-progress-bar {
	background: var(--primary-color);
	border-radius: inherit;
}
.review-bar-count {
	font-size: 0.85rem;
	color: var(--text-light);
	text-align: right;
}
.review-empty {
	margin-top: 20px;
	color: var(--text-light);
	display: none;
	text-align: center;
	padding: 30px 0;
	border: 1px dashed var(--border-color);
	border-radius: 10px;
}
.review-actions {
	margin-top: 20px;
	display: flex;
	justify-content: center;
}

/* Review List */
.review-item {
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 20px;
	margin-bottom: 20px;
}
.review-header {
	display: flex;
	justify-content: space-between;
	margin-bottom: 10px;
}
.review-rating {
	color: #ff980f;
}
.reply {
	background: var(--accent-color);
	padding: 15px;
	margin-top: 15px;
	border-radius: 4px;
}

