/**
 * Wishlist Frontend Styles
 */

/* Wishlist Button */
.wwl-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: 2px solid #9d4edd;
    background: transparent;
    color: #9d4edd;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 10px 0;
}

.wwl-button:hover {
    background: #9d4edd;
    color: #fff;
}

.wwl-button.wwl-in-wishlist {
    background: linear-gradient(135deg, #9d4edd 0%, #7b2cbf 100%);
    color: #fff;
    border-color: #9d4edd;
}

.wwl-button.wwl-in-wishlist:hover {
    background: linear-gradient(135deg, #7b2cbf 0%, #5a189a 100%);
}

.wwl-button .wwl-icon {
    display: flex;
    align-items: center;
}

.wwl-button .wwl-icon svg {
    transition: transform 0.3s ease;
}

.wwl-button:hover .wwl-icon svg {
    transform: scale(1.1);
}

.wwl-button.wwl-in-wishlist .wwl-icon svg {
    fill: currentColor;
}

.wwl-button.wwl-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Loop Button (on archive/shop) */
.wwl-button-loop {
    padding: 8px 14px;
    font-size: 12px;
}

.wwl-button-loop .wwl-text {
    display: none;
}

@media (min-width: 768px) {
    .wwl-button-loop .wwl-text {
        display: inline;
    }
}

/* Wishlist Page */
.wwl-wishlist-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.wwl-shared-notice {
    background: linear-gradient(135deg, #f0f6fc 0%, #e8f4fd 100%);
    border-left: 4px solid #9d4edd;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
}

.wwl-shared-notice p {
    margin: 0;
    color: #5a189a;
}

/* Actions Bar */
.wwl-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.wwl-actions-left .wwl-count {
    color: #666;
    font-size: 14px;
}

.wwl-actions-right {
    display: flex;
    gap: 10px;
}

/* Wishlist Grid */
.wwl-wishlist-grid {
    display: grid;
    gap: 25px;
}

.wwl-columns-2 { grid-template-columns: repeat(2, 1fr); }
.wwl-columns-3 { grid-template-columns: repeat(3, 1fr); }
.wwl-columns-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .wwl-columns-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .wwl-columns-3,
    .wwl-columns-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .wwl-columns-2,
    .wwl-columns-3,
    .wwl-columns-4 { grid-template-columns: 1fr; }
}

/* Wishlist Item */
.wwl-wishlist-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wwl-wishlist-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.wwl-remove-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.wwl-wishlist-item:hover .wwl-remove-item {
    opacity: 1;
}

.wwl-remove-item:hover {
    background: #ff4444;
    color: #fff;
}

.wwl-item-image {
    position: relative;
    overflow: hidden;
}

.wwl-item-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.wwl-wishlist-item:hover .wwl-item-image img {
    transform: scale(1.05);
}

.wwl-out-of-stock {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.wwl-item-details {
    padding: 18px;
}

.wwl-item-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
}

.wwl-item-title a {
    color: #333;
    text-decoration: none;
}

.wwl-item-title a:hover {
    color: #9d4edd;
}

.wwl-item-price {
    font-size: 18px;
    font-weight: bold;
    color: #9d4edd;
    margin-bottom: 10px;
}

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

.wwl-item-meta {
    color: #999;
    font-size: 12px;
    margin-bottom: 15px;
}

.wwl-item-actions {
    display: flex;
    gap: 10px;
}

.wwl-add-to-cart-btn {
    flex: 1;
    padding: 10px 15px;
    background: linear-gradient(135deg, #9d4edd 0%, #7b2cbf 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wwl-add-to-cart-btn:hover {
    background: linear-gradient(135deg, #7b2cbf 0%, #5a189a 100%);
}

.wwl-unavailable {
    color: #dc3545;
    font-size: 14px;
}

/* Empty Wishlist */
.wwl-wishlist-empty {
    text-align: center;
    padding: 60px 20px;
}

.wwl-empty-icon {
    color: #ddd;
    margin-bottom: 20px;
}

.wwl-wishlist-empty h3 {
    color: #333;
    margin: 0 0 10px 0;
}

.wwl-wishlist-empty p {
    color: #666;
    margin: 0 0 25px 0;
}

.wwl-button-shop {
    background: linear-gradient(135deg, #9d4edd 0%, #7b2cbf 100%);
    color: #fff !important;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

/* Share Modal */
.wwl-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wwl-modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    padding: 30px;
    position: relative;
}

.wwl-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

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

.wwl-modal h3 {
    margin: 0 0 10px 0;
}

.wwl-share-input-wrap {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.wwl-share-input-wrap input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.wwl-share-social {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.wwl-share-social a {
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
}

.wwl-share-facebook {
    background: #1877f2;
    color: #fff !important;
}

.wwl-share-twitter {
    background: #1da1f2;
    color: #fff !important;
}

.wwl-share-email {
    background: #666;
    color: #fff !important;
}

/* Header Counter - Floating Wishlist Button */
.wwl-header-counter {
    position: fixed;
    bottom: 90px; /* Above chatbot button */
    right: 20px;
    z-index: 9998; /* Below chatbot */
}

.wwl-header-counter a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #9d4edd 0%, #7b2cbf 100%);
    color: #fff;
    border-radius: 50%;
    text-decoration: none;
    position: relative;
    box-shadow: 0 4px 15px rgba(157, 78, 221, 0.4);
}

.wwl-counter-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast Notification */
.wwl-toast {
    position: fixed;
    bottom: 150px; /* Above both buttons */
    right: 20px;
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 99999;
    animation: wwl-toast-in 0.3s ease;
}

.wwl-toast.wwl-toast-success {
    background: #28a745;
}

.wwl-toast.wwl-toast-error {
    background: #dc3545;
}

@keyframes wwl-toast-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading animation */
.wwl-button.wwl-loading .wwl-icon svg {
    animation: wwl-spin 1s linear infinite;
}

@keyframes wwl-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
