/**
 * MyShop Hasonló Termékek Widget - Eredeti színekkel és stílusokkal
 * Prefix: myshop-similar-* - Teljesen egyedi, de azonos megjelenés
 */

/* === ALAPVETŐ WIDGET BEÁLLÍTÁSOK === */
:root {
    --myshop-font-family: "Poppins", Sans-serif;
    --myshop-text-color: #070707;
    --myshop-primary-color: #c2d7f2;
    --myshop-secondary-color: #c2d7f2;
    --myshop-accent-color: #c2d7f2;
    --myshop-bg-color: #ffffff;
    --myshop-border-color: #f0f0f0;
    --myshop-shadow: 0 2px 8px rgba(0, 0, 0, 0.11);
    --myshop-border-radius: 8px;
    
    /* Egységes gomb stílusok - UGYANAZ mint az eredeti */
    --myshop-button-gradient: linear-gradient(90deg, #85b7f9, #5C73F2);
    --myshop-button-color: white;
    --myshop-button-font-family: "Poppins", Sans-serif;
    --myshop-button-padding: 12px 24px;
    --myshop-button-font-size: 15px;
    --myshop-button-font-weight: 600;
    --myshop-button-border-radius: 999px;
    --myshop-button-transition: opacity 0.3s ease;
}

.myshop-similar-widget-wrapper {
    margin: 40px 0;
    padding: 0;
    font-family: var(--myshop-font-family);
    color: var(--myshop-text-color);
}

.myshop-similar-widget-heading {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
}

/* === GRID RENDSZER - UGYANAZ mint az eredeti === */
.myshop-similar-items-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 4), 1fr);
    gap: 20px;
    margin: 20px 0;
    width: 100%;
}

/* === DINAMIKUS OSZLOP BEÁLLÍTÁSOK === */
.myshop-similar-items-grid[data-grid-columns="1"] {
    grid-template-columns: repeat(1, 1fr);
}

.myshop-similar-items-grid[data-grid-columns="2"] {
    grid-template-columns: repeat(4, 1fr);
}

.myshop-similar-items-grid[data-grid-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.myshop-similar-items-grid[data-grid-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.myshop-similar-items-grid[data-grid-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.myshop-similar-items-grid[data-grid-columns="6"] {
    grid-template-columns: repeat(6, 1fr);
}

/* === TERMÉK KÁRTYA ELEM - UGYANAZ mint az eredeti === */
.myshop-similar-item-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--myshop-border-radius);
    overflow: hidden;
    background-color: var(--myshop-bg-color);
    transition: all 0.3s ease;
    box-shadow: var(--myshop-shadow);
    height: 100%;
    position: relative;
}

.myshop-similar-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* === TERMÉK FOTÓ SZEKCIÓ - UGYANAZ mint az eredeti === */
.myshop-similar-item-photo {
    position: relative;
    overflow: hidden;
    background-color: #f8f9fa;
}

.myshop-similar-photo-link {
    display: block;
    width: 100%;
    height: 100%;
}

.myshop-similar-product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    border: none;
}

.myshop-similar-item-card:hover .myshop-similar-product-image {
    transform: scale(1.05);
}

.myshop-placeholder-img {
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === AKCIÓS JELVÉNY - PONTOSAN ugyanaz mint az eredeti === */
.myshop-similar-sale-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #ff4757;
    color: white;
    font-weight: 700;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
    font-family: var(--myshop-font-family);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid white;
    animation: myshop-pulse 2s infinite;
}

@keyframes myshop-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* === TERMÉK RÉSZLETEK SZEKCIÓ - UGYANAZ mint az eredeti === */
.myshop-similar-item-details {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.myshop-similar-item-name {
    font-size: 17px;
    font-weight: 500;
    color: var(--myshop-text-color);
    line-height: 26px;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.myshop-similar-name-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.myshop-similar-name-link:hover {
    color: #5C73F2;
}

/* === ÁR SZEKCIÓ - PONTOSAN ugyanaz mint az eredeti === */
.myshop-similar-price-box {
    display: flex;
    gap: 5px;
    align-items: center;
}

.myshop-similar-original-price {
    color: var(--myshop-text-color);
    font-weight: 700;
    font-size: 20px;
    font-family: var(--myshop-font-family);
}

.myshop-similar-current-price {
    font-weight: 800;
    color: #ff4757;
    font-size: 24px;
    font-family: var(--myshop-font-family);
    text-shadow: 0 1px 2px rgba(255, 71, 87, 0.2);
}

.myshop-similar-original-price[data-discounted="true"] {
    text-decoration: line-through;
    color: #999;
    font-weight: 500;
    font-size: 16px;
    opacity: 0.7;
}

.myshop-price-amount {
    font-weight: inherit;
    font-size: inherit;
}

.myshop-price-currency {
    font-size: 0.85em;
    margin-left: 2px;
}

.myshop-price-na {
    font-style: italic;
    color: #666;
    font-size: 14px;
}

/* === JELLEMZŐ CÍMKÉK - UGYANAZ mint az eredeti === */
.myshop-similar-feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.myshop-similar-feature-tag {
    background: var(--myshop-secondary-color);
    color: #070707;
    font-weight: 400;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.myshop-similar-custom-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.myshop-similar-custom-label {
    background-color: #e9ecef;
    color: var(--myshop-text-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.myshop-similar-variation-info {
    color: #6c757d;
    font-size: 12px;
    border-top: 1px solid var(--myshop-border-color);
    padding-top: 12px;
    margin: 12px 0 0 0;
    font-style: italic;
}

/* === GOMB STÍLUSOK - PONTOSAN ugyanaz mint az eredeti === */
.myshop-similar-item-action {
    padding: 0 20px 20px 20px;
    text-align: center;
}

.myshop-similar-view-btn {
    display: inline-block;
    background: var(--myshop-button-gradient);
    color: var(--myshop-button-color);
    font-family: var(--myshop-button-font-family);
    border: none;
    padding: var(--myshop-button-padding);
    font-size: var(--myshop-button-font-size);
    font-weight: 700;
    border-radius: var(--myshop-button-border-radius);
    transition: var(--myshop-button-transition);
    text-decoration: none;
    width: 100%;
    text-transform: unset;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.myshop-similar-view-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(92, 115, 242, 0.4);
    color: white;
}

/* === RESPONSIVE TERVEZÉS - UGYANAZ mint az eredeti === */
@media (max-width: 1200px) {
    .myshop-similar-items-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .myshop-similar-items-grid[data-grid-columns="5"],
    .myshop-similar-items-grid[data-grid-columns="6"] {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .myshop-similar-items-grid[data-grid-columns="4"],
    .myshop-similar-items-grid[data-grid-columns="5"],
    .myshop-similar-items-grid[data-grid-columns="6"] {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .myshop-similar-items-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
    
    .myshop-similar-widget-heading {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .myshop-similar-product-image {
        height: 200px;
    }
    
    .myshop-similar-item-details {
        padding: 15px;
    }
    
    .myshop-similar-item-name {
        font-size: 15px;
    }
    
    .myshop-similar-item-action {
        padding: 0 15px 15px 15px;
    }
    
    /* Mobil árak - UGYANAZ mint az eredeti */
    .myshop-similar-original-price {
        font-size: 18px;
    }
    
    .myshop-similar-current-price {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .myshop-similar-items-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }
    
    .myshop-similar-widget-wrapper {
        margin: 30px 0;
    }
    
    .myshop-similar-widget-heading {
        font-size: 18px;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .myshop-similar-product-image {
        height: 250px;
    }
    
    .myshop-similar-item-details {
        padding: 10px;
        gap: 8px;
    }
    
    .myshop-similar-item-name {
        font-size: 15px;
        -webkit-line-clamp: 3;
        line-height: 22px;
    }
    
    .myshop-similar-view-btn {
        font-size: 12px;
        padding: 13px 4px;
    }
    
    .myshop-similar-item-action {
        padding: 0 10px 10px 10px;
    }
    
    /* Extra kis képernyő árak - UGYANAZ mint az eredeti */
    .myshop-similar-price-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .myshop-similar-original-price {
        font-size: 14px;
    }
    
    .myshop-similar-current-price {
        font-size: 16px;
    }
    
    .myshop-similar-sale-badge {
        font-size: 10px;
        padding: 3px 6px;
        top: 8px;
        right: 8px;
    }
}

/* === RESPONSIVE OSZLOPOK - UGYANAZ mint az eredeti === */
.myshop-similar-items-grid[data-grid-columns="3"],
.myshop-similar-items-grid[data-grid-columns="4"],
.myshop-similar-items-grid[data-grid-columns="5"],
.myshop-similar-items-grid[data-grid-columns="6"] {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 480px) {
    .myshop-similar-items-grid[data-grid-columns="2"],
    .myshop-similar-items-grid[data-grid-columns="3"],
    .myshop-similar-items-grid[data-grid-columns="4"],
    .myshop-similar-items-grid[data-grid-columns="5"],
    .myshop-similar-items-grid[data-grid-columns="6"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === ANIMÁCIÓK - UGYANAZ mint az eredeti === */
@keyframes myshop-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.myshop-similar-item-card {
    animation: myshop-fadeInUp 0.6s ease forwards;
}

.myshop-similar-item-card:nth-child(even) {
    animation-delay: 0.1s;
}

.myshop-similar-item-card:nth-child(3n) {
    animation-delay: 0.2s;
}

/* === HOZZÁFÉRHETŐSÉG - UGYANAZ mint az eredeti === */
@media (prefers-reduced-motion: reduce) {
    .myshop-similar-item-card,
    .myshop-similar-product-image,
    .myshop-similar-view-btn,
    .myshop-similar-sale-badge,
    .myshop-similar-price-box {
        transition: none;
        animation: none;
    }
    
    .myshop-similar-item-card:hover {
        transform: none;
    }
    
    .myshop-similar-item-card:hover .myshop-similar-product-image {
        transform: none;
    }
}

/* Focus állapotok a hozzáférhetőséghez - UGYANAZ mint az eredeti */
.myshop-similar-view-btn:focus,
.myshop-similar-name-link:focus,
.myshop-similar-photo-link:focus {
    outline: 2px solid #5C73F2;
    outline-offset: 2px;
}