/* --- Product Page Specific Styles --- */
.product_page_main {
    margin: 0 auto;
    padding: var(--spacing-xl);
}

.product_layout {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 60px;
    margin-bottom: var(--spacing-xl);
    max-width: 1000px;
    margin: 0 auto var(--spacing-xl) auto;
}

/* Gallery */
.product_gallery {
    display: flex;
    gap: var(--spacing-m);
}

.gallery_thumbnails {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-s);
    flex-shrink: 0;
    max-width: 100%;
    max-height: 400px;
    overflow: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery_thumbnails::-webkit-scrollbar {
    display: none;
}

.thumbnail_img {
    width: 50px;
    height: 50px;
    box-sizing: border-box;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
    flex-shrink: 0;
}


.thumbnail_img.active,
.thumbnail_img:hover {
    border-color: var(--color-primary);
}

.gallery_main_image {
    flex-grow: 1;
    position: relative;
}

.gallery_main_image img {
    width: 100%;
    height: auto;
    /* aspect-ratio: 1/1; */
    /* object-fit: cover; */
    object-fit: contain;
}

/* Details */
.product_details {
    display: flex;
    flex-direction: column;
}

.product_title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    line-height: 28.8px;
    text-align: left;
    margin-bottom: var(--spacing-s);
}

.product_price {
    font-size: 1.5rem;
    line-height: 22px;
    text-align: left;
    margin-bottom: var(--spacing-l);
    margin-top: var(--spacing-s);
    color: var(--color-text);
}

.product_description {
    margin-bottom: var(--spacing-l);
    line-height: 1.7;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.product_description p {
    margin-bottom: 1em;
}

.product_description ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 1em;
}

.product_options {
    margin-bottom: var(--spacing-l);
}

.option_group {
    margin-bottom: var(--spacing-l);
}

.option_label {
    display: block;
    margin-bottom: var(--spacing-s);
    font-weight: 400;
}

.color_swatches {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-s);
}

.color_swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--border-grey);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.color_swatch:hover {
    transform: scale(1.1);
}

.color_swatch.active {
    box-shadow: 0 0 0 2px var(--color-background), 0 0 0 4px var(--color-primary);
}

.quantity_selector {
    display: flex;
    border: 1px solid var(--border-grey);
    border-radius: 0px;
    width: fit-content;
}

.quantity_btn,
.quantity_selector input {
    border: none;
    background: none;
    font-size: 1rem;
    text-align: center;
    height: 40px;
    line-height: 40px;
}

.quantity_btn {
    width: 40px;
    cursor: pointer;
    font-size: 1.2rem;
}

.quantity_btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity_selector input {
    width: 50px;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity_selector input::-webkit-outer-spin-button,
.quantity_selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add_to_cart_btn {
    background: transparent;
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
}

.add_to_cart_btn:hover {
    background-color: #6a3d9a;
}

/* Product Info Display */
.product_info_display {
    margin-bottom: var(--spacing-xl);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
}

.info_container {
    display: flex;
    background-color: #f8f4ff;
    padding: var(--spacing-xl);
    gap: var(--spacing-l);
    width: 100%;
}

.product_info_section {
    flex: 1;
    padding: var(--spacing-s);
}

.product_info_section h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: var(--spacing-m);
    color: var(--color-text);
}

.product_info_section ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: var(--spacing-s);
}

.product_info_section li {
    line-height: 21px;
    font-size: 1rem;
    font-weight: 300;
    color: var(--color-text);
}

.product_info_section p {
    margin-top: var(--spacing-m);
    line-height: 1.5;
}

.info_divider {
    width: 1px;
    background-color: var(--border-grey);
    margin: 0 var(--spacing-m);
}

.same_collection h2 {
    font-size: 56px;
    line-height: 67px;
    font-weight: 700;
    text-align: center;
    color: var(--color-text);
    margin-bottom: var(--spacing-s);
}

.same_collection_subtitle {
    font-size: 18px;
    line-height: 22px;
    text-align: center;
    font-family: var(--font-heading);
    color: var(--color-text);
    font-weight: 300;
    margin-bottom: var(--spacing-xl);
}

.same_collection_name,
.featured_products h2.same_collection_name {
    font-size: 24px;
    line-height: 28px;
    font-weight: 700;
    text-align: left;
    color: var(--color-text);
    margin-bottom: var(--spacing-l);
}

.shop_now_btn {
    font-weight: 300;
}

/* --- Responsive Styles for Product Page --- */
@media (max-width: 1024px) {
    .product_layout {
        grid-template-columns: 1fr;
    }

    .product_gallery {
        flex-direction: column-reverse;
    }

    .gallery_thumbnails {
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .product_page_main {
        padding: var(--spacing-l);
    }
    
    .info_container {
        flex-direction: column;
        gap: var(--spacing-m);
    }
    
    .info_divider {
        width: 100%;
        height: 1px;
        margin: var(--spacing-m) 0;
    }

    .thumbnail_img { 
        width: 70px;
        height: 70px;
    }
}

/* Product Type Select */
.product_type_select_wrapper {
    position: relative;
    width: 100%;
}

.product_type_select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-grey);
    background-color: var(--color-background);
    font-size: 1rem;
    font-family: inherit;
    color: var(--color-text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

.product_type_select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(106, 61, 154, 0.1);
}

.product_type_select:hover {
    border-color: var(--color-primary);
}


/* Toast (Add to cart) */
.toast_content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast_header {
    padding: 12px 16px 0 16px;
}

.toast_title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

.toast_body {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    align-items: start;
    padding: 0 16px;
}

.toast_product_image {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border-grey);
}

.toast_details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast_product_name {
    font-size: 16px;
    font-weight: 600;
}

.toast_product_meta {
    color: var(--muted-text, #6b7280);
    font-weight: 300;
    font-size: 13px;
}

.toast_product_price {
    font-size: 14px;
    font-weight: 600;
}

.toast_actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px 16px 16px;
}

.toast_btn_cart,
.toast_btn_checkout {
    height: 48px;
    border-radius: 28px;
    border: 2px solid #0b0b0b;
    background: #fff;
    color: #0b0b0b;
    font-size: 18px;
    line-height: 18px;
    font-weight: 500;
}


.toast-close {
    position: absolute;
    top: 16px;
    right: 16px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text) !important;
}

.toast_btn_checkout {
    background: #0b0b0b;
    color: #fff;
}

@media (max-width: 640px) {
    .toast_title { font-size: 14px; }
    .toast_actions { grid-template-columns: 1fr; }
    .toast_btn_cart, .toast_btn_checkout { height: 44px; font-size: 16px; }
}


#basketcontent {
    padding-top: 18px;
}

.topbutton {
	text-transform: none;
	text-shadow: none;
	text-align: center;
	font-size: 18px;
	padding: 10px 20px;
	border-radius: 3px;
  }

.topbutton#basketcoupon {
    background: var(--color-secondary);
    color: var(--color-text);
    border: none;
}
  
.topbutton#basketcheckout {
    color: white;
	background: var(--main-color);
}

.topbutton:hover, .topbutton_s:hover, .topbutton:active, .topbutton_s:active {
	background: var(--main-color);
	cursor: pointer;
}

.topbutton#basketcheckout:hover, .topbutton#basketcheckout:active {
	background: white;
    color: var(--main-color);
    border: 1px solid var(--main-color);
}

.topbutton.nextbtn .nextpng{
	height: 13px;
	margin: 0px 0 0 7px;
}

.topbutton.nextbtn .fa{
	margin-left: 7px;
	font-size: 0.85em;
}

.checkoutsectitle {
    font-family: var(--font-heading);
    height: 48px;
    display: flex;
    align-items: center;
}

#checkoutcol1wrap .label_select {
    display: block !important;
    color: var(--color-text) !important;
    font-weight: 400 !important;
    padding-bottom: 10px !important;
}

/* Product Description Show More/Less Styles */
.product_description {
    position: relative;
    overflow: visible;
}

.product_description.description_truncated {
    max-height: calc(1.7em * 5); /* 5 lines based on line-height */
    overflow: hidden;
    position: relative;
}

.product_description.description_expanded {
    max-height: none;
    overflow: visible;
}

.show_more_btn {
    color: var(--color-primary);
    font-weight: 400;
    transition: opacity 0.2s ease;
    user-select: none;
    font-size: inherit;
    display: inline;
    margin-left: 5px;
    cursor: pointer;
    text-decoration: underline;
}

.show_more_btn:hover {
    opacity: 0.8;
}

/* Ensure the button appears after the content when truncated */
.product_description.description_truncated .show_more_btn {
    position: absolute;
    bottom: -1px;
    right: 0;
    background: linear-gradient(to right, transparent 0%, var(--color-background) 50%);
    padding-left: 20px;
    padding-right: 5px;
    z-index: 10;
    white-space: nowrap;
}

.product_description.description_expanded .show_more_btn {
    position: static;
    background: none !important;
    padding-left: 0;
    padding-right: 0;
    margin-left: 5px;
    display: inline;
}

.fixoverlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
}
.fixoverlay.trgray {
	background-color: rgba(0,0,0,0.5);
}

.loginoverlay {
    z-index: 2000 !important;
}