/**
 * WooCommerce Product Collection Blocks Styling
 * Dopasowanie do stylu Wowmart Theme
 */

/* Container grid */
.wp-block-woocommerce-product-collection {
    margin: 0 auto;
}

.wc-block-product-template__responsive {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 20px;
    padding: 0;
    list-style: none;
}

@media (max-width: 1200px) {
    .wc-block-product-template__responsive {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 992px) {
    .wc-block-product-template__responsive {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .wc-block-product-template__responsive {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .wc-block-product-template__responsive {
        grid-template-columns: 1fr !important;
    }
}

/* Product card */
.wc-block-product {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.wc-block-product:hover {
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transform: translateY(-3px);
    border-color: #10b981;
}

/* Product image */
.wc-block-components-product-image {
    position: relative;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 6px;
}

.wc-block-components-product-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wc-block-product:hover .wc-block-components-product-image img {
    transform: scale(1.05);
}

/* Sale badge */
.wc-block-components-product-sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 10;
}

/* Product title */
.wc-block-product h2.wp-block-post-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 10px 0 !important;
}

.wc-block-product h2.wp-block-post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.wc-block-product h2.wp-block-post-title a:hover {
    color: #10b981;
}

/* Price */
.wc-block-components-product-price {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #10b981 !important;
    margin: 8px 0;
}

.wc-block-components-product-price del {
    color: #999;
    font-size: 13px;
    margin-right: 8px;
}

.wc-block-components-product-price ins {
    color: #10b981;
    text-decoration: none;
    font-weight: 700;
}

/* Add to cart button */
.wc-block-components-product-button {
    margin-top: auto;
    padding-top: 10px;
}

.wc-block-components-product-button__button {
    display: block !important;
    width: 100% !important;
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 15px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-align: center !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.wc-block-components-product-button__button:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

/* Pagination */
.wp-block-woocommerce-product-collection-pagination {
    margin-top: 30px;
    text-align: center;
}

/* Global font - matching menu bar */
body,
.wp-block-woocommerce-cart,
.wp-block-woocommerce-filled-cart-block,
.wp-block-woocommerce-cart-items-block,
.wp-block-woocommerce-cart-totals-block,
.wc-block-components-totals-wrapper,
.wc-block-components-totals-item,
.wc-block-components-totals-item__label,
.wc-block-components-totals-item__value,
.wc-block-cart-item__product,
.wc-block-cart-item__product-name,
.wc-block-cart-item__product-metadata,
.wc-block-components-product-badge,
.wc-block-components-product-price,
.wc-block-components-product-price__value,
button.wc-block-components-button,
.wp-block-button__link {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Cart page specific styling */
.wp-block-woocommerce-cart {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.wp-block-woocommerce-cart h2,
.wp-block-woocommerce-cart h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 600 !important;
}

/* Buttons */
.wc-block-components-button,
.wp-block-button__link {
    font-weight: 500 !important;
}

/* WooCommerce Blocks Polish text overrides via CSS - hide original, show translated */
:root {
    --text-subtotal: 'Suma częściowa';
    --text-review-order: 'Przejrzyj zamówienie';
    --text-taxes-shipping: 'Podatki i wysyłka obliczone przy kasie';
}

/* Fix specific WooCommerce Block elements */
.wc-block-components-totals-item__label,
.wc-block-components-order-summary__button-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
