/* Card Styles - Стили карточек ТРОН */

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    border: 1px solid #F0F0F0;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Поддержка обоих вариантов разметки:
   1) <img class="product-image" ...>
   2) <div class="product-image"><img ...></div>
*/
img.product-image,
.product-image {
    width: 100%;
    height: 250px;
    background-color: var(--tron-gray);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

/* Если внутри контейнера .product-image размещена картинка */
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* заполняем контейнер без отступов */
    display: block;
}

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-discount {
    background-color: var(--tron-blue);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.badge-delivery {
    background-color: white;
    color: var(--tron-text);
    border: 1px solid #E5E5E5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.badge-new {
    background-color: var(--tron-success);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.badge-sale {
    background-color: var(--tron-danger);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.product-info {
    padding: 20px;
    height: calc(100% - 200px);
    display: flex;
    flex-direction: column;
}

.product-sku {
    font-size: 12px;
    color: var(--tron-dark-gray);
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
}

.star {
    color: #FFD700;
    font-size: 14px;
}

.rating-text {
    font-size: 12px;
    color: var(--tron-dark-gray);
    margin-left: 5px;
}

.product-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--tron-text);
    margin-bottom: 15px;
    line-height: 1.4;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    margin-bottom: 15px;
}

.price-label {
    font-size: 12px;
    color: var(--tron-dark-gray);
    margin-bottom: 5px;
}

.current-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--tron-text);
    display: inline-block;
}

.old-price {
    font-size: 16px;
    color: var(--tron-dark-gray);
    text-decoration: line-through;
    margin-left: 10px;
}

.unit-selector {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.unit-btn {
    padding: 5px 12px;
    border: 1px solid #E5E5E5;
    background-color: white;
    border-radius: 15px;
    font-size: 12px;
    color: var(--tron-text);
    transition: all 0.3s ease;
    cursor: pointer;
}

.unit-btn:hover {
    border-color: var(--tron-blue);
    color: var(--tron-blue);
}

.unit-btn.active {
    background-color: var(--tron-blue);
    color: white;
    border-color: var(--tron-blue);
}

.add-to-cart-btn {
    width: 100%;
    background-color: var(--tron-blue);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.add-to-cart-btn:hover {
    background-color: var(--tron-dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* Promotional Cards */
.promo-card {
    background: linear-gradient(135deg, var(--tron-blue), #00CCFF);
    border-radius: 15px;
    padding: 30px;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.promo-card::before {
    content: none !important;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.promo-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.promo-description {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.promo-discount {
    font-size: 48px;
    font-weight: 800;
    margin: 20px 0;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.promo-image {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    max-width: 150px;
    max-height: 150px;
    opacity: 0.8;
    z-index: 1;
}

/* News Cards */
.news-card {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    height: 300px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px 20px 20px;
    color: white;
}

.news-date {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.news-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-link {
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.news-link:hover {
    color: var(--tron-light-blue);
}

/* Category Cards */
.category-card {
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #F0F0F0;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--tron-blue);
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--tron-blue), #00CCFF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--tron-text);
    margin-bottom: 10px;
}

.category-description {
    font-size: 14px;
    color: var(--tron-dark-gray);
    line-height: 1.5;
}

/* Testimonial Cards */
.testimonial-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    height: 100%;
}

.testimonial-quote {
    font-size: 16px;
    font-style: italic;
    color: var(--tron-text);
    margin-bottom: 20px;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tron-blue), #00CCFF);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
}

.author-info h6 {
    margin: 0;
    font-size: 16px;
    color: var(--tron-text);
}

.author-info p {
    margin: 0;
    font-size: 14px;
    color: var(--tron-dark-gray);
}

/* Card Headers */
.card-header {
    background: linear-gradient(135deg, var(--tron-light-blue), white);
    border-bottom: 1px solid #E5E5E5;
    padding: 20px;
    font-weight: 600;
    color: var(--tron-text);
}

.card-body {
    padding: 20px;
}

.card-footer {
    background-color: var(--tron-gray);
    border-top: 1px solid #E5E5E5;
    padding: 15px 20px;
}

/* Card Variants */
.card-outline {
    border: 2px solid var(--tron-blue);
    background: transparent;
}

.card-gradient {
    background: linear-gradient(135deg, var(--tron-light-blue), white);
}

.card-dark {
    background: #1a1a1a;
    color: white;
}

.card-dark .card-header {
    background: #2a2a2a;
    color: white;
}

/* Desktop: Цена и атрибуты в одну строку */
@media (min-width: 992px) {
    .product-price {
        display: inline-flex;
        flex-direction: column;
        margin-bottom: 15px;
        margin-right: 15px;
        vertical-align: top;
    }
    
    .unit-selector {
        display: inline-flex;
        gap: 5px;
        margin-bottom: 15px;
        vertical-align: top;
        flex-wrap: wrap;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 20px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .promo-card {
        padding: 20px;
        min-height: 150px;
    }
    
    .promo-title {
        font-size: 20px;
    }
    
    .promo-discount {
        font-size: 36px;
    }
    
    .news-card {
        height: 250px;
    }
    
    .category-card {
        padding: 20px 15px;
    }
    
    .testimonial-card {
        padding: 20px;
    }
}