/**
 * WPC Smart Wishlist Styles
 * Clean, modern design for product cards and wishlist page
 */

/* ===== Product Card Wishlist Button ===== */
.products .product {
    position: relative;
}

.products .product .woosw-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.products .product .woosw-btn:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.products .product .woosw-btn .woosw-btn-icon {
    font-size: 16px;
    color: #1d1d1f;
    transition: color 0.2s ease;
}

.products .product .woosw-btn:hover .woosw-btn-icon {
    color: #e74c3c;
}

/* Active/Added state */
.products .product .woosw-btn.woosw-added,
.products .product .woosw-btn.woosw-btn-added {
    background: #e74c3c;
}

.products .product .woosw-btn.woosw-added .woosw-btn-icon,
.products .product .woosw-btn.woosw-btn-added .woosw-btn-icon {
    color: #ffffff;
}

/* ===== Single Product Page Wishlist Button ===== */
.single-product .entry-summary .woosw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    margin-top: 4px;
}

.single-product .entry-summary .woosw-btn .woosw-btn-icon {
    font-size: 18px;
    color: #1d1d1f;
    transition: color 0.2s ease;
}

.single-product .entry-summary .woosw-btn:hover {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.single-product .entry-summary .woosw-btn:hover .woosw-btn-icon {
    color: #e74c3c;
}

/* Added state on single product */
.single-product .entry-summary .woosw-btn.woosw-added,
.single-product .entry-summary .woosw-btn.woosw-btn-added {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #ffffff;
}

.single-product .entry-summary .woosw-btn.woosw-added .woosw-btn-icon,
.single-product .entry-summary .woosw-btn.woosw-btn-added .woosw-btn-icon {
    color: #ffffff;
}

/* Add text label via CSS for icon-only buttons */
.single-product .entry-summary .woosw-btn.woosw-btn-icon-only::after {
    content: '加入收藏';
    font-size: 14px;
    font-weight: 500;
}

.single-product .entry-summary .woosw-btn.woosw-btn-icon-only.woosw-added::after,
.single-product .entry-summary .woosw-btn.woosw-btn-icon-only.woosw-btn-added::after {
    content: '已收藏';
}

/* ===== Wishlist Popup ===== */
.woosw-popup-content {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Popup Header */
.woosw-popup-content-top {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.woosw-popup-content-top .woosw-name {
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    flex: 1;
}

.woosw-popup-content-top .woosw-count-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: #cd5618;
    color: #ffffff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 16px;
}

.woosw-popup-content-top .woosw-popup-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #999;
    font-size: 20px;
    background: transparent;
}

.woosw-popup-content-top .woosw-popup-close::before {
    content: '✕';
    font-size: 16px;
}

/* Popup Middle - Items */
.woosw-popup-content-mid {
    padding: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.woosw-popup-content-mid .woosw-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.woosw-popup-content-mid .woosw-item {
    background: #fafafa;
    border-radius: 12px;
    overflow: hidden;
    transition: background 0.2s ease;
}

.woosw-popup-content-mid .woosw-item:hover {
    background: #f5f5f5;
}

.woosw-popup-content-mid .woosw-item-inner {
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 12px;
}

/* Popup Item Remove Button */
.woosw-popup-content-mid .woosw-item--remove {
    flex-shrink: 0;
}

.woosw-popup-content-mid .woosw-item--remove span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    cursor: pointer;
    color: #bbb;
    transition: color 0.2s ease;
}

.woosw-popup-content-mid .woosw-item--remove span::before {
    content: '✕';
    font-size: 14px;
}

.woosw-popup-content-mid .woosw-item--remove span:hover {
    color: #e74c3c;
}

/* Popup Item Image */
.woosw-popup-content-mid .woosw-item--image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.woosw-popup-content-mid .woosw-item--image a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

.woosw-popup-content-mid .woosw-item--image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    display: block;
}

/* Popup Item Info */
.woosw-popup-content-mid .woosw-item--info {
    flex: 1;
    min-width: 0;
}

.woosw-popup-content-mid .woosw-item--name {
    margin-bottom: 4px;
}

.woosw-popup-content-mid .woosw-item--name a {
    font-size: 14px;
    font-weight: 600;
    color: #1d1d1f;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.woosw-popup-content-mid .woosw-item--name a:hover {
    color: #cd5618;
}

.woosw-popup-content-mid .woosw-item--price {
    font-size: 14px;
    font-weight: 600;
    color: #cd5618;
}

.woosw-popup-content-mid .woosw-item--time {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* Popup Item Actions */
.woosw-popup-content-mid .woosw-item--actions {
    flex-shrink: 0;
}

.woosw-popup-content-mid .woosw-item--atc .button,
.woosw-popup-content-mid .woosw-item--atc a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: #1d1d1f;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.woosw-popup-content-mid .woosw-item--atc .button:hover,
.woosw-popup-content-mid .woosw-item--atc a.button:hover {
    background: #cd5618;
}

/* Popup Bottom */
.woosw-popup-content-bot {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.woosw-popup-content-bot-inner {
    display: flex;
    gap: 12px;
}

.woosw-popup-content-bot .woosw-page {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: #1d1d1f;
    color: #ffffff !important;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.woosw-popup-content-bot .woosw-page:hover {
    background: #cd5618;
}

.woosw-popup-content-bot .woosw-continue {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: transparent;
    color: #1d1d1f !important;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.woosw-popup-content-bot .woosw-continue:hover {
    border-color: #1d1d1f;
    background: #f5f5f5;
}

.woosw-popup-content-bot .woosw-notice {
    margin-top: 12px;
    font-size: 13px;
    color: #666;
    text-align: center;
}

.woosw-popup-content-bot .woosw-notice:empty {
    display: none;
}

/* ===== Wishlist Page in My Account ===== */
.woosw-list {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #e8e8e8;
}

/* Reset any plugin default borders/outlines */
.woosw-list *,
.woosw-list *:focus,
.woosw-list *:active {
    outline: none;
}

.woosw-item[style*="border"],
.woosw-items tr[style*="border"] {
    border: none !important;
}

/* Wishlist Table - Remove all borders and outlines */
.woosw-items {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    border: none !important;
    outline: none !important;
}

.woosw-items,
.woosw-items tbody,
.woosw-items tr,
.woosw-items td {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.woosw-items tr {
    transition: background 0.2s ease;
    border: none !important;
}

.woosw-items tr:hover {
    background: #fafafa;
}

.woosw-items td {
    padding: 24px 16px;
    vertical-align: middle;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.woosw-items tr:last-child td {
    border-bottom: none !important;
}

/* Remove focus outline on table row */
.woosw-item,
.woosw-item:focus,
.woosw-item:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Remove Button */
.woosw-item--remove {
    width: 50px;
    text-align: center;
    vertical-align: middle;
}

.woosw-item--remove span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #999;
    font-size: 18px;
}

.woosw-item--remove span::before {
    content: '✕';
    font-size: 18px;
    font-weight: 400;
}

.woosw-item--remove span:hover {
    color: #e74c3c;
}

/* Product Image */
.woosw-item--image {
    width: 100px;
}

.woosw-item--image a {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease;
}

.woosw-item--image a:hover {
    transform: scale(1.03);
}

.woosw-item--image img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    display: block;
}

/* Product Info */
.woosw-item--info {
    padding-left: 20px !important;
}

.woosw-item--name {
    margin-bottom: 8px;
}

.woosw-item--name a {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1f;
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.woosw-item--name a:hover {
    color: #cd5618;
}

.woosw-item--price {
    font-size: 16px;
    font-weight: 600;
    color: #cd5618;
    margin-bottom: 6px;
}

.woosw-item--time {
    font-size: 13px;
    color: #999;
}

/* Actions Column */
.woosw-item--actions {
    text-align: right;
    min-width: 140px;
}

.woosw-item--atc .button,
.woosw-item--atc a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: #1d1d1f;
    color: #ffffff !important;
    border: none !important;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 48px;
}

.woosw-item--atc .button:hover,
.woosw-item--atc a.button:hover {
    background: #cd5618;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(205, 86, 24, 0.3);
}

/* Wishlist Actions (Copy URL section) */
.woosw-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.woosw-copy {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.woosw-copy-label {
    font-size: 13px;
    font-weight: 500;
    color: #666;
}

.woosw-copy-url {
    flex: 1;
    min-width: 200px;
}

.woosw-copy-url input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    background: #f9f9f9;
}

.woosw-copy-btn button {
    padding: 10px 20px;
    background: #f5f5f5;
    color: #1d1d1f;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.woosw-copy-btn button:hover {
    background: #1d1d1f;
    color: #ffffff;
    border-color: #1d1d1f;
}

/* Stock Status */
.woosw-item--stock {
    font-size: 12px;
    margin-bottom: 8px;
}

.woosw-item--stock .in-stock {
    color: #22c55e;
}

.woosw-item--stock .out-of-stock {
    color: #e74c3c;
}

/* Empty Wishlist State */
.woosw-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.woosw-empty::before {
    content: '♡';
    display: block;
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .woosw-list {
        padding: 16px;
        border-radius: 12px;
    }
    
    .woosw-items td {
        padding: 16px 10px;
    }
    
    .woosw-item--image img {
        width: 70px;
        height: 70px;
    }
    
    .woosw-item--name a {
        font-size: 14px;
    }
    
    .woosw-item--price {
        font-size: 14px;
    }
    
    .woosw-item--atc .button,
    .woosw-item--atc a.button {
        padding: 12px 20px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .woosw-copy {
        flex-direction: column;
        align-items: stretch;
    }
    
    .woosw-copy-url {
        min-width: 100%;
    }
    
    .products .product .woosw-btn {
        width: 32px;
        height: 32px;
        top: 8px;
        right: 8px;
    }
    
    .products .product .woosw-btn .woosw-btn-icon {
        font-size: 14px;
    }
}
