.aps-wcs-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease-out;
}

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

.aps-wcs-modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 30px;
    border-radius: 12px;
    width: 95%;
    max-width: 1200px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.aps-wcs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.aps-wcs-modal-header h2 {
    margin: 0;
    font-size: 2em;
    color: #333;
    font-weight: 600;
}

.aps-wcs-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    padding: 8px;
    color: #666;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aps-wcs-modal-close:hover {
    color: #333;
    background-color: #f5f5f5;
    transform: scale(1.1);
}

.aps-wcs-search-container {
    margin-bottom: 30px;
    position: relative;
}

#aps-wcs-product-search {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

#aps-wcs-product-search:focus {
    border-color: #01BCC6;
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(1, 188, 198, 0.1);
}

.aps-wcs-products-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.aps-wcs-product-item {
    border: 1px solid #eee;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    background: #fff;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.aps-wcs-product-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #01BCC6;
}

.aps-wcs-product-image {
    margin-bottom: 20px;
    text-align: center;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
    border-radius: 8px;
    overflow: hidden;
}

.aps-wcs-product-image img {
    max-width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.aps-wcs-product-item:hover .aps-wcs-product-image img {
    transform: scale(1.05);
}

.aps-wcs-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    color: #ccc;
    font-size: 48px;
}

.aps-wcs-product-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    min-height: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.aps-wcs-product-price {
    margin-bottom: 25px;
    color: #333;
    font-size: 18px;
    font-weight: 700;
}

.aps-wcs-product-price .subscription-price {
    color: #01BCC6;
    font-weight: 700;
    font-size: 18px;
    background-color: rgba(1, 188, 198, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
}

.aps-wcs-add-btn {
    background: linear-gradient(135deg, #01BCC6 0%, #00a3ac 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.aps-wcs-add-btn:hover {
    background: linear-gradient(135deg, #00a3ac 0%, #008a93 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(1, 188, 198, 0.3);
}

.aps-wcs-add-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.aps-wcs-add-btn.aps-wcs-added {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.aps-wcs-add-btn.aps-wcs-error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.aps-wcs-loading {
    text-align: center;
    padding: 40px;
}

.aps-wcs-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #01BCC6;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.aps-wcs-no-products,
.aps-wcs-error {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.aps-wcs-no-products i,
.aps-wcs-error i {
    font-size: 48px;
    color: #ccc;
}

.aps-wcs-no-products p,
.aps-wcs-error p {
    margin: 0;
    font-size: 16px;
}

/* Notification styles */
.aps-wcs-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000000;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.aps-wcs-notification-show {
    transform: translateX(0);
}

.aps-wcs-notification-success {
    border-left: 4px solid #28a745;
}

.aps-wcs-notification-error {
    border-left: 4px solid #dc3545;
}

.aps-wcs-notification i {
    font-size: 20px;
}

.aps-wcs-notification-success i {
    color: #28a745;
}

.aps-wcs-notification-error i {
    color: #dc3545;
}

.aps-wcs-notification span {
    font-weight: 500;
    color: #333;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .aps-wcs-products-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media screen and (max-width: 768px) {
    .aps-wcs-modal-content {
        margin: 5% auto;
        padding: 20px;
        width: 95%;
    }

    .aps-wcs-modal-header h2 {
        font-size: 1.5em;
    }

    .aps-wcs-products-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .aps-wcs-product-item {
        padding: 20px;
    }

    .aps-wcs-product-image {
        min-height: 180px;
    }

    .aps-wcs-product-image img {
        max-height: 180px;
    }

    .aps-wcs-add-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .aps-wcs-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }

    .aps-wcs-notification-show {
        transform: translateY(0);
    }
}

@media screen and (max-width: 480px) {
    .aps-wcs-products-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .aps-wcs-modal-header h2 {
        font-size: 1.3em;
    }

    .aps-wcs-product-item {
        padding: 15px;
    }

    .aps-wcs-product-image {
        min-height: 150px;
    }

    .aps-wcs-product-image img {
        max-height: 150px;
    }
}

/* Remove old SKU styles */
.aps-wcs-product-sku {
    display: none;
}

/* Icon animations */
.bb-icon-spin {
    animation: spin 1s linear infinite;
}

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

.tm3-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.tm3-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.tm3-product-search {
    margin-bottom: 20px;
}

.tm3-product-search input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.tm3-product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.tm3-product-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.tm3-product-image {
    margin-bottom: 10px;
}

.tm3-product-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.tm3-product-info h4 {
    margin: 0 0 10px;
    font-size: 16px;
}

.tm3-product-price {
    margin-bottom: 15px;
    color: #666;
}

.tm3-add-product-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.tm3-add-product-btn:hover {
    background: #005177;
}

.tm3-add-product-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.tm3-add-to-subscription-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 16px;
    text-decoration: none;
}

.tm3-add-to-subscription-btn:hover {
    background: #005177;
    color: #fff;
    text-decoration: none;
} 