/**
 * Custom Product Page Styles
 * Dark theme design similar to Midjourney/modern UI
 */

/* ========================================
   GLOBAL PRODUCT PAGE STYLES
   ======================================== */

.single-product .product {
	background: linear-gradient(135deg, #1a1d2e 0%, #16213e 100%);
	border-radius: 12px;
	padding: 2rem;
	margin-bottom: 2rem;
}

/* Dark theme for product page */
.single-product {
	background: #0f1419;
	color: #e1e8ed;
}

.single-product .page-wrapper {
	background: #0f1419;
}

/* ========================================
   PRODUCT STATS SECTION
   ======================================== */

.custom-product-stats {
	display: flex;
	gap: 20px;
	margin: 20px 0;
	padding: 16px 20px;
	background: rgba(42, 45, 58, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	flex-wrap: nowrap;
	align-items: center;
}

.custom-product-stats .stat-item {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	white-space: nowrap;
}

.custom-product-stats .stat-icon {
	color: #ffffff;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
}

.custom-product-stats .stat-label {
	font-size: 13px;
	color: #ffffff;
	font-weight: 400;
	white-space: nowrap;
}

.custom-product-stats .stat-value {
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.custom-product-stats .stat-number,
.custom-product-stats .stat-unit {
	display: inline;
	white-space: nowrap;
	color: #ffffff !important;
}

.custom-product-stats .stat-number *,
.custom-product-stats .stat-number span,
.custom-product-stats .stat-number div {
	color: #ffffff !important;
	display: inline !important;
}

/* ========================================
   PRODUCT TITLE & META
   ======================================== */

.single-product .product_title {
	color: #ffffff;
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 1rem;
	line-height: 1.3;
}

.single-product .woocommerce-product-details__short-description {
	color: #b0b8c0;
	font-size: 1rem;
	line-height: 1.6;
	margin-bottom: 1.5rem;
}

/* ========================================
   PRICE SECTION
   ======================================== */

.single-product .price {
	display: flex;
	align-items: baseline;
	gap: 1rem;
	margin: 1.5rem 0;
}

.single-product .price .amount,
.single-product .price ins .amount {
	color: #00d4ff;
	font-size: 2.5rem;
	font-weight: 700;
	text-decoration: none;
}

.single-product .price del {
	color: #6b7280;
	font-size: 1.5rem;
}

.single-product .price del .amount {
	font-size: 1.5rem;
	text-decoration: line-through;
}

/* ========================================
   RATING SECTION
   ======================================== */

.single-product .woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.single-product .star-rating {
	color: #ffd93d;
}

.single-product .star-rating span {
	color: #ffd93d;
}

.single-product .woocommerce-review-link {
	color: #a0a8b0;
	font-size: 0.875rem;
	text-decoration: none;
	transition: color 0.3s ease;
}

.single-product .woocommerce-review-link:hover {
	color: #00d4ff;
}

/* ========================================
   ADD TO CART BUTTON
   ======================================== */

.single-product .cart .button,
.single-product .single_add_to_cart_button {
	background: linear-gradient(135deg, #00d4ff, #7c3aed);
	color: #ffffff;
	border: none;
	padding: 14px 32px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-transform: capitalize;
	letter-spacing: 0.5px;
	box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	position: relative;
}

/* Cart icon using SVG */
.single-product .single_add_to_cart_button:before,
.single-product .cart .button::before {
	content: "";
	display: inline-block;
	width: 18px;
	height: 18px;
	margin-right: 8px;
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/></svg>');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	flex-shrink: 0;
}

.single-product .cart .button:hover,
.single-product .single_add_to_cart_button:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 212, 255, 0.5);
}

.single-product .cart .button:active,
.single-product .single_add_to_cart_button:active {
	transform: translateY(0);
}

/* Product already in cart state */
.single-product .single_add_to_cart_button.product-in-cart {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	cursor: not-allowed;
	opacity: 0.7;
}

.single-product .single_add_to_cart_button.product-in-cart:hover {
	transform: none;
	box-shadow: none;
}

.single-product .single_add_to_cart_button.product-in-cart:before {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>');
	/* Checkmark icon SVG */
}

/* ========================================
   QUANTITY SELECTOR
   ======================================== */

.single-product .quantity {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-right: 1rem;
}

.single-product .quantity input[type="number"] {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #ffffff;
	padding: 0.5rem 0.75rem;
	border-radius: 6px;
	width: 60px;
	height: 36px;
	text-align: center;
	font-size: 0.875rem;
	font-weight: 600;
}

.single-product .quantity input[type="number"]:focus {
	outline: none;
	border-color: #00d4ff;
	background: rgba(0, 212, 255, 0.1);
}

/* Hide default Flatsome quantity buttons */
.single-product .quantity .plus,
.single-product .quantity .minus,
.single-product .quantity button.plus,
.single-product .quantity button.minus {
	display: none !important;
}

/* Custom quantity buttons */
.single-product .qty-btn {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #ffffff;
	padding: 0;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 0.875rem;
	font-weight: 600;
	min-width: 36px;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.single-product .qty-btn:hover {
	background: rgba(0, 212, 255, 0.1);
	border-color: #00d4ff;
	color: #00d4ff;
}

.single-product .qty-btn:active {
	transform: scale(0.95);
}

/* Prevent duplicate buttons */
.single-product .quantity.qty-initialized .qty-btn {
	/* Styles already applied */
}

/* ========================================
   PRODUCT META
   ======================================== */

.single-product .product_meta {
	padding: 1.5rem;
	background: rgba(42, 45, 58, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	margin-top: 2rem;
}

.single-product .product_meta > span {
	display: block;
	margin-bottom: 0.75rem;
	color: #ffffff !important;
	font-size: 0.875rem;
}

.single-product .product_meta > span:last-child {
	margin-bottom: 0;
}

.single-product .product_meta a {
	color: #00d4ff !important;
	text-decoration: none;
	transition: color 0.3s ease;
}

.single-product .product_meta a:hover {
	color: #00a8cc !important;
}

.single-product .product_meta .sku_wrapper,
.single-product .product_meta .posted_in,
.single-product .product_meta .tagged_as {
	color: #ffffff !important;
}

.single-product .product_meta .sku {
	color: #ffffff !important;
	font-weight: 600;
}

/* ========================================
   PRODUCT TABS
   ======================================== */

.single-product .woocommerce-tabs {
	background: rgba(42, 45, 58, 0.3);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 12px;
	padding: 2rem;
	margin-top: 2rem;
}

.single-product .woocommerce-tabs .tabs {
	display: flex;
	gap: 1rem;
	border-bottom: 2px solid rgba(255, 255, 255, 0.1);
	margin-bottom: 2rem;
	padding-bottom: 0;
}

.single-product .woocommerce-tabs .tabs li {
	margin: 0;
	padding: 0;
	background: none;
	border: none;
}

.single-product .woocommerce-tabs .tabs li a {
	color: #ffffff !important;
	padding: 1rem 1.5rem;
	display: block;
	text-decoration: none;
	transition: all 0.3s ease;
	border-radius: 8px 8px 0 0;
	font-weight: 500;
}

.single-product .woocommerce-tabs .tabs li.active a,
.single-product .woocommerce-tabs .tabs li a:hover {
	color: #00d4ff !important;
	background: rgba(0, 212, 255, 0.1);
}

.single-product .woocommerce-tabs .panel {
	color: #ffffff !important;
	line-height: 1.6;
}

.single-product .woocommerce-tabs .panel h2 {
	color: #ffffff !important;
	font-size: 1.5rem;
	margin-bottom: 1rem;
}

.single-product .woocommerce-tabs .panel h3,
.single-product .woocommerce-tabs .panel h4,
.single-product .woocommerce-tabs .panel p,
.single-product .woocommerce-tabs .panel li,
.single-product .woocommerce-tabs .panel td,
.single-product .woocommerce-tabs .panel th,
.single-product .woocommerce-tabs .panel span,
.single-product .woocommerce-tabs .panel div,
.single-product .woocommerce-tabs .panel strong,
.single-product .woocommerce-tabs .panel em {
	color: #ffffff !important;
}

.single-product .woocommerce-tabs .panel a {
	color: #00d4ff !important;
}

.single-product .woocommerce-tabs .panel a:hover {
	color: #00a8cc !important;
}

/* Reviews section specific styles */
.single-product .woocommerce-tabs #reviews .woocommerce-Reviews-title,
.single-product .woocommerce-tabs #reviews .comment-reply-title,
.single-product .woocommerce-tabs #reviews .comment-form label,
.single-product .woocommerce-tabs #reviews .comment-form-rating label,
.single-product .woocommerce-tabs #reviews .comment-form-comment label,
.single-product .woocommerce-tabs #reviews .comment-form-author label,
.single-product .woocommerce-tabs #reviews .comment-form-email label,
.single-product .woocommerce-tabs #reviews p,
.single-product .woocommerce-tabs #reviews .description,
.single-product .woocommerce-tabs #reviews .comment-text,
.single-product .woocommerce-tabs #reviews .meta,
.single-product .woocommerce-tabs #reviews .woocommerce-review__author,
.single-product .woocommerce-tabs #reviews .woocommerce-review__verified,
.single-product .woocommerce-tabs #reviews .woocommerce-review__dash,
.single-product .woocommerce-tabs #reviews time {
	color: #ffffff !important;
}

.single-product .woocommerce-tabs #reviews input[type="text"],
.single-product .woocommerce-tabs #reviews input[type="email"],
.single-product .woocommerce-tabs #reviews textarea {
	background: rgba(255, 255, 255, 0.05) !important;
	border: 1px solid rgba(255, 255, 255, 0.1) !important;
	color: #ffffff !important;
}

/* ========================================
   WISHLIST & SHARE BUTTONS
   ======================================== */

.single-product .product-actions {
	display: flex;
	gap: 12px;
	margin-top: 12px;
	width: 100%;
}

.single-product .product-actions .button,
.single-product .product-actions .share-btn {
	flex: 1;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #ffffff;
	padding: 14px 24px;
	border-radius: 8px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
}

.single-product .product-actions .button:hover,
.single-product .product-actions .share-btn:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.2);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

/* ========================================
   2-COLUMN LAYOUT (DESKTOP)
   ======================================== */

/* Product Page Main Layout - 2 Columns */
.single-product div.product {
	display: grid !important;
	grid-template-columns: 500px 1fr;
	gap: 50px;
	align-items: start;
	width: 100% !important;
	max-width: 100% !important;
}

/* Gallery on the left */
.single-product .woocommerce-product-gallery {
	grid-column: 1;
	grid-row: 1;
}

/* Product summary on the right */
.single-product .summary.entry-summary {
	grid-column: 2;
	grid-row: 1;
	width: 100% !important;
	max-width: none !important;
	flex: 1;
}

/* Tabs and related products full width below */
.single-product .woocommerce-tabs,
.single-product .related.products,
.single-product .upsells.products {
	grid-column: 1 / -1;
}

/* ========================================
   PRODUCT IMAGE GALLERY
   ======================================== */

/* Gallery Container */
.single-product .woocommerce-product-gallery {
	border-radius: 12px;
	overflow: visible;
	border: none;
	background: transparent;
	position: sticky;
	top: 20px;
	max-width: 500px;
	width: 100%;
}

/* Gallery Wrapper - Display all images in vertical grid */
.single-product .woocommerce-product-gallery__wrapper {
	display: grid !important;
	grid-template-columns: 1fr;
	gap: 12px;
	max-height: 550px !important;
	overflow-y: auto !important;
	overflow-x: hidden !important;
	padding-right: 15px;
	height: auto !important;
	max-width: 100%;
}

/* Custom scrollbar for gallery */
.single-product .woocommerce-product-gallery__wrapper::-webkit-scrollbar {
	width: 6px;
}

.single-product .woocommerce-product-gallery__wrapper::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.05);
	border-radius: 10px;
}

.single-product .woocommerce-product-gallery__wrapper::-webkit-scrollbar-thumb {
	background: rgba(0, 212, 255, 0.3);
	border-radius: 10px;
}

.single-product .woocommerce-product-gallery__wrapper::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 212, 255, 0.5);
}

/* Individual Gallery Image */
.single-product .woocommerce-product-gallery__image {
	position: relative;
	margin: 0;
	background: rgba(42, 45, 58, 0.3);
	border-radius: 12px;
	overflow: hidden;
	border: 2px solid rgba(255, 255, 255, 0.1);
	transition: all 0.3s ease;
	cursor: pointer;
	max-width: 100%;
}

.single-product .woocommerce-product-gallery__image:hover {
	border-color: rgba(0, 212, 255, 0.5);
	transform: translateX(4px);
	box-shadow: 0 4px 12px rgba(0, 212, 255, 0.2);
}

/* Gallery Image Link */
.single-product .woocommerce-product-gallery__image a {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 16;
	overflow: hidden;
}

/* Gallery Images - 9:16 Portrait Ratio, Compact Size */
.single-product .woocommerce-product-gallery__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 10px;
	transition: transform 0.3s ease;
}

.single-product .woocommerce-product-gallery__image:hover img {
	transform: scale(1.05);
}

/* First image (featured) highlight */
.single-product .woocommerce-product-gallery__image:first-child {
	border-color: rgba(0, 212, 255, 0.3);
}

.single-product .woocommerce-product-gallery__image:first-child::after {
	content: "Featured";
	position: absolute;
	top: 8px;
	right: 8px;
	background: linear-gradient(135deg, #00d4ff, #7c3aed);
	color: #ffffff;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
	z-index: 2;
	pointer-events: none;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
	/* Switch to single column layout on mobile */
	.single-product div.product {
		display: block !important;
		grid-template-columns: 1fr;
	}

	.single-product .woocommerce-product-gallery {
		position: relative !important;
		top: 0 !important;
		margin-bottom: 2rem;
		width: 100% !important;
	}

	.single-product .summary.entry-summary {
		width: 100% !important;
	}

	.custom-product-stats {
		flex-direction: column;
		gap: 1rem;
	}

	.custom-product-stats .stat-item {
		width: 100%;
	}

	.single-product .product_title {
		font-size: 1.5rem;
	}

	.single-product .price .amount,
	.single-product .price ins .amount {
		font-size: 2rem;
	}

	.single-product .product {
		padding: 1rem;
	}

	/* Product actions wrapper responsive */
	.single-product .product-actions-wrapper {
		flex-direction: column;
		gap: 12px;
	}

	.single-product .product-wishlist-btn {
		width: 100%;
		min-width: auto;
	}

	.single-product .product-actions {
		flex-direction: column;
		gap: 10px;
	}

	.single-product .product-actions .button,
	.single-product .product-actions .share-btn {
		width: 100%;
	}

	/* Gallery responsive - horizontal scroll on mobile */
	.single-product .woocommerce-product-gallery__wrapper {
		display: flex !important;
		flex-direction: row;
		gap: 10px;
		max-height: none !important;
		overflow-x: auto !important;
		overflow-y: hidden !important;
		padding: 0 0 10px 0 !important;
		scroll-snap-type: x mandatory;
	}

	.single-product .woocommerce-product-gallery__image {
		flex: 0 0 80%;
		max-width: 80%;
		scroll-snap-align: start;
	}

	.single-product .woocommerce-product-gallery__image a {
		aspect-ratio: 9 / 16;
		width: 100%;
		height: auto;
	}

	.single-product .woocommerce-product-gallery__image img {
		width: 100% !important;
		height: 100% !important;
	}

	/* Horizontal scrollbar on mobile */
	.single-product .woocommerce-product-gallery__wrapper::-webkit-scrollbar {
		height: 4px;
		width: auto;
	}
}

@media (max-width: 480px) {
	.custom-product-stats {
		padding: 1rem;
	}

	.custom-product-stats .stat-item {
		padding: 0.75rem;
	}

	.single-product .cart .button,
	.single-product .single_add_to_cart_button {
		padding: 0.875rem 1.5rem;
		font-size: 1rem;
	}
}
