@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.woo-product-card-container {
    font-family: 'Inter', sans-serif;
    position: relative;
    max-width: 360px;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 16px;
    margin: 16px auto;
    box-sizing: border-box;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.woo-product-card-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.woo-product-card-container * {
    box-sizing: border-box;
}

/* Card Top Badge */
.woo-card-top-badge {
    position: absolute;
    top: 0;
    left: 0;
    border-top-left-radius: 16px;
    border-bottom-right-radius: 16px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    z-index: 10;
    min-width: 72px;
    text-align: center;
    line-height: 1;
}

.woo-card-top-badge.badge-bestseller {
    background: #c3a13b; /* Gold */
}

.woo-card-top-badge.badge-new {
    background: #e60000; /* Red */
}

/* Image Wrapper */
.woo-card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.woo-card-main-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.3s ease;
}

.woo-product-card-container:hover .woo-card-main-image {
    transform: scale(1.02);
}

/* Out of Stock Image Overlay */
.woo-card-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 5;
}

.woo-card-overlay-text {
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Secondary Badges and Rating */
.woo-card-badges-rating-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    min-height: 24px;
}

.woo-card-secondary-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.woo-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    line-height: 1.2;
    text-transform: capitalize;
}

.badge-warranty {
    border: 1.2px solid #24b147;
    color: #24b147;
    background: rgba(36, 177, 71, 0.02);
}

.badge-redeem {
    border: 1.2px solid #ff7a00;
    color: #ff7a00;
    background: rgba(255, 122, 0, 0.02);
}

.badge-wholesale {
    border: 1.2px solid #0056b3;
    color: #0056b3;
    background: rgba(0, 86, 179, 0.02);
}

.badge-discount {
    border: 1.2px solid #d60000;
    color: #d60000;
    background: rgba(214, 0, 0, 0.02);
}

.woo-card-rating {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #666666;
    font-weight: 500;
}

.woo-card-star {
    color: #f5b041;
    margin-right: 3px;
    font-size: 14px;
    line-height: 1;
}

/* Title */
.woo-card-title {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.4;
    min-height: 66px;
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price */
.woo-card-price-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.woo-card-price-active {
    color: #d60000;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.woo-card-price-regular {
    color: #888888;
    font-size: 13px;
    text-decoration: line-through;
    margin-top: 2px;
    line-height: 1.2;
}

.woo-card-price-regular .woocommerce-Price-amount {
    color: inherit;
}

/* Swatches */
.woo-card-swatches-section {
    margin-bottom: 12px;
}

.woo-card-swatches-label {
    font-size: 12px;
    font-weight: 600;
    color: #002855;
    margin-bottom: 6px;
    display: block;
}

.woo-card-swatches-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.woo-card-swatch {
    width: 44px;
    height: 44px;
    border: 1.5px solid #eaeaea;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.2s ease;
}

.woo-card-swatch:hover {
    border-color: #cbd5e1;
}

.woo-card-swatch.active {
    border-color: #1a1a1a;
    border-width: 2px;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.woo-card-swatch img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* Info Box */
.woo-card-info-box {
    background: #f5f6f8;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.woo-card-info-desc {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    word-break: break-word;
}

.woo-card-info-stock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.woo-card-info-stock-label {
    color: #666666;
}

.woo-card-info-stock-value {
    font-weight: 600;
}

.woo-card-info-stock-value.stock-in {
    color: #24b147;
}

.woo-card-info-stock-value.stock-preorder {
    color: #0056b3;
}

.woo-card-info-stock-label.stock-preorder-label {
    color: #0056b3;
}

.woo-card-info-stock-value.stock-out {
    color: #d60000;
}

/* Controls row */
.woo-card-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.woo-card-qty-selector {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 24px;
    padding: 3px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #f5f6f8;
    color: #333333;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    padding: 0;
    line-height: 1;
}

.qty-btn:hover {
    background: #e2e8f0;
}

.qty-input {
    width: 32px;
    border: none;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    padding: 0;
    margin: 0 4px;
    background: transparent;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input:focus {
    outline: none;
}

/* Action buttons */
.woo-card-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease, transform 0.1s ease;
    padding: 0;
    color: #ffffff;
}

.woo-card-action-btn:active {
    transform: scale(0.95);
}

.woo-card-action-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.woo-card-action-btn.btn-cart {
    background: #24b147;
}

.woo-card-action-btn.btn-cart:hover {
    background: #1e993c;
    box-shadow: 0 4px 12px rgba(36, 177, 71, 0.3);
}

.woo-card-action-btn.btn-line {
    background: #06C755;
}

.woo-card-action-btn.btn-line:hover {
    background: #05b04b;
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
}

.woo-card-action-btn.btn-cart-disabled {
    background: #dcdcdc;
    color: #a0a0a0;
    cursor: not-allowed;
}

/* Success Overlay */
.woo-card-success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    border-radius: 16px;
}

.woo-product-card-container.show-success-overlay .woo-card-success-overlay {
    opacity: 1;
    pointer-events: auto;
}

.woo-card-success-message {
    text-align: center;
    transform: translateY(10px);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.woo-product-card-container.show-success-overlay .woo-card-success-message {
    transform: translateY(0);
}

.woo-card-success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #24b147;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 auto 10px auto;
    box-shadow: 0 4px 10px rgba(36, 177, 71, 0.2);
}

.woo-card-success-text {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
}
