/* WooCommerce Global Styles */
.woocommerce-store-notice {
    background-color: var(--wp--preset--color--accent-primary);
    color: white;
}

/* Product List Layout (Redesigned - High Density) */
.krambu-product-list {
    display: flex;
    flex-direction: column;
    /* Reset default grid styles if present */
    grid-template-columns: 1fr !important;
    width: 100%;
}

/* Force list items to be full width container */
.krambu-product-list li.product {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    /* Reset display: list-item */
    float: none !important;
    border-bottom: 1px solid var(--wp--preset--color--border);
}

.krambu-product-list li.product:last-child {
    border-bottom: none;
}

/* Disable all hover animations/transforms from default WooCommerce styles */
.woocommerce ul.products li.product,
.woocommerce ul.products li.product:hover,
.krambu-product-list li.product,
.krambu-product-list li.product:hover {
    transform: none !important;
    transition: none !important;
    box-shadow: none !important;
}

.krambu-product-card {
    width: 100%;
    /* Ensure flex container properties */
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    /* Top align for density */
    flex-wrap: nowrap !important;
    gap: var(--wp--preset--spacing--30);
}

.krambu-product-card:hover {
    background-color: transparent;
    /* User requested no hover background */
}

.krambu-product-image {
    flex-shrink: 0;
    width: 140px;
    /* Smaller thumbnail */
    background-color: transparent;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.krambu-product-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.krambu-product-info {
    flex-grow: 1;
    min-width: 0;
    padding-top: var(--wp--preset--spacing--20);
}

.krambu-product-actions {
    flex-shrink: 0;
    width: 180px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    padding-top: var(--wp--preset--spacing--20);
}

.krambu-product-actions .wc-block-components-product-price {
    margin-bottom: var(--wp--preset--spacing--20);
    text-align: right;
    line-height: 1;
}

.krambu-product-actions .wp-block-button {
    width: 100%;
}

.krambu-product-actions .wp-block-button__link {
    font-size: 0.85rem !important;
    padding: 0.6em 1.2em !important;
}

/* DENSE Specs List */
.krambu-product-specs-list {
    font-size: 0.85rem;
    color: var(--wp--preset--color--contrast-muted);
}

.krambu-product-specs-list p {
    margin: 0;
    padding: 0;
}

.spec-row {
    display: flex;
    align-items: baseline;
    margin-bottom: 0;
    line-height: 1.3;
}

.spec-label {
    font-weight: 600;
    color: var(--wp--preset--color--contrast);
    width: auto;
    margin-right: 6px;
    flex-shrink: 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.krambu-product-specs-list .wc-block-components-product-attribute-value {
    margin: 0;
}

/* Single Product Layout */
.single-product .product-gallery-wrapper {
    position: sticky;
    top: 100px;
}

.woocommerce-product-gallery {
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--wp--preset--color--surface-dark);
    margin-bottom: var(--wp--preset--spacing--40);
}

.woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Technical Specs Table */
.krambu-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--wp--preset--spacing--50);
}

.krambu-specs-table th,
.krambu-specs-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--wp--preset--color--border);
    text-align: left;
}

.krambu-specs-table th {
    width: 30%;
    background-color: var(--wp--preset--color--base-alt);
    font-weight: 600;
    color: var(--wp--preset--color--contrast-muted);
}

.krambu-specs-table tr.section-header td {
    background-color: var(--wp--preset--color--surface-dark);
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
}

/* Buttons */
.button.add_to_cart_button,
.single_add_to_cart_button {
    background-color: var(--wp--preset--color--accent-primary) !important;
    color: white !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
}

.button.add_to_cart_button:hover,
.single_add_to_cart_button:hover {
    background-color: var(--wp--preset--color--accent-secondary) !important;
}

/* Pagination */
.woocommerce-pagination .page-numbers {
    display: flex;
    gap: 8px;
    padding: 0;
    list-style: none;
    justify-content: center;
}

.woocommerce-pagination .page-numbers li span.current,
.woocommerce-pagination .page-numbers li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
}

.woocommerce-pagination .page-numbers li span.current {
    background-color: var(--wp--preset--color--accent-primary);
    color: white;
}

.woocommerce-pagination .page-numbers li a {
    background-color: var(--wp--preset--color--base-alt);
    color: var(--wp--preset--color--contrast);
}

.woocommerce-pagination .page-numbers li a:hover {
    background-color: var(--wp--preset--color--border);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .krambu-product-card {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .krambu-product-image {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: var(--wp--preset--spacing--30);
    }

    .krambu-product-actions {
        width: 100% !important;
        margin-left: 0 !important;
        padding-top: var(--wp--preset--spacing--30);
        margin-top: var(--wp--preset--spacing--30);
        text-align: left;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        border-top: 1px solid var(--wp--preset--color--border);
    }

    .krambu-product-specs-list {
        grid-template-columns: 1fr !important;
    }
}