/**
Author: UI Team
Version: 1.0.16
Last Update: 02 Dec 2025
File Name: cms-product-card.css
**/

:root {
    --color-pink: #FFC0CB;
    --color-grey: #333333;
    --color-black: #000000;
    --color-white: #FFFFFF;
    --color-text-white: #FFFFFF;
    --color-pink-dark: #f061a7;
    --color-pink-magenta: rgb(232, 0, 113);
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 30px;
    
    /* UI Elements */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --icon-size: 36px;
    --z-index-snackbar: 10;
    
    /* Icons */
    --icon-wishlist: url('https://images-static.naikaa.com/media/wysiwyg/uiTools/2025-1/heart-plus.svg');
    --icon-wishlist-active: url('https://images-static.naikaa.com/media/wysiwyg/uiTools/2025-1/heart-filled.svg');
    --icon-cart: url('https://images-static.naikaa.com/media/wysiwyg/uiTools/2025-1/shopping-bag.svg');
}

/* Snackbar styling */
#snackbar {
    max-width: 360px;
    width: 90%;
    visibility: hidden;
    background-color: var(--color-black);
    color: var(--color-text-white);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md) var(--spacing-sm);
    position: fixed;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-index-snackbar);
    transition: visibility 0.3s ease, background-color 0.3s ease;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

#snackbar .view-bag {
    color: var(--color-pink-dark);
    font-weight: 600;
}

/* Show snackbar (visible and with animation) */
#snackbar.show {
    visibility: visible;
}

/* Success style */
#snackbar.success {
    background-color: var(--color-grey);
    /* Green */
}

/* Error style */
#snackbar.error {
    background-color: var(--color-grey);
    /* Red */
}

.view-bag {
    color: var(--color-pink);
    cursor: pointer;
}

.action-button {
    width: var(--icon-size);
    height: var(--icon-size);
    display: inline-block;
    cursor: pointer;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    border-radius: var(--border-radius-sm);
    background-origin: content-box;
    padding: var(--spacing-xs) var(--spacing-xs);
}

/* Default: No Fill */
.icon-wishlist {
    background-image: var(--icon-wishlist);
    background-color: var(--color-white);
    border: 1px solid var(--color-pink);
}

/* Active: Filled */
.icon-wishlist.active {
    background-image: var(--icon-wishlist-active);
}

.icon-cart {
    background-image: var(--icon-cart);
    background-color: var(--color-pink-magenta);
}

.card-slider {
    display: flex;
    overflow: auto;
    gap: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.card-slider::-webkit-scrollbar {
    display: none;
}

/* Card base styling */
.pr-card {
    color: var(--primary-text-color);
}

/* Image container */
.pr-card .pr-image-box {
    position: relative;
    width: 166px;
    margin: 0 auto;
    padding-bottom: 30px;
}

.pr-psize {
    position: absolute;
    top: -25px;
    right: 0;
}

.pr-card .pr-image-box .pr-image {
    width: 100%;
    max-height: 272px;
    max-height: 175px;
}

/* Product details section */
.pr-card .pr-details {
    text-align: left;
    position: relative;
    margin: 0 auto;
    width: 100%;
}

/* Rating styling */
.pr-card .pr-rating {
    letter-spacing: 0.6px;
    color: var(--secondary-text-color);
    display: inline-block;
    left: 0;
    top: -25px;
    text-transform: lowercase;
    margin-left: 0px;
    position: absolute;
}

.pr-card .rating-actual {
    font-weight: 600;
    color: var(--primary-text-color);
}

/* Brand and product info */
.pr-card .pr-brand {
    font-weight: 500;
    letter-spacing: -0.1px;
}

.pr-card .pr-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: inherit;
    color: var(--secondary-text-color);
    min-height: 40px;
    margin: 4px 0;
}

/* Add fixed height for shade element */
.pr-card .pr-shade {
    min-height: 14px;
    box-sizing: border-box;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pr-card .pr-size {
    color: var(--secondary-text-color);
    min-height: var(--pc-line-height-normal);
}

.pr-card .pr-mrp {
    text-decoration: line-through;
    color: var(--tertiary-text-color);
}

.pr-card .pr-discount {
    color: var(--color-discount);
}

/* Button styling */
.pr-card .pr-button {
    background: var(--primary-color);
    color: var(--color-white);
    padding: 8px 4px;
    border-radius: 8px;
    margin-top: 16px;
    display: block;
    text-align: center;
    text-decoration: none;
    border: none;
    width: 100%;
    cursor: pointer;
    box-sizing: border-box;
}

.pr-card .pr-button::after {
    content: '';
    width: 20px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.4555 5.81027H13.6836V5.54572C13.7713 3.42932 12.1046 1.66565 9.99935 1.66565C7.89409 1.75383 6.31514 3.42932 6.31514 5.54572V5.81027H2.54321C2.01689 5.81027 1.66602 6.163 1.66602 6.6921V13.9231C1.66602 16.3923 3.59584 18.3323 6.05198 18.3323H13.9467C16.4029 18.3323 18.3327 16.3923 18.3327 13.9231V6.6921C18.3327 6.25119 17.9818 5.81027 17.4555 5.81027ZM7.63093 5.54572C7.63093 4.22297 8.68356 3.07658 9.99935 2.9884C11.3151 3.07658 12.3678 4.22297 12.3678 5.54572V5.81027H7.63093V5.54572ZM17.0169 14.0113C17.0169 15.6868 15.6134 17.0977 13.9467 17.0977H6.05198C4.38531 17.0977 2.98181 15.6868 2.98181 14.0113V7.13302H6.31514V8.89669C6.1397 9.07306 6.05198 9.33761 6.05198 9.51397C6.05198 10.0431 6.49058 10.3958 6.92917 10.3958C7.36777 10.3958 7.80637 9.95489 7.80637 9.51397C7.80637 9.24942 7.71865 9.07306 7.54321 8.89669V7.13302H12.2801V8.80851C12.1046 8.98487 12.0169 9.24942 12.0169 9.51397C12.0169 10.0431 12.3678 10.484 12.8941 10.484C13.4204 10.484 13.859 10.1313 13.859 9.60216C13.859 9.33761 13.7713 9.16124 13.5958 8.98487V7.22121H17.0169V14.0113Z' fill='white'/%3E%3C/svg%3E%0A");
    display: inline-block;
    margin-left: 4px;
}

/* Horizontal card layout */
.product-card.horizontal {
    display: flex;
    width: 312px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 200px;
}

.product-card.horizontal .pr-image-box {
    margin-right: 20px;
    width: 85px;
}

.product-card.horizontal .pr-details {
    width: 100%;
    width: 181px;
}

.product-card.horizontal .pr-rating {
    position: inherit;
    padding: 5px;
    margin-bottom: 5px;
}

.product-card.horizontal .pr-psize {
    top: 0;
    position: relative;
    left: 0;
    margin-bottom: 5px;
}

.inner-card {
    display: flex;
    flex-direction: row;
}

/* Design system overrides */
.product-card .product-button::after {
    width: 16px;
    height: 16px;
    background-size: 100%;
}

.product-card .product-info {
    padding: 0;
}

.product-card .product-button {
    border-radius: 20px;
}

.product-card {
    margin: 0;
    padding: 12px;
    border: 1px solid lightgray;
    border-radius: 14px;
    margin-top: 20px;
    width: 190px;
    box-sizing: border-box;
    flex-shrink: 0;
    background: var(--color-white);
    background: var(--color-white);
}

.pr-action-buttons{
    display: flex;
    gap: 4px;
    position: relative;
    z-index: 2;
}

.pr-action-buttons button {
    cursor: pointer;
}

.styled-cart{
    background-color: var(--primary-color);
    color: var(--color-white);
    width: calc(157px - 2rem);
    border-radius: 8px;
}

/* Disabled button state */
.styled-cart.disabled {
    background-color: var(--secondary-text-color);
    opacity: 0.7;
    cursor: not-allowed;
}

.styled-wishlist{
    border-radius: 8px;
}

/* Shimmer Effect Styles */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

.shimmer {
    background: var(--shimmer-background);
    background-image: linear-gradient(
        to right,
        var(--shimmer-background) 0%,
        var(--shimmer-animation-color) 20%,
        var(--shimmer-background) 40%,
        var(--shimmer-background) 100%
    );
    background-repeat: no-repeat;
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 4px;
}

.shimmer-wrapper {
    width: 100%;
    height: 100%;
}

.shimmer-image {
    width: 100%;
    height: 175px;
    margin-bottom: 10px;
}

.shimmer-rating {
    width: 80px;
    height: 16px;
    margin-bottom: 8px;
}

.shimmer-brand {
    width: 75%;
    height: 20px;
    margin-bottom: 8px;
}

.shimmer-name {
    width: 100%;
    height: 40px;
    margin-bottom: 8px;
}

.shimmer-price {
    width: 60%;
    height: 18px;
    margin-bottom: 12px;
}

.shimmer-button {
    width: 100%;
    height: 36px;
}

/* Horizontal card shimmer adjustments */
.product-card.horizontal .shimmer-image {
    width: 85px;
    height: 85px;
    margin-right: 20px;
}

.product-card.horizontal .shimmer-details {
    width: 190px;
    min-width: 190px;
}

.product-card .shimmer-details {
    width: 190px;
    min-width: 190px;
}

/* Product card loading state */
.product-card.loading .pr-details {
    display: none;
}

.product-card:not(.loading) .shimmer-wrapper {
    display: none;
}

.pr-priceDetails {
    margin-top: 4px;
    margin-bottom: 8px;
}

.hide {
    display: none;
}

/* Shade/Size Selection Modal CSS */
.options-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9;
}
.options-modal {
    background: white;
    border-radius: 0px;
    width: 100%;
    max-width: 412px;
    height: 100vh;
    overflow-y: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
}
.options-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    margin-bottom: 0;
    position: sticky;
    top: 0;
    background: var(--color-white);
    z-index: 2;
    border-bottom: 1px solid #f0f0f0;
}
.options-modal-title {
    font-weight: bold;
    font-size: 16px;
}
.options-modal-close {
    cursor: pointer;
    font-size: 24px;
    border: none;
    background: transparent;
    padding: 0;
    line-height: 1;
}
.product-detail-section {
    display: flex;
    gap: 12px;
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    background: var(--color-white);
    margin: 5px 0px;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 5px 10px 0px;
}
.product-images {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.product-main-image {
    width: 115px;
    height: 115px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #f0f0f0;
}
.product-carousel {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    max-width: 256px;
    margin-top: 4px;
}
.product-carousel::-webkit-scrollbar {
    display: none;
}
.carousel-image {
    width: 38px;
    height: 38px;
    border-radius: 4px;
    object-fit: cover;
    cursor: pointer;
    border: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.carousel-image:hover {
    border-color: var(--primary-color);
}
.product-info-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.product-description {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-black);
}
.product-options-count {
    color: #666;
}
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}
.options-grid.size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.option-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.option-color {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.option-color.selected {
    border: 2px solid var(--color-white);
    box-shadow: rgba(0, 0, 0, 0.5) 0px 1px 2px 0px, rgba(0, 0, 0, 0.7) 0px 2px 4px 0px, rgba(0, 0, 0, 0.5) 0px -2px 4px 0px;
}
.option-color.selected::after {
    content: "";
    width: 7px;
    height: 15px;
    position: absolute;
    top: 12px;
    left: 18px;
    border-style: solid;
    border-color: rgb(255, 255, 255);
    border-image: initial;
    border-width: 0px 2px 2px 0px;
    transform: rotate(45deg);
}
.option-size {
    width: 80px;
    height: 40px;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    position: relative;
    margin: 5px;
    background-color: #fff;
}
.option-size.selected {
    border: 2px solid var(--primary-color);
    color: var(--color-white);
    background: rgb(63, 65, 77);
}
.option-name {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--secondary-text-color);
}
.option-name.selected{
    color: var(--color-black);
    font-weight: 500;
}
.modal-pricing-section {
    padding: 12px 16px;
    background: white;
    align-items: center;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--tertiary-text-color);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 7px 0px, rgba(0, 0, 0, 0.1) 0px -1px 7px 0px;
}
.modal-price-left{
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-price-right{
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: end;
}
.pipe{
    color: #ddd;
}
.modal-price-mrp {
    color: #999;
    text-decoration: line-through;
}
.modal-price-discount {
    color: var(--color-discount);
}
.options-modal-footer {
    display: flex;
    padding: 12px;
    border-top: 1px solid #f0f0f0;
    position: sticky;
    bottom: 0;
    background: var(--color-white);
    z-index: 2;
}
.modal-wishlist-btn {
    width: 96px;
    height: 48px;
    border: 1px solid #ddd;
    background: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    border-radius: 8px 0px 0px 8px;
}
.modal-wishlist-btn::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background-image: var(--icon-wishlist);
    background-size: contain;
    background-repeat: no-repeat;
}
.modal-wishlist-btn.active::before {
    background-image: var(--icon-wishlist-active);
}
.modal-wishlist-btn svg {
    display: none;
}
.modal-add-to-bag {
    background-color: var(--primary-color);
    color: var(--color-white);
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: bold;
    flex-grow: 1;
    font-size: 16px;
    border-radius: 0px 8px 8px 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
@media (min-width: 640px){
    .options-modal{
        height: 100%;
        max-height: 500px;
        margin-top: 157px;
    }
}

/* ================================================
   v1.0.16 - Variant Selection Styles
   ================================================ */

/* Variant Indicator Badge - Shows on card image when variant selected */
.variant-indicator {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  z-index: 1;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Clickable Variant Text (Shade/Size) - REMOVED, replaced with variant-options-link */

/* Variant Options Link - Clickable "Options" text next to shade/size */
.variant-options-link {
  color: var(--primary-color, #fc2779);
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.2s ease;
  display: inline;
  font-weight: 500;
}

.variant-options-link:hover {
  color: var(--primary-color-dark, #d91f63);
}

/* Sync pr-shade and pr-psize styling */
.pr-shade,
.pr-psize {
  color: var(--secondary-text-color);
}

/* Modal Apply Button - Matches primary button theme */
.modal-apply-variant {
  background-color: var(--primary-color, #fc2779);
  color: var(--color-white, #ffffff);
  width: 100%;
  border-radius: 8px;
  padding: 12px 16px;
  border: none;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-apply-variant:hover {
  background-color: var(--primary-color-dark, #d91f63);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(252, 39, 121, 0.3);
}

.modal-apply-variant:active {
  transform: translateY(0);
}

.modal-apply-variant.loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

/* Card with selected variant - subtle highlight */
.variant-selected {
  position: relative;
}