/* Product Card Styling - Shared across all pages */

.product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: white;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.product-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card__image-container {
    position: relative;
    padding-top: 129%; /* Aspect ratio for 208x268 images */
    background: #f5f5f5;
    overflow: hidden;
}

.product-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.product-card__image.fade {
    opacity: 0;
}

/* Slideshow styles */
.product-card__slideshow-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    z-index: 10;
    transition: background-color 0.2s;
    border: none;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.product-card__slideshow-arrow:hover {
    background-color: #0056b3;
}

.product-card__slideshow-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.product-card__slideshow-arrow--prev {
    left: 10px;
}

.product-card__slideshow-arrow--next {
    right: 10px;
}

.product-card__color-count,
.product-card__color-name {
    position: absolute;
    top: 10px;
    background-color: rgba(0, 123, 255, 0.85);
    color: white;
    border-radius: 15px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1;
    line-height: 1.2;
    min-height: 28px;
}

.product-card__color-count {
    left: 10px;
}

.product-card__color-name {
    right: 10px;
    white-space: normal;
    max-height: 40px;
    overflow: hidden;
    text-align: center;
    max-width: 160px;
    display: block;
    justify-content: center;
}

.product-card__info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card__catalog {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.product-card__description {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1.1em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card__brand {
    color: #666;
    margin-bottom: 8px;
}

.product-card__price {
    color: #007bff;
}

/* Hide arrows on touch devices */
@media (hover: none) {
    .product-card__slideshow-arrow {
        display: none;
    }
}

/* Product Attributes */
.product-card__attributes {
    padding: 8px 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    background: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
}

.product-attribute-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.product-attribute-badge i {
    font-size: 12px;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .product-card__info {
        padding: 10px;
    }

    .product-card__description {
        font-size: 0.9rem;
    }

    .product-attribute-badge {
        font-size: 10px;
        padding: 3px 8px;
    }

    .product-attribute-badge i {
        font-size: 11px;
    }
}
