/**
 * Stand Up Now Apparel - Elementor Product Card & Grid Styles
 */

.suna-product-grid {
    display: grid;
    grid-template-columns: repeat(var(--suna-cols-desktop, 2), 1fr);
    gap: var(--suna-grid-gap, 30px);
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .suna-product-grid {
        grid-template-columns: repeat(var(--suna-cols-tablet, 2), 1fr);
    }
}

@media (max-width: 767px) {
    .suna-product-grid {
        grid-template-columns: repeat(var(--suna-cols-mobile, 1), 1fr);
    }
}

/* Card Container */
.suna-product-card {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 8px;
    position: relative;
    transition: all 0.3s ease;
}

/* Product Title */
.suna-product-card .suna-product-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    text-transform: uppercase;
    color: #111111;
    letter-spacing: 0.5px;
}

.suna-product-card .suna-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.suna-product-card .suna-product-title a:hover {
    color: #a86006;
}

/* Product Image Box */
.suna-product-card .suna-product-image-wrap {
    background-color: #f4f4f4;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
    aspect-ratio: 1 / 1;
}

.suna-product-card .suna-product-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.suna-product-card .suna-product-image-wrap:hover img {
    transform: scale(1.03);
}

.suna-product-card .suna-product-badge-sale {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #e74c3c;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 2;
}

/* Price */
.suna-product-card .suna-product-price {
    font-size: 26px;
    font-weight: 800;
    color: #111111;
    margin-bottom: 12px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    line-height: 1.2;
}

.suna-product-card .suna-product-price del {
    font-size: 18px;
    color: #888888;
    text-decoration: line-through;
    font-weight: 500;
}

.suna-product-card .suna-product-price ins {
    text-decoration: none;
    color: #111111;
}

/* Donation Badge Box matching exact reference layout */
.suna-product-card .suna-product-donation-badge {
    border: 1.5px solid #b87319;
    background-color: #fff9f2;
    border-radius: 4px;
    padding: 9px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.suna-product-card .suna-product-donation-badge .suna-badge-amount {
    color: #b87319;
    font-weight: 800;
}

.suna-product-card .suna-product-donation-badge .suna-badge-middle {
    color: #222222;
    font-weight: 800;
}

.suna-product-card .suna-product-donation-badge .suna-badge-org {
    color: #b87319;
    font-weight: 800;
}

/* Size / Swatches Selector */
.suna-product-card .suna-swatches-wrap {
    margin-bottom: 16px;
}

.suna-product-card .suna-swatch-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #666666;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.5px;
}

.suna-product-card .suna-swatch-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.suna-product-card .suna-swatch-btn {
    min-width: 38px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #dcdcdc;
    background-color: #ffffff;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    color: #333333;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
    box-sizing: border-box;
    outline: none;
    line-height: 1;
}

.suna-product-card .suna-swatch-btn:hover {
    border-color: #111111;
    color: #111111;
}

body .suna-product-card .suna-swatch-list button.suna-swatch-btn.is-selected,
body .suna-product-card .suna-swatch-list .suna-swatch-btn.is-selected {
    background-color: #111111 !important;
    color: #ffffff !important;
    border-color: #111111 !important;
    font-weight: 700 !important;
}

.suna-product-card .suna-swatch-btn.is-out-of-stock {
    opacity: 0.4;
    text-decoration: line-through;
    cursor: not-allowed;
}

/* Add to Cart Button */
.suna-product-card .suna-add-to-cart-wrap {
    margin-top: auto;
}

.suna-product-card .suna-add-to-cart-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ab620a;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 13px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    letter-spacing: 0.5px;
    text-decoration: none;
    box-sizing: border-box;
}

.suna-product-card .suna-add-to-cart-btn:hover {
    background-color: #8f5108;
    color: #ffffff;
}

.suna-product-card .suna-add-to-cart-btn:active {
    transform: translateY(1px);
}

.suna-product-card .suna-add-to-cart-btn.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.suna-product-card .suna-add-to-cart-btn.is-loading {
    opacity: 0.8;
    cursor: wait;
    position: relative;
}

.suna-product-card .suna-add-to-cart-btn.is-loading::after {
    content: "";
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: suna-spinner 0.6s linear infinite;
}

.suna-product-card .suna-add-to-cart-btn.is-added {
    background-color: #27ae60;
}

@keyframes suna-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Cart notification message */
.suna-product-card .suna-cart-notice {
    font-size: 12px;
    margin-top: 6px;
    text-align: center;
    display: none;
}
.suna-product-card .suna-cart-notice.is-success {
    display: none !important;
}
.suna-product-card .suna-cart-notice.is-error {
    display: block;
    color: #e74c3c;
    font-weight: 600;
}
