/* Single Product Page Styles - High Specificity */

/* Layout Containers */
body.single-product .ss-breadcrumb-container {
	background: #fff;
	border-radius: 8px;
}

body.single-product .ss-breadcrumb-inner {
	padding: 20px;
}

body.single-product .ss-main-container {
	background: #F7F6F6;
}

body.single-product .ss-main-inner {
	padding: 32px 0;
}

body.single-product .ss-flex-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

body.single-product .ss-left-column {
	flex: 1;
	min-width: 300px;
	padding: 0;
	background: white;
	border-radius: 14px;
	position: relative;
}

body.single-product .ss-right-column {
	flex: 1;
	min-width: 300px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

body.single-product .ss-product-images {
	margin-bottom: 30px;
	display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

body.single-product .ss-back-button {
	position: absolute;
	top: 24px;
	left: 24px;
	z-index: 10;
}

body.single-product .ss-back-button button {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
}

body.single-product .ss-back-button i {
	background-color: #F5F5F5;
	font-size: 16px;
	fill: #252B37;
	color: #252B37;
	border-radius: 50%;
	padding: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
}

body.single-product .ss-common-product-section {
	background: #FFFFFF;
	padding: 24px;
	border-radius: 14px;
}

/* Product Header Section */
body.single-product .ss-product-header {
	padding: 24px;
	background: white;
	border-radius: 14px;
}

body.single-product .ss-brand-category-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
	gap: 10px;
}

body.single-product .ss-brand-category-left {
	display: flex;
	align-items: center;
	gap: 10px;
}

body.single-product .ss-brand-link {
	color: #2e2e2e;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 1px;
}

body.single-product .ss-category-link {
	color: #2e2e2e;
	font-weight: 500;
	text-decoration: none;
	font-size: 14px;
	padding: 3px 8px;
	border: 1px solid #D0D5DD;
	border-radius: 6px;
}

body.single-product .ss-sku-info {
	font-size: 14px;
	color: #A2A2A2;
}

body.single-product .ss-title-share-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px;
}

body.single-product .ss-product-title {
	font-size: 16px;
	font-weight: 500;
	color: #2e2e2e;
	margin: 0;
}

body.single-product .ss-rating-container {
	margin-bottom: 20px;
}

body.single-product .ss-rating-inner {
	display: flex;
	align-items: center;
	gap: 5px;
}

body.single-product .ss-price-container {
	display: flex;
	align-items: center;
	gap: 10px;
}

body.single-product .ss-price {
	color: #000;
	font-size: 24px;
	font-weight: 500;
}

/* Add to Cart Section */
body.single-product .ss-add-to-cart-section {
	padding: 24px;
	background: white;
	border-radius: 14px;
}

body.single-product .ss-cart-wishlist-row {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	margin-bottom: 12px;
}

body.single-product .ss-cart-button-container {
	flex: 1;
}

body.single-product .ss-wishlist-container {
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #3D1690;
	border-radius: 6px;
	background: white;
	cursor: pointer;
}

/* Only at SkinSeoul Section */
body.single-product .ss-only-at-skinseoul {
	padding: 24px;
	background: white;
	border-radius: 14px;
}

body.single-product .ss-only-at-skinseoul-header {
	margin-bottom: 20px;
}

body.single-product .ss-only-at-skinseoul-title {
	font-size: 14px;
	margin-bottom: 15px;
	color: #6e6e6e;
}

body.single-product .ss-only-at-skinseoul-item h5 {
	font-size: 14px;
	font-weight: 400;
	margin-top: 0;
	margin-bottom: 14px;
}

body.single-product .ss-only-at-skinseoul-item h5:last-child {
	margin-bottom: 0;
}

body.single-product .ss-only-at-skinseoul-link {
	color: #3D1690;
	text-decoration: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 400;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Content Sections */
body.single-product .ss-content-section {
	background: #FFFFFF;
	border-bottom: 2px solid #F7F6F6;
}

body.single-product .ss-content-inner {
	padding: 32px 0;
}

body.single-product .ss-section-title {
	font-size: 18px;
	margin-bottom: 15px;
	color: #333;
	font-weight: 500;
}

body.single-product .ss-section-content {
	color: #6e6e6e;
	line-height: 1.6;
	font-size: 14px;
}

body.single-product .ss-suitable-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	color: #6e6e6e;
	font-size: 14px;
}

/* Accordion Styles */
body.single-product .ss-accordion-button {
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	margin: 0;
}

body.single-product .ss-accordion-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

body.single-product .ss-accordion-icon {
	font-size: 20px;
	color: #666;
	transition: transform 0.4s ease;
	font-weight: 100;
    width: 15px;
}

body.single-product .ss-accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease, opacity 0.4s ease;
	opacity: 0;
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

body.single-product .ss-accordion-inner {
	padding-top: 10px;
	color: #6e6e6e;
	line-height: 1.6;
	font-size: 14px;
	margin-bottom: 10px;
}

/* Recommended Products */
body.single-product .ss-recommended-container {
	background: #FFFFFF;
	border-bottom: 2px solid #F7F6F6;
	/* margin-top: 24px; */
}

body.single-product .ss-recommended-inner {
	padding: 32px 0;
}

body.single-product .ss-recommended-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

body.single-product .ss-more-products-link {
	color: #3D1690;
	text-decoration: none;
	font-size: 14px;
	font-weight: 400;
	border: 1px solid #3D1690;
	border-radius: 4px;
	padding: 10px 20px;
	transition: all 0.2s;
}

body.single-product .ss-more-products-container {
    margin-top: 36px;
	display: flex;
	justify-content: center;
}

/* Modal Content Styles */
body.single-product .ss-modal-title {
	display: flex;
	align-items: center;
	gap: 15px;
	font-size: 14px;
	font-weight: 500;
	color: #3d1690;
	margin-bottom: 15px;
}

body.single-product .ss-modal-paragraph {
	margin-bottom: 15px;
	font-size: 14px;
	font-weight: 400;
	color: #6e6e6e;
	text-align: justify;
}

body.single-product .ss-modal-list {
	margin-bottom: 15px;
	font-size: 14px;
	font-weight: 400;
	color: #6e6e6e;
	text-align: justify;
}

body.single-product .ss-modal-list-item {
	margin-bottom: 15px;
}

body.single-product .ss-modal-list-item:last-child {
	margin-bottom: 0;
}

body.single-product .ss-modal-contact {
	margin: 0;
	font-size: 14px;
	color: #555;
	text-align: justify;
}

body.single-product .ss-modal-contact a {
	color: #3D1690;
	text-decoration: none;
}

/* Product Gallery Styles */
body.single-product .woocommerce-product-gallery {
	display: flex;
	flex-direction: row;
	gap: 10px;
	align-items: center;
	justify-content: center;
}

body.single-product .woocommerce-product-gallery__image {
	flex: 1;
	max-width: 100%;
}

body.single-product .woocommerce-product-gallery__image img {
	width: 100%;
	height: auto;
	border-radius: 8px;
}

body.single-product .woocommerce-product-gallery__trigger {
	display: none;
}

body.single-product .flex-control-thumbs {
	display: flex;
	flex-direction: row;
	gap: 10px;
	margin-top: 10px;
	list-style: none;
	padding: 0;
}

body.single-product .flex-control-thumbs li {
	flex: 1;
	max-width: 80px;
}

body.single-product .flex-control-thumbs img {
	width: 100%;
	height: auto;
	border-radius: 4px;
	cursor: pointer;
	border: 2px solid transparent;
	transition: border-color 0.2s ease;
}

body.single-product .flex-control-thumbs img:hover,
body.single-product .flex-control-thumbs img.flex-active {
	border-color: #3D1690;
}

/* Additional styles for inline gallery */
body.single-product .woocommerce-product-gallery__wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: center;
}

body.single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:first-child {
	width: 100%;
	flex: 0 0 100%;
	margin-bottom: 16px;
}

body.single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:first-child img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	max-height: 400px;
	object-fit: contain;
}

body.single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:not(:first-child) {
	flex: 0 0 auto;
	width: auto;
}

body.single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:not(:first-child) img {
	width: auto;
	height: auto;
	max-width: 150px;
	border-radius: 8px;
	object-fit: cover;
}

body.single-product .ss-single-product-container .single_variation_wrap .single_variation {
	display: none !important;
}

body.single-product table td, 
body.single-product table th {
	border: none !important;
}

/* Add to Cart Button Styling */
body.single-product button.single_add_to_cart_button.button.alt {
	width: 100%;
	height: 38px;
	font-size: 14px;
	font-weight: 400;
	border: 1px solid #3D1690;
	border-radius: 4px;
	color: #3D1690;
	background-color: #FFFFFF;
	transition: all 0.2s;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	flex-direction: row-reverse;
	gap: 5px;
}

body.single-product button.single_add_to_cart_button.button.alt:hover {
	background-color: #3D1690;
	color: #FFFFFF;
}

/* Modal Styles */
body.single-product .ss-single-product-container .modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}

body.single-product .ss-single-product-container .modal-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Desktop Modal - Right to Left */
body.single-product .ss-single-product-container .modal-container {
	position: fixed;
	top: 0;
	right: -400px;
	width: 100%;
	max-width: 400px;
	height: 100%;
	background-color: white;
	z-index: 10000;
	transition: right 0.3s ease;
	overflow-y: auto;
	border-radius: 4px 0 0 4px;
}

body.single-product .ss-single-product-container .modal-container.active {
	right: 0;
}

body.single-product .ss-single-product-container .modal-header {
	padding: 20px;
	border-bottom: 1px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

body.single-product .ss-single-product-container .modal-title {
	font-size: 18px;
	font-weight: 500;
	color: #2e2e2e;
	margin: 0;
}

body.single-product .ss-single-product-container .modal-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #666;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
}

body.single-product .ss-single-product-container .modal-content {
	padding: 20px;
	line-height: 1.6;
	color: #555;
}

/* Recommended Products Styles */
body.single-product .ss-single-product-recommended-container ul.products:before {
	content: none;
}

body.single-product .ss-single-product-recommended-container ul.products {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	align-items: stretch;
}

body.single-product .ss-single-product-recommended-container ul.products li.bft-content-product {
	padding: 16px 16px 10px;
	border-radius: 4px;
	display: block;
	width: 100%;
	margin: auto;
}

body.single-product .ss-single-product-recommended-container ul.products li.bft-content-product .ss-product-image {
	padding: 30px 16px;
}

body.single-product .ss-single-product-recommended-container section.related.products {
	flex: 1;
}

body.single-product .ss-single-product-recommended-container ul.products li.bft-content-product a.add_to_cart_button {
	width: 100%;
	font-size: 12px;
	font-weight: 400;
	border: 1px solid #3D1690;
	background-color: #3D1690;
	color: #FFFFFF;
	border-radius: 4px;
	transition: all 0.2s;
	cursor: pointer;
	display: flex;
	align-items: center;
	padding: 10px;
	height: auto;
}

/* Additional recommended products styles for better compatibility */
body.single-product .ss-recommended-container ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 16px !important;
	align-items: stretch !important;
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

body.single-product .ss-recommended-container ul.products:before,
body.single-product .ss-recommended-container ul.products:after {
	content: none !important;
}

body.single-product .ss-recommended-container ul.products li {
	padding: 16px 16px 10px !important;
	border-radius: 4px !important;
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
}
body.single-product .ss-recommended-container ul.products li .price {
	color: #2e2e2e !important;
}
body.single-product .ss-recommended-container ul.products li .price ins {
	font-weight: 500 !important;
}
body.single-product .ss-recommended-container ul.products li a.add_to_cart_button {
	width: 100% !important;
	font-size: 12px !important;
	font-weight: 400 !important;
	border: 1px solid #3D1690 !important;
	background-color: #3D1690 !important;
	color: #FFFFFF !important;
	border-radius: 4px !important;
	transition: all 0.2s !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 10px !important;
	height: auto !important;
	text-decoration: none !important;
}

body.single-product .ss-recommended-container ul.products li a.add_to_cart_button:hover {
	background-color: #2a0f66 !important;
	border-color: #2a0f66 !important;
}
.ss-only-at-skinseoul-item {
    margin-bottom: 10px;
}
body.single-product .ss-single-product-recommended-container .ss-section-title {
	margin-bottom: 32px;
}
/* Responsive Styles */
@media screen and (max-width: 1024px) {
	body.single-product .ss-single-product-recommended-container ul.products,
	body.single-product .ss-recommended-container ul.products {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}

@media screen and (max-width: 768px) {
	body.single-product .ss-content-inner {
		padding: 16px 0;
	}
	body.single-product .ss-breadcrumb-container {
		display: none;
	}
	
	body.single-product .ss-single-product-recommended-container ul.products,
	body.single-product .ss-recommended-container ul.products {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 12px !important;
		padding: 0 !important;
	}

	body.single-product .ss-single-product-recommended-container ul.products li.bft-content-product {
		padding: 0px !important;
	}

	body.single-product .ss-section-title {
		font-size: 16px;
	}

	body.single-product .ss-brand-link {
		font-size: 12px;
	}

	body.single-product .ss-category-link {
		font-size: 12px;
	}

	body.single-product .ss-main-container {
		padding: 0;
		margin: 0;
	}
	body.single-product .ss-main-container .ss-main-inner {
		padding: 0 0 2px;
	}

	body.single-product .ss-main-container .ss-main-inner .ss-flex-wrapper,
	body.single-product .ss-main-container .ss-main-inner .ss-flex-wrapper .ss-left-column,
	body.single-product .ss-main-container .ss-main-inner .ss-flex-wrapper .ss-right-column {
		gap: 0;
	}
	body.single-product .ss-main-container .ss-main-inner .ss-left-column,
	body.single-product .ss-main-container .ss-main-inner .ss-right-column {
		border-radius: 0;
	}
	body.single-product .ss-main-container .ss-main-inner .ss-right-column .ss-product-header,
	body.single-product .ss-main-container .ss-main-inner .ss-right-column .ss-add-to-cart-section,
	body.single-product .ss-main-container .ss-main-inner .ss-right-column .ss-only-at-skinseoul {
		border-radius: 0;
		padding: 16px;
	}

	body.single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:not(:first-child) img {
		max-width: 60px;
	}

	body.single-product .ss-shipping-information {
		padding: 0;
	}

	/* Mobile Modal - Bottom to Up */
	body.single-product .ss-single-product-container .modal-container {
		position: fixed;
		bottom: -60vh;
		left: 0;
		right: 0;
		top: auto;
		width: 100%;
		max-width: none;
		height: 60vh;
		background-color: white;
		z-index: 10000;
		transition: bottom 0.3s ease;
		overflow-y: auto;
		border-radius: 4px 4px 0 0;
	}

	body.single-product .ss-single-product-container .modal-container.active {
		bottom: 0;
		right: auto;
	}

	body.single-product .ss-single-product-container .modal-content {
		padding: 16px 16px 200px;
	}
}
/* Loading spinner styles */
.ss-loading-spinner {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	min-height: 200px;
	width: 100%;
	text-align: center;
}

/* Center the spinner container */
#ss-related-products-container {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
}

.ss-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #3D1690;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 15px;
}

.ss-loading-spinner p {
	margin: 0;
	color: #666;
	font-size: 14px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}