/* Univer Product Carousel - Version 2.1.5 - SVG Stars Fix */

/* Import Levenim Font */
@font-face {
    font-family: 'Levenim MT';
    src: url('../fonts/levenim-mt-2.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Levenim MT';
    src: url('../fonts/levenim-mt-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --upc-primary: #76ff9d;
    --upc-primary-hover: #5ef589;
    --upc-primary-shadow: #58d682;
    --upc-text-main: #0f172a;
    --upc-text-muted: #64748b;
    --upc-border: #f1f5f9;
    --upc-bg-card: #ffffff;
    --upc-font-family: 'Levenim MT', sans-serif;
}

.upc-carousel-container {
    font-family: var(--upc-font-family) !important;
    padding: 20px 0 60px 0 !important;
    background: #ffffff !important;
    width: 100% !important;
    overflow: visible !important;
}

/* Apply Levenim to all elements EXCEPT star ratings and icons */
.upc-carousel-container *:not(.star-rating):not(.star-rating *):not(i):not(.dashicons):not(.dashicons *):not(.upc-star):not(.upc-stars-container) {
    box-sizing: border-box !important;
    font-family: var(--upc-font-family) !important;
}

.upc-card {
    background: var(--upc-bg-card) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    border: 1px solid var(--upc-border) !important;
    min-height: 720px !important;
}

.upc-card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 10px !important;
    height: 40px !important;
    position: relative !important;
    z-index: 20 !important;
}

.upc-badge-discount {
    background: var(--upc-text-main) !important;
    color: #ffffff !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.product-labels.labels-rounded {
    position: relative !important;
    display: block !important;
}

.product-labels .product-label {
    display: block !important;
    max-width: 60px !important;
}

.product-labels img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 50% !important;
}

.upc-product-image {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    margin-bottom: 20px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    z-index: 1 !important;
    overflow: hidden !important;
}

.upc-product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

.upc-card-body {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

/* Product Title - RESPONSIVE ONE LINE with Ellipsis (Line Clamp) */
.upc-product-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--upc-text-main) !important;
    margin: 0 0 12px 0 !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-wrap: break-word !important;
}
}

.upc-product-title a {
    text-decoration: none !important;
    color: inherit !important;
}

.upc-rating {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin-bottom: 12px !important;
    min-height: 16px !important;
}

/* SVG STARS - GUARANTEED VISIBILITY */
.upc-stars-container {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    height: 16px !important;
}

.upc-star {
    width: 14px !important;
    height: 14px !important;
    display: inline-block !important;
    flex-shrink: 0 !important;
}

.upc-star-full {
    fill: #facc15 !important;
    stroke: #facc15 !important;
}

.upc-star-half {
    fill: none !important;
    stroke: #facc15 !important;
}

.upc-star-empty {
    fill: none !important;
    stroke: #cbd5e1 !important;
}

.upc-rating-count {
    font-size: 12px !important;
    color: var(--upc-text-muted) !important;
    white-space: nowrap !important;
}

/* Short Description - Formatting Support */
.upc-short-description {
    font-size: 13px !important;
    color: #475569 !important;
    line-height: 1.5 !important;
    margin-bottom: 20px !important;
    height: 98px !important;
    overflow: hidden !important;
    display: block !important;
    text-align: left !important;
}

/* Blindagem para tags internas (negrito, cores, etc) */
.upc-short-description * {
    display: inline !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Exceção para quebras de linha reais */
.upc-short-description br {
    display: block !important;
    content: "" !important;
    margin-top: 2px !important;
}

.upc-card-footer {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    margin-bottom: 15px !important;
    padding-top: 15px !important;
    border-top: 1px solid var(--upc-border) !important;
    margin-top: auto !important;
}

.upc-price-container {
    display: flex !important;
    flex-direction: column !important;
}

.upc-main-price {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: var(--upc-text-main) !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 4px !important;
    line-height: 1 !important;
}

.upc-currency {
    font-size: 14px !important;
    font-weight: 700 !important;
}

.upc-old-price {
    font-size: 13px !important;
    color: var(--upc-text-muted) !important;
    text-decoration: line-through !important;
    font-weight: 400 !important;
    margin-left: 5px !important;
}

.upc-installments {
    font-size: 12px !important;
    color: var(--upc-text-muted) !important;
    margin-top: 4px !important;
}

.upc-quantity-selector {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    border: 1px solid var(--upc-border) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    height: 36px !important;
    background: #ffffff !important;
}

.upc-qty-minus, .upc-qty-plus {
    background: #f8fafc !important;
    border: none !important;
    width: 30px !important;
    height: 36px !important;
    cursor: pointer !important;
    font-size: 18px !important;
    color: var(--upc-text-muted) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.upc-qty-input {
    width: 35px !important;
    height: 36px !important;
    border: none !important;
    border-left: 1px solid var(--upc-border) !important;
    border-right: 1px solid var(--upc-border) !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    background: #ffffff !important;
    color: var(--upc-text-main) !important;
}

.upc-actions {
    width: 100% !important;
}

.upc-add-to-cart-btn {
    display: block !important;
    width: 100% !important;
    background: var(--upc-primary) !important;
    color: var(--upc-text-main) !important;
    border: none !important;
    padding: 14px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: center !important;
    text-decoration: none !important;
    box-shadow: 0 4px 0 var(--upc-primary-shadow) !important;
    transition: all 0.2s !important;
}

.upc-add-to-cart-btn:hover {
    background: var(--upc-primary-hover) !important;
    transform: translateY(2px) !important;
    box-shadow: 0 2px 0 var(--upc-primary-shadow) !important;
}

.upc-carousel-container .swiper-pagination {
    bottom: 10px !important;
    display: flex !important;
    justify-content: center !important;
    gap: 12px !important;
}

.upc-carousel-container .swiper-pagination-bullet {
    width: 10px !important;
    height: 10px !important;
    background: #cbd5e1 !important;
    opacity: 1 !important;
    margin: 0 !important;
    transition: all 0.3s ease !important;
}

.upc-carousel-container .swiper-pagination-bullet-active {
    background: var(--upc-primary) !important;
    width: 24px !important;
    border-radius: 5px !important;
}

@media (max-width: 768px) {
    .upc-card {
        min-height: 680px !important;
    }
}

/* B2B Restricted Access */
.upc-user-logged-out .upc-price-container,
.upc-user-logged-out .upc-quantity-selector {
    display: none !important;
}
