/**
 * Dierenkanjer Wishlist Styles
 * Colors: Wishlist coral #FA7171, Primary teal #55cca8, Cart lime #B9C725
 */

/* ========================================
   Heart Button (Single Product Page)
   ======================================== */

.dk-add-to-wishlist {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    transition: transform 0.2s ease;
}

.dk-add-to-wishlist:hover {
    transform: scale(1.05);
}

.dk-add-to-wishlist:focus {
    outline: none;
}

.dk-add-to-wishlist svg.heart-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
}

.dk-add-to-wishlist .heart-icon {
    position: relative;
    z-index: 1;
    color: white;
    width: 20px;
    height: 20px;
    stroke-width: 2;
    transition: all 0.2s ease;
}

.dk-add-to-wishlist.in-wishlist .heart-icon {
    fill: white;
}

.dk-add-to-wishlist .dk-wishlist-loading {
    display: none;
    position: absolute;
    z-index: 2;
}

.dk-add-to-wishlist.loading .dk-wishlist-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dk-add-to-wishlist.loading .heart-icon {
    display: none;
}

.dk-add-to-wishlist .spinner {
    width: 20px;
    height: 20px;
    animation: dk-spin 1s linear infinite;
}

.dk-add-to-wishlist .spinner-circle {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: dk-dash 1.5s ease-in-out infinite;
    stroke: white;
}

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

@keyframes dk-dash {
    0% {
        stroke-dashoffset: 50;
    }
    50% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -50;
    }
}

/* ========================================
   Wishlist Page (MyAccount)
   ======================================== */

.dk-wishlist-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.dk-wishlist-actions button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dk-share-wishlist {
    background: #f5f5f5;
    color: #333;
}

.dk-share-wishlist:hover {
    background: #e8e8e8;
}

.dk-add-all-to-cart {
    background: #B9C725;
    color: white;
}

.dk-add-all-to-cart:hover {
    background: #a5b121;
}

.dk-wishlist-actions button svg {
    width: 18px;
    height: 18px;
}

/* Wishlist Items */
.dk-wishlist-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dk-wishlist-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease;
}

.dk-wishlist-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dk-wishlist-item .product-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.dk-wishlist-item .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dk-wishlist-item .product-details {
    flex-grow: 1;
    min-width: 0;
}

.dk-wishlist-item .product-title {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.4;
}

.dk-wishlist-item .product-title:hover {
    color: #55cca8;
}

.dk-wishlist-item .product-price {
    font-size: 18px;
    font-weight: bold;
    color: #55cca8;
    margin-bottom: 5px;
}

.dk-wishlist-item .product-price del {
    color: #999;
    font-size: 14px;
    font-weight: normal;
}

.dk-wishlist-item .product-price ins {
    text-decoration: none;
}

.dk-wishlist-item .in-stock {
    color: #55cca8;
    font-size: 13px;
}

.dk-wishlist-item .out-of-stock {
    color: #FA7171;
    font-size: 13px;
}

.dk-wishlist-item .product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
    flex-shrink: 0;
}

.dk-add-item-to-cart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #B9C725;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dk-add-item-to-cart:hover {
    background: #a5b121;
}

.dk-add-item-to-cart svg {
    width: 16px;
    height: 16px;
}

.dk-remove-from-wishlist {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.dk-remove-from-wishlist:hover {
    color: #FA7171;
    background: rgba(250, 113, 113, 0.1);
}

.dk-remove-from-wishlist svg {
    width: 18px;
    height: 18px;
}

/* Out of stock notice */
.dk-out-of-stock-notice {
    display: inline-flex;
    align-items: center;
    color: #FA7171;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 16px;
    background: rgba(250, 113, 113, 0.1);
    border-radius: 6px;
}

/* View product link (for variable products) */
.dk-view-product-link {
    text-decoration: none;
}

/* Empty Wishlist */
.dk-wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 8px;
}

.dk-wishlist-empty svg[data-feather="heart"] {
    width: 60px;
    height: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

.dk-wishlist-empty p {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.dk-wishlist-empty p.sub {
    font-size: 14px;
    color: #999;
    margin-bottom: 25px;
}

.dk-wishlist-empty .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #55cca8;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.dk-wishlist-empty .button:hover {
    background: #41c69e;
}

.dk-wishlist-empty .button svg {
    width: 18px;
    height: 18px;
}

/* Menu count badge */
.dk-wishlist-menu-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #FA7171;
    color: white;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

/* ========================================
   Share Modal
   ======================================== */

.dk-share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.dk-share-modal.active {
    display: flex;
}

.dk-share-modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 450px;
    width: 100%;
    position: relative;
}

.dk-share-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 5px;
}

.dk-share-modal-close:hover {
    color: #333;
}

.dk-share-modal h3 {
    margin: 0 0 10px;
    font-size: 20px;
}

.dk-share-modal p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.dk-share-input-wrapper {
    display: flex;
    gap: 10px;
}

.dk-share-input-wrapper input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #f9f9f9;
}

.dk-copy-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #55cca8;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.dk-copy-link:hover {
    background: #41c69e;
}

.dk-copy-link svg {
    width: 16px;
    height: 16px;
}

.dk-copy-success {
    color: #55cca8;
    font-weight: 600;
    margin-top: 15px !important;
    margin-bottom: 0 !important;
}

/* ========================================
   Shared Wishlist Page
   ======================================== */

.dk-shared-wishlist-page {
    padding: 50px 0 80px;
    min-height: 60vh;
    background: #ffffff;
}

/* Override theme's .wrapper flex layout for shared wishlist page */
.dk-shared-wishlist-page > .wrapper {
    display: block;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.dk-shared-wishlist-header {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dk-shared-wishlist-header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 28px;
    margin: 0 0 15px 0;
    color: #333;
}

.dk-shared-wishlist-header h1 svg {
    color: #FA7171;
    width: 32px;
    height: 32px;
    fill: #FA7171;
}

.dk-shared-wishlist-intro {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.dk-shared-wishlist-actions {
    text-align: center;
    margin-bottom: 25px;
}

.dk-shared-wishlist-actions .dk-add-all-to-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #B9C725;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(185, 199, 37, 0.3);
}

.dk-shared-wishlist-actions .dk-add-all-to-cart:hover {
    background: #a5b121;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(185, 199, 37, 0.4);
}

.dk-shared-wishlist-actions .dk-add-all-to-cart svg {
    width: 18px;
    height: 18px;
}

/* Shared items styling */
.dk-shared-items .dk-wishlist-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dk-shared-items .product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.dk-shared-items .dk-add-item-to-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #B9C725;
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.dk-shared-items .dk-add-item-to-cart:hover {
    background: #a5b121;
    color: white;
}

.dk-shared-items .dk-add-item-to-cart svg {
    width: 16px;
    height: 16px;
}

.dk-shared-wishlist-cta {
    text-align: center;
    margin-top: 40px;
    padding: 35px 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.dk-shared-wishlist-cta p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 16px;
}

.dk-shared-wishlist-cta .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #55cca8;
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s ease;
}

.dk-shared-wishlist-cta .button:hover {
    background: #41c69e;
    color: white;
}

.dk-shared-wishlist-cta .button svg {
    width: 18px;
    height: 18px;
}

.dk-view-product {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #55cca8;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.dk-view-product:hover {
    color: #41c69e;
    background: rgba(85, 204, 168, 0.1);
}

.dk-view-product svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   Toast Notifications
   ======================================== */

.dk-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 99999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 350px;
}

.dk-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.dk-toast.success {
    background: #55cca8;
}

.dk-toast.error {
    background: #FA7171;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .dk-wishlist-item {
        flex-wrap: wrap;
        padding: 15px;
    }

    .dk-wishlist-item .product-image {
        width: 80px;
        height: 80px;
    }

    .dk-wishlist-item .product-details {
        flex: 1;
        min-width: calc(100% - 100px);
    }

    .dk-wishlist-item .product-title {
        font-size: 14px;
    }

    .dk-wishlist-item .product-price {
        font-size: 16px;
    }

    .dk-wishlist-item .product-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #f0f0f0;
    }

    .dk-wishlist-actions {
        flex-direction: column;
    }

    .dk-wishlist-actions button {
        width: 100%;
        justify-content: center;
    }

    .dk-share-input-wrapper {
        flex-direction: column;
    }

    /* Shared wishlist responsive */
    .dk-shared-wishlist-page {
        padding: 30px 0 60px;
    }

    .dk-shared-wishlist-header {
        padding: 25px 20px;
        margin-bottom: 25px;
    }

    .dk-shared-wishlist-header h1 {
        font-size: 22px;
        flex-direction: column;
        gap: 8px;
    }

    .dk-shared-wishlist-header h1 svg {
        width: 28px;
        height: 28px;
    }

    .dk-shared-wishlist-intro {
        font-size: 14px;
    }

    .dk-shared-wishlist-actions .dk-add-all-to-cart {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .dk-shared-items .product-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .dk-shared-items .dk-add-item-to-cart {
        justify-content: center;
        width: 100%;
    }

    .dk-shared-items .dk-view-product {
        justify-content: center;
        width: 100%;
    }

    .dk-shared-wishlist-cta {
        padding: 25px 20px;
        margin-top: 30px;
    }

    .dk-shared-wishlist-cta p {
        font-size: 14px;
    }

    .dk-shared-wishlist-cta .button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dk-wishlist-item .product-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .dk-add-item-to-cart {
        justify-content: center;
    }

    .dk-remove-from-wishlist {
        align-self: flex-end;
    }

    .dk-shared-wishlist-header h1 {
        font-size: 20px;
    }
}

/* ========================================
   Standalone Wishlist Page (/verlanglijst/)
   ======================================== */

.dk-standalone-wishlist-page {
    padding: 40px 0;
    min-height: 60vh;
    background: #ffffff;
}

/* Override theme's .wrapper flex layout for wishlist page */
.dk-standalone-wishlist-page > .wrapper {
    display: block;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.dk-standalone-header {
    text-align: center;
    margin-bottom: 30px;
}

.dk-standalone-header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 28px;
    margin-bottom: 10px;
}

.dk-standalone-header h1 svg {
    color: #FA7171;
    width: 32px;
    height: 32px;
}

.dk-standalone-header p {
    margin: 0;
}

.dk-standalone-header p a {
    color: #55cca8;
    text-decoration: none;
}

.dk-standalone-header p a:hover {
    text-decoration: underline;
}

.dk-login-notice {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 8px;
    text-align: center;
    border: 1px dashed #ddd;
}

.dk-login-notice p {
    margin-bottom: 15px;
    color: #666;
}

.dk-login-notice .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #55cca8;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.dk-login-notice .button:hover {
    background: #41c69e;
}
