/* =========================================================
   PRODUCT PAGE CSS
   Sections: Back Link, Product Main, Reviews, Recommendations
   ========================================================= */

#product-page {
	padding: 24px 0 60px;
	background: var(--bg);
}

/* ========== BACK LINK ========== */
.product-back {
	margin-bottom: 24px;
}

.back-link {
	font-size: 0.85rem;
	color: var(--text-light);
	font-family: "Inter", sans-serif;
	text-decoration: none;
	transition: color var(--transition);
}

.back-link:hover {
	color: var(--text);
}

/* ========== PRODUCT MAIN GRID ========== */
.product-grid-main {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: center;
	margin-bottom: 60px;
}

/* ========== PRODUCT IMAGE ========== */
.product-image-card {
	background: transparent;
	border: none;
	padding: 0;
}

.product-image {
	background: var(--surface);
	border-radius: var(--radius-md);
	overflow: hidden;
	aspect-ratio: 1 / 1;
}

.product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ========== PRODUCT INFO ========== */
.product-info-card {
	background: transparent;
	border: none;
	padding: 0;
}

.product-title {
	font-size: 1.8rem;
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	color: var(--text);
	margin: 0 0 12px;
	line-height: 1.2;
}

.product-price {
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--text);
	margin: 0 0 20px;
	font-family: "Inter", sans-serif;
}

.product-price-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.product-price-original {
	font-size: 1rem;
	color: var(--text-light);
	text-decoration: line-through;
	font-family: "Inter", sans-serif;
}

.product-price-sale {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--danger);
	font-family: "Inter", sans-serif;
}

.product-sale-badge {
	background: var(--danger);
	color: white;
	padding: 3px 10px;
	border-radius: var(--radius-full);
	font-size: 0.7rem;
	font-weight: 700;
	font-family: "Inter", sans-serif;
}

/* ========== STOCK STATUS ========== */
.product-stock {
	font-size: 0.8rem;
	font-weight: 600;
	font-family: "Inter", sans-serif;
	margin: 0 0 16px;
}

.product-stock.in-stock {
	color: var(--success);
}

.product-stock.low-stock {
	color: var(--warning);
}

.product-stock.out-stock {
	color: var(--danger);
}

/* ========== QUANTITY SELECTOR ========== */
.product-form {
	margin-bottom: 28px;
}

.qty-section {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.qty-label {
	font-weight: 600;
	color: var(--text);
	font-size: 0.8rem;
	font-family: "Inter", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.qty-control {
	display: inline-flex;
	align-items: center;
	gap: 0;
	border: 1.5px solid var(--border);
	border-radius: var(--radius-full);
	background: var(--bg);
	overflow: hidden;
}

.qty-btn {
	width: 38px;
	height: 38px;
	border: none;
	background: transparent;
	color: var(--text);
	font-size: 1rem;
	cursor: pointer;
	transition: background var(--transition);
	display: flex;
	align-items: center;
	justify-content: center;
}

.qty-btn:hover {
	background: var(--surface);
}

.qty-input {
	width: 50px;
	height: 38px;
	border: none;
	border-left: 1.5px solid var(--border);
	border-right: 1.5px solid var(--border);
	outline: none;
	text-align: center;
	font-weight: 600;
	font-size: 0.9rem;
	background: transparent;
	color: var(--text);
	font-family: "Inter", sans-serif;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ========== ACTION BUTTONS ========== */
.product-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.add-to-cart-btn,
.buy-now-btn {
	flex: 1;
	min-width: 160px;
	padding: 14px 24px;
	border-radius: var(--radius-full);
	font-size: 0.85rem;
	font-weight: 600;
	font-family: "Inter", sans-serif;
	cursor: pointer;
	transition: all var(--transition);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border: 1.5px solid var(--border);
}

.add-to-cart-btn {
	background: transparent;
	color: var(--text);
}

.add-to-cart-btn:hover {
	background: var(--text);
	color: #ffffff;
	border-color: var(--text);
}

.buy-now-btn {
	background: var(--text);
	color: #ffffff;
	border-color: var(--text);
}

.buy-now-btn:hover {
	background: var(--primary-hover);
	border-color: var(--primary-hover);
}

.out-of-stock-btn {
	width: 100%;
	padding: 14px 24px;
	border-radius: var(--radius-full);
	background: transparent;
	color: var(--text-light);
	font-weight: 600;
	font-size: 0.85rem;
	font-family: "Inter", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border: 1.5px solid var(--border);
	cursor: not-allowed;
	opacity: 0.5;
}

/* ========== DESCRIPTION ========== */
.product-description-section {
	margin-top: 8px;
}

.product-description-section h3 {
	font-size: 0.8rem;
	font-family: "Inter", sans-serif;
	font-weight: 600;
	color: var(--text);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin: 0 0 8px;
}

.product-description-section p {
	font-size: 0.9rem;
	color: var(--text-light);
	line-height: 1.7;
	font-family: "Inter", sans-serif;
	margin: 0;
}

/* ========== REVIEWS SECTION ========== */
.product-review-section {
	margin-bottom: 56px;
}

.product-review-section h2 {
	font-size: 1.1rem;
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	color: var(--text);
	margin: 0 0 16px;
}

.review-summary {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--border);
}

.review-star {
	color: var(--accent);
	font-size: 1.2rem;
}

.review-summary strong {
	font-size: 1.1rem;
	color: var(--text);
	font-family: "Montserrat", sans-serif;
}

.review-count {
	font-size: 0.85rem;
	color: var(--text-light);
	font-family: "Inter", sans-serif;
}

.review-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.no-reviews {
	color: var(--text-light);
	font-size: 0.9rem;
	font-family: "Inter", sans-serif;
}

.review-card {
	padding-bottom: 16px;
	border-bottom: 1px solid var(--border);
}

.review-card:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.review-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 4px;
}

.review-header strong {
	font-size: 0.9rem;
	color: var(--text);
	font-family: "Inter", sans-serif;
}

.stars {
	color: var(--accent);
	font-size: 0.8rem;
}

.review-card p {
	font-size: 0.85rem;
	color: var(--text);
	line-height: 1.6;
	margin: 4px 0;
	font-family: "Inter", sans-serif;
}

.review-card small {
	font-size: 0.7rem;
	color: var(--text-light);
	font-family: "Inter", sans-serif;
}

/* ========== REVIEWS WITH IMAGES & PAGINATION ========== */
.review-header-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
	margin-bottom: 20px;
}

.review-summary-badge {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--surface);
	padding: 8px 16px;
	border-radius: var(--radius-full);
}

.review-star-large {
	color: #fbbf24;
	font-size: 1.2rem;
}

.review-average {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--text);
}

.review-total {
	font-size: 0.8rem;
	color: var(--text-light);
}

.reviewer-info {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.review-stars {
	color: #fbbf24;
	font-size: 0.85rem;
}

.review-date {
	font-size: 0.7rem;
	color: var(--text-light);
}

.review-text {
	margin: 10px 0;
	line-height: 1.6;
}

/* Review Images */
.review-images {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin: 10px 0;
}

.review-image-link {
	display: block;
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--border);
	transition: transform 0.2s;
}

.review-image-link:hover {
	transform: scale(1.05);
}

.review-image-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Helpful Button */
.review-helpful {
	margin-top: 10px;
}

.helpful-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: 1px solid var(--border);
	padding: 5px 12px;
	border-radius: var(--radius-full);
	font-size: 0.7rem;
	cursor: pointer;
	transition: all var(--transition);
}

.helpful-btn:hover {
	background: var(--surface);
	border-color: var(--accent);
}

/* Pagination */
.review-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
}

.page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	font-size: 0.85rem;
	font-weight: 500;
	text-decoration: none;
	color: var(--text);
	transition: all var(--transition);
}

.page-btn:hover {
	background: var(--surface);
	border-color: var(--accent);
}

.page-btn.active {
	background: var(--accent);
	border-color: var(--accent);
	color: white;
}

.page-btn.prev,
.page-btn.next {
	background: var(--surface);
}

/* No Reviews */
.no-reviews {
	text-align: center;
	padding: 40px;
	background: var(--surface);
	border-radius: var(--radius-md);
	color: var(--text-light);
}

/* Helpful Button Active State */
.helpful-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: 1px solid var(--border);
	padding: 5px 12px;
	border-radius: var(--radius-full);
	font-size: 0.7rem;
	cursor: pointer;
	transition: all var(--transition);
}

.helpful-btn:hover {
	background: var(--surface);
	border-color: var(--accent);
}

.helpful-btn.active {
	background: var(--accent);
	border-color: var(--accent);
	color: white;
}

.helpful-btn.active svg {
	stroke: white;
}

.helpful-btn svg {
	transition: all var(--transition);
}
/* Responsive */
@media (max-width: 768px) {
	.review-header-bar {
		flex-direction: column;
		align-items: flex-start;
	}

	.review-images {
		gap: 8px;
	}

	.review-image-link {
		width: 60px;
		height: 60px;
	}

	.review-pagination {
		flex-wrap: wrap;
	}

	.page-btn {
		min-width: 32px;
		height: 32px;
		font-size: 0.75rem;
	}
}

/* ========== RECOMMENDATIONS SECTION (Unified Cards) ========== */
.recommend-section h2 {
	font-size: 1.1rem;
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	color: var(--text);
	margin: 0 0 20px;
}

.recommend-section .product-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.recommend-section .product-card {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	overflow: hidden;
	transition: all var(--transition);
	display: flex;
	flex-direction: column;
}

.recommend-section .product-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-md);
	border-color: var(--accent);
}

.recommend-section .product-card-link {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.recommend-section .product-image-wrapper {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--surface);
}

.recommend-section .product-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.recommend-section .product-card:hover .product-image {
	transform: scale(1.05);
}

.recommend-section .stock-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 10px;
	border-radius: var(--radius-full);
	font-size: 0.65rem;
	font-weight: 700;
	font-family: "Inter", sans-serif;
	z-index: 2;
	text-transform: uppercase;
}

.recommend-section .stock-badge.out-of-stock {
	background: rgba(239, 68, 68, 0.9);
	color: white;
}

.recommend-section .stock-badge.low-stock {
	background: rgba(245, 158, 11, 0.9);
	color: white;
}

.recommend-section .sale-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: var(--danger);
	color: white;
	font-size: 0.7rem;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: var(--radius-full);
	z-index: 2;
}

.recommend-section .product-info {
	padding: 12px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.recommend-section .product-category {
	font-size: 0.7rem;
	font-weight: 500;
	text-transform: uppercase;
	color: var(--text-light);
	letter-spacing: 0.03em;
}

.recommend-section .product-name {
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.4;
	color: var(--text);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.recommend-section .product-price {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.recommend-section .original-price {
	font-size: 0.75rem;
	color: var(--text-light);
	text-decoration: line-through;
}

.recommend-section .sale-price {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--danger);
}

.recommend-section .regular-price {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--text);
}

.recommend-section .product-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 6px;
	flex-wrap: wrap;
	gap: 8px;
}

.recommend-section .rating-stars {
	display: flex;
	align-items: center;
	gap: 2px;
}

.recommend-section .rating-stars .star {
	color: #d1d5db;
	font-size: 11px;
}

.recommend-section .rating-stars .star.filled {
	color: #fbbf24;
}

.recommend-section .rating-stars .rating-count {
	font-size: 10px;
	color: var(--text-light);
	margin-left: 4px;
}

.recommend-section .stock-status {
	display: flex;
	gap: 6px;
}

.recommend-section .stock-in,
.recommend-section .stock-low,
.recommend-section .stock-out {
	font-size: 10px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 20px;
}

.recommend-section .stock-in {
	background: #d1fae5;
	color: #065f46;
}

.recommend-section .stock-low {
	background: #fef3c7;
	color: #92400e;
}

.recommend-section .stock-out {
	background: #fee2e2;
	color: #991b1b;
}

.recommend-section .add-to-cart-form {
	padding: 0 12px 12px;
	margin-top: auto;
}

.recommend-section .add-to-cart-btn {
	width: 100%;
	padding: 10px;
	border: 1.5px solid var(--border);
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--text);
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	transition: all var(--transition);
	justify-content: center;
}

.recommend-section .add-to-cart-btn:hover {
	background: var(--text);
	color: white;
	border-color: var(--text);
}

.recommend-section .add-to-cart-btn.disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ========== TOAST NOTIFICATION ========== */
.cart-toast {
	position: fixed;
	right: 24px;
	bottom: 24px;
	background: var(--text);
	color: #ffffff;
	padding: 14px 20px;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
	font-size: 0.875rem;
	font-weight: 600;
	font-family: "Inter", sans-serif;
	opacity: 0;
	transform: translateY(16px);
	pointer-events: none;
	transition:
		opacity 0.3s ease,
		transform 0.3s ease;
	z-index: 2000;
}

.cart-toast.show {
	opacity: 1;
	transform: translateY(0);
}

/* ========== RECOMMENDATIONS SECTION ========== */
.recommend-section h2 {
	font-size: 1.1rem;
	font-family: "Montserrat", sans-serif;
	font-weight: 700;
	color: var(--text);
	margin: 0 0 20px;
}

.recommend-section .product-grid {
	display: grid;
	gap: 20px;
}

/* Desktop: 4 columns */
@media (min-width: 1025px) {
	.recommend-section .product-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Tablet: 3 columns */
@media (min-width: 769px) and (max-width: 1024px) {
	.recommend-section .product-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 16px;
	}
}

/* Mobile: 2 columns */
@media (max-width: 768px) {
	.recommend-section .product-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 12px;
	}
}

/* Small Mobile: 2 columns */
@media (max-width: 480px) {
	.recommend-section .product-grid {
		gap: 10px;
	}

	.product-grid-main {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.recommend-section .product-meta {
		flex-direction: column;
		align-items: flex-start;
	}

	.recommend-section .product-category,
	.recommend-section .product-name,
	.recommend-section .product-price,
	.recommend-section .stock-status {
		font-size: 0.7rem;
	}

	.rating-stars .star {
		font-size: 8px;
	}

	.stock-status {
		margin-left: 10px;
	}

	.rating-count {
		font-size: 8px;
		margin-right: 8px;
	}

	.product-meta {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
	}
}
