/* Product Modal Styles */
/* MicroModal Required CSS - DO NOT REMOVE */
.product-modal {
    display: none;
}

.product-modal.is-open {
    display: block;
}

/* Modal Overlay - Full viewport coverage */
.product-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Modal Container - Dialog box */
.product-modal__container {
    background-color: #fff;
    padding: 0;
    max-width: 1260px;
    max-height: 90vh;
    border-radius: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 90%;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

/* Modal Header - Visible for close button */
.product-modal__header {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0;
    margin: 0;
}

/* Hide the h2 title visually but keep it for accessibility */
#product-modal-title {
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

/* Modal Close Button - Square with rounded corner */
.product-modal__close {
    width: 50px;
    height: 50px;
    background-color: #425EAB;
    border: none;
    border-radius: 0 8px 0 0;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.product-modal__close:hover {
    opacity: 0.9;
}

.product-modal__close svg {
    width: 24px;
    height: 24px;
    color: #FFF4E4;
    stroke: #FFF4E4;
}

/* Modal Content */
.product-modal__content {
    display: grid;
    gap: 0;
    grid-template-columns: 1fr;
    /* padding: 103px 116px 103px 116px; */
    padding: 1rem 4rem 4rem 4rem;
}

@media (min-width: 768px) {
    .product-modal__content {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
}


@media (min-width: 1200px) {
    .product-modal__content {
        grid-template-columns: 390px 1fr;
        gap: 36px;
    }
}


.modal-image-wrapper {
    /* display: flex;
    align-items: flex-start;
    justify-content: center; */
}

.modal-product-image {
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

.modal-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
}

.modal-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.modal-product-title {
    font-family: var(--wp--preset--font-family--kollektif, 'Kollektif', sans-serif);
    font-size: var(--wp--preset--font-size--extra-large, 40px);
    font-weight: 400;
    line-height: 1.1;
    margin: 0;
    color: #000000;
    flex: 1;
    max-width: 515px;
}

.modal-product-category {
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: var(--wp--preset--font-size--medium, 24px);
    color: #828282;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.5;
}

.modal-product-price {
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: var(--wp--preset--font-size--large, 32px);
    font-weight: 500;
    color: #000000;
    margin: 0;
    line-height: 1.5;
}

.modal-stock-status {
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: var(--wp--preset--font-size--small, 16px);
    font-weight: 500;
    color: #828282;
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
}

.modal-stock-status.in-stock {
    color: #828282;
    background: none;
}

.modal-stock-status.out-of-stock {
    color: #ef4444;
    background: none;
}

.modal-variations {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
}

.modal-variation-select select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: var(--wp--preset--font-size--small, 16px);
    color: rgb(100, 100, 100);
    background-color: #fff;
    margin-bottom: 1rem;
}

.modal-variation-select select:focus {
    outline: none;
    border-color: #343434;
}

.modal-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.modal-quantity {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
}

.modal-add-to-cart {
    background-color: #343434;
    color: #ffffff;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: var(--wp--preset--font-size--small, 16px);
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    line-height: 1.5;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
}

.modal-add-to-cart:hover {
    background-color: #222;
}

.modal-add-to-cart:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.modal-wishlist-btn {
    width: 43px;
    height: 43px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.modal-wishlist-btn svg {
    width: 37.45px;
    transition: fill 0.3s ease;
}

/* Pulsing animation for loading state */
.modal-wishlist-btn.pulsing svg {
    animation: wishlist-pulse 0.8s ease-in-out infinite;
}

/* Ripple effect for fill/unfill */
.modal-wishlist-btn.ripple svg {
    animation: wishlist-ripple 0.5s ease-out;
}
.modal-wishlist-btn.ripple svg {
    animation: wishlist-ripple 0.5s ease-out;
    height: 32.67px;
    stroke: #343434;
    stroke-width: 4px;
    fill: none;
}

.modal-read-more {
    color: #828282;
    font-family: var(--wp--preset--font-family--inter, 'Inter', sans-serif);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none;
    margin: 0;
    display: inline-block;
    align-self: flex-end;
}

.modal-read-more:hover {
    text-decoration: underline;
}

/* Prevent body scroll when modal is open */
body.micromodal-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Mobile Responsive Styles */
@media (max-width: 767px) {
    .product-modal__container {
        max-height: 95vh;
        overflow-y: auto;
    }

    .product-modal__content {
        grid-template-columns: 1fr;
        padding: 1rem 2.5rem 2.5rem 2.5rem;
    }
    
    .modal-image-wrapper {
        margin-bottom: 2rem;
    }
    
    .modal-product-title {
        font-size: var(--wp--preset--font-size--large, 32px);
    }
    
    .modal-product-category {
        font-size: 18px;
    }
    
    .modal-product-price {
        font-size: var(--wp--preset--font-size--medium, 24px);
    }

    .product-modal__close {
        width: 48px;
        height: 48px;
    }

    .product-modal__close svg {
        width: 20px;
        height: 20px;
    }
}

.modal-success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 0.75rem;
    border-radius: 0.25rem;
    text-align: center;
}

/* Animation for modal appearance */
@keyframes mmfadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mmslideIn {
    from { transform: translateY(-15%); }
    to { transform: translateY(0); }
}

.micromodal-slide {
    display: none;
}

.micromodal-slide.is-open {
    display: block;
}

.micromodal-slide[aria-hidden="false"] .product-modal__overlay {
    animation: mmfadeIn 0.3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="false"] .product-modal__container {
    animation: mmslideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.micromodal-slide[aria-hidden="true"] .product-modal__overlay {
    animation: mmfadeOut 0.3s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.micromodal-slide[aria-hidden="true"] .product-modal__container {
    animation: mmslideOut 0.3s cubic-bezier(0, 0, 0.2, 1);
}

@keyframes mmfadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes mmslideOut {
    from { transform: translateY(0); }
    to { transform: translateY(-10%); }
}