/* ==========================================================================
   Favorites Drawer
   ========================================================================== */

.vane-favorites-drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0.3s ease;
}

.vane-favorites-drawer--open {
    pointer-events: auto;
    visibility: visible;
}

/* Overlay */
.vane-favorites-drawer__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.3s ease;
}

.vane-favorites-drawer--open .vane-favorites-drawer__overlay {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Panel - slides from RIGHT */
.vane-favorites-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 480px;
    max-width: 95%;
    height: 100%;
    background-color: var(--vane-white);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vane-favorites-drawer--open .vane-favorites-drawer__panel {
    transform: translateX(0);
}

/* Header */
.vane-favorites-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.vane-favorites-drawer__title {
    font-family: var(--vane-font-primary);
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    color: var(--vane-black);
}

.vane-favorites-drawer__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.vane-favorites-drawer__close svg {
    width: 24px;
    height: 24px;
    stroke: var(--vane-black);
}

/* Content (scrollable) */
.vane-favorites-drawer__content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Empty state */
.vane-favorites-drawer__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 30px;
    text-align: center;
    height: 100%;
}

.vane-favorites-drawer__empty svg {
    width: 64px;
    height: 64px;
    stroke: #ccc;
    margin-bottom: 20px;
}

.vane-favorites-drawer__empty p {
    font-family: var(--vane-font-primary);
    font-size: 16px;
    color: #666;
    margin: 0 0 25px;
}

.vane-favorites-drawer__shop-btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--vane-font-primary);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    color: var(--vane-white);
    background-color: var(--vane-black);
    border: none;
    border-radius: 30px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.vane-favorites-drawer__shop-btn:hover {
    opacity: 0.8;
    color: var(--vane-white);
}

/* Favorites items list */
.vane-favorites-drawer__items {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Single favorites item */
.vane-favorites-drawer__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    position: relative;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, filter 0.2s ease-out;
}

.vane-favorites-drawer__item::after {
    content: none;
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    width: auto;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.06);
    transform: none;
}

.vane-favorites-drawer__item:last-child::after {
    display: none;
}

.vane-favorites-drawer__item--pending {
    opacity: 0.42;
    transform: scale(0.985);
    filter: saturate(0.72);
    pointer-events: none;
}

.vane-favorites-drawer__item-image {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
    max-width: 72px;
    max-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border-radius: 4px;
    overflow: hidden;
}

.vane-favorites-drawer__item-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.vane-favorites-drawer__item-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    max-width: 100%;
    max-height: 100%;
}

.vane-favorites-drawer__item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vane-favorites-drawer__item-name {
    font-family: var(--vane-font-primary);
    font-size: 14px;
    font-weight: 600;
    color: var(--vane-black);
    text-decoration: none;
    text-transform: uppercase;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vane-favorites-drawer__item-name:hover {
    text-decoration: underline;
}

.vane-favorites-drawer__item-bottom {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    margin-top: 5px;
}

.vane-favorites-drawer__item-price {
    font-family: var(--vane-font-primary);
    font-size: 16px;
    font-weight: 300;
    color: var(--vane-black);
    margin: 0;
    white-space: nowrap;
    line-height: 1;
    text-align: left;
}

/* Remove button */
.vane-favorites-drawer__item-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.vane-favorites-drawer__item-remove:hover {
    opacity: 1;
}

.vane-favorites-drawer__item-remove svg {
    width: 16px;
    height: 16px;
    stroke: var(--vane-black);
}

/* Footer */
.vane-favorites-drawer__footer {
    flex-shrink: 0;
    padding: 20px 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background-color: var(--vane-white);
}

.vane-favorites-drawer__add-all-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-family: var(--vane-font-primary);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
    color: var(--vane-white);
    background-color: var(--vane-black);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.vane-favorites-drawer__add-all-btn:hover {
    opacity: 0.85;
}

/* Body scroll lock */
body.vane-favorites-open {
    overflow: hidden;
}

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

@media (max-width: 480px) {
    .vane-favorites-drawer__panel {
        width: 100%;
        max-width: 100%;
    }

    .vane-favorites-drawer__header {
        padding: 15px 20px;
    }

    .vane-favorites-drawer__item {
        padding: 15px 20px;
    }

    .vane-favorites-drawer__item-image {
        width: 70px;
        height: 70px;
        min-width: 70px;
        min-height: 70px;
        max-width: 70px;
        max-height: 70px;
    }

    .vane-favorites-drawer__footer {
        padding: 15px 20px;
    }

}

/* Admin bar offset */
.admin-bar .vane-favorites-drawer__panel {
    padding-top: 32px;
}

@media (max-width: 782px) {
    .admin-bar .vane-favorites-drawer__panel {
        padding-top: 46px;
    }
}
