/* Основные стили карточки */
.product-card-inner {
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-inner:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

/* Стили для слайдера */
.product-slider-container {
    width: 100%;
    height: 280px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f5f5f5;
}

.product-slider {
    width: 100%;
    height: 100%;
    padding: 15px;
    box-sizing: border-box;
}

.swiper-wrapper {
    box-sizing: border-box;
    height: 100%;
}

.swiper-slide {
    width: 100% !important;
    height: 100% !important;
    margin-right: 0 !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    padding: 10px;
}

.product-slider:hover .product-image {
    transform: scale(1.05);
}

/* Пагинация (точки) */
.swiper-pagination {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(0,0,0,0.2);
    border-radius: 50%;
    opacity: 1;
    transition: all 0.3s ease;
    margin: 0 !important;
}

.swiper-pagination-bullet-active {
    background: var(--bs-primary);
    transform: scale(1.2);
}

/* Стили содержимого карточки */
.card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: center;
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

/* Варианты памяти */
.memory-variations {
    margin-bottom: 1rem;
}

.memory-variations label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    text-align: center;
}

.memory-variations .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

.memory-btn {
    min-width: 60px;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px !important;
}

.memory-btn.active {
    background-color: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
}

/* Варианты цвета */
.color-variations {
    margin-bottom: 1rem;
}

.color-variations label {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    text-align: center;
}

.color-variations .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.color-swatch {
    width: 28px;
    height: 28px;
    border: 2px solid transparent;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    outline: none;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--bs-primary);
}

.color-swatch[style*="#ffffff"],
.color-swatch[style*="#FFFFFF"] {
    border: 1px solid #ddd !important;
}

/* Подсказка с названием цвета */
.color-swatch::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
}

.color-swatch:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Блок с ценой и кнопкой */
.product-price-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
}

.product-price {
    color: var(--bs-primary);
    font-size: 1.2rem;
    font-weight: 600;
}
.add-to-cart {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    white-space: nowrap;
}
h1.text-center.mt-2.mb-2.font-medium {
    padding-top: 1em;
}

/* Адаптивность */
@media (max-width: 576px) {
    .product-slider-container {
        height: 220px;
    }

    .product-title {
        font-size: 1rem;
        min-height: 2.8rem;
    }
}

/* Блок "Почему выбирают оригинальные iPhone" */
.why-original {
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    border: 1px solid rgba(0,0,0,0.05);
}

.why-original .flex-shrink-0 {
    width: 48px;
    height: 48px;
    background-color: rgba(13,110,253,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .why-original {
        padding: 1.5rem !important;
    }

    .why-original .d-flex {
        flex-direction: column;
        text-align: center;
    }

    .why-original .flex-shrink-0 {
        margin: 0 auto 1rem auto !important;
    }
}

/* Стили для блока преимуществ */
.advantage-card {
    transition: transform 0.3s ease;
}

.advantage-card:hover {
    transform: translateY(-5px);
}

.icon-wrapper {
    transition: all 0.3s ease;
}

.advantage-card:hover .icon-wrapper {
    background-color: rgba(13, 110, 253, 0.2) !important;
}

.advantages .h1 {
    font-size: 2.5rem;
}