/**
 * Product Set Composition Styles
 * Stylowanie przycisku "Zobacz skład zestawu" i sekcji składu
 */

/* ========================================
   Button: Zobacz skład zestawu
   ======================================== */

.merida-set-details-button-container {
    margin: 20px 0;
}

.merida-set-details-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 24px;
    background-color: #fff;
    border: 1px solid #DADADA;
    border-radius: 4px;
    color: #000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.merida-set-details-button:hover {
    background-color: #DADADA;
    border-color: #999;
    color: #000;
}

.merida-set-details-button svg {
    flex-shrink: 0;
}

.icon-set-details {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* ========================================
   Set Composition Section
   ======================================== */

.merida-set-composition-items {
    display: flex;
    flex-direction: column;
    gap: 24px;
	margin: 24px 0px;
}

/* ========================================
   Single Set Item
   ======================================== */

.merida-set-composition-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #DADADA;
    border-radius: 4px;
    transition: box-shadow 0.2s ease;
}

.merida-set-composition-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Image */
.merida-set-item-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.merida-set-item-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.merida-set-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* Details */
.merida-set-item-details {
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.merida-set-item-name {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.merida-set-item-name a {
    color: #000;
    text-decoration: none;
    transition: color 0.2s ease;
}

.merida-set-item-name a:hover {
    color: #005ccc;
}

.merida-set-item-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 8px 0;

    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.merida-set-item-sku {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.merida-set-item-sku strong {
    color: #000;
}

/* Quantity */
.merida-set-item-quantity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 20px;
}

.merida-set-item-qty-value {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    line-height: 1;
}

.merida-set-item-qty-unit {
    font-size: 14px;
    color: #666;
    line-height: 1;
}

/* Pricing */
.merida-set-item-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 120px;
}

.merida-set-item-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

/* Regular price (crossed out) */
.merida-set-item-price-regular {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    line-height: 1;
}

/* Sale price (promotional - orange) */
.merida-set-item-price-sale {
    font-size: 20px;
    font-weight: 600;
    color: #ff6600;
    line-height: 1;
}

/* Regular price (no discount) */
.merida-set-item-price {
    font-size: 20px;
    font-weight: 600;
    color: #000;
    line-height: 1;
}

.merida-set-item-price-label {
    font-size: 12px;
    color: #666;
    text-transform: lowercase;
    line-height: 1;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .merida-set-composition-item {
        grid-template-columns: 80px 1fr auto auto;
        gap: 16px;
        padding: 16px;
    }

    .merida-set-item-image {
        width: 80px;
        height: 80px;
    }

    .merida-set-item-quantity {
        padding: 0 16px;
    }
}

@media (max-width: 768px) {
    .merida-set-composition {
        margin: 32px 0;
        padding: 32px 0;
    }

    .merida-set-composition-item {
        grid-template-columns: 1fr;
        grid-template-areas:
            "image"
            "details"
            "quantity"
            "pricing";
        gap: 16px;
        padding: 20px;
    }

    .merida-set-item-image {
        grid-area: image;
        width: 100%;
        height: 200px;
        margin: 0 auto;
    }

    .merida-set-item-details {
        grid-area: details;
    }

    .merida-set-item-quantity {
        grid-area: quantity;
        flex-direction: row;
        justify-content: center;
        padding: 12px 0;
        border-top: 1px solid #DADADA;
        border-bottom: 1px solid #DADADA;
    }

    .merida-set-item-qty-value {
        font-size: 28px;
    }

    .merida-set-item-quantity {
        gap: 8px;
    }

    .merida-set-item-pricing {
        grid-area: pricing;
        align-items: center;
    }

    .merida-set-item-price-wrapper {
        align-items: center;
    }

    .merida-set-details-button {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   Accessibility
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .merida-set-details-button,
    .merida-set-composition-item,
    .merida-set-item-name a {
        transition: none;
    }
}

/* Smooth scroll to anchor */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
