/**
 * WooCommerce Shop Theme Styles
 *
 * @version 1.0.0
 */

/* 1. VARIABLES
/* ---------------------------------------------------------- */
:root {
    --ucu-shop-bg: #f5f5f7;
    --ucu-shop-surface: #ffffff;
    --ucu-shop-surface-soft: #fafafc;
    --ucu-shop-text: #1d1d1f;
    --ucu-shop-muted: #6e6e73;
    --ucu-shop-line: #e5e5ea;
    --ucu-shop-line-strong: #d6d6db;
    --ucu-shop-shadow-soft: 0 8px 30px rgba(0,0,0,0.05);
    --ucu-shop-shadow-card: 0 18px 50px rgba(0,0,0,0.08);
    --ucu-shop-radius-xl: 30px;
    --ucu-shop-radius-lg: 24px;
    --ucu-shop-radius-md: 18px;
}
body.woocommerce.archive,
body.post-type-archive-product {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #fbfbfd 0%, #f3f4f7 100%);
    color: var(--ucu-shop-text);
    min-height: 100vh;
}

.woocommerce.archive .woocommerce-result-count,
.post-type-archive-product .woocommerce-result-count,
.woocommerce.archive .woocommerce-ordering,
.post-type-archive-product .woocommerce-ordering {
    display: none;
}

.ucu-shop-toolbar .woocommerce-ordering {
    display: block;
    margin: 0;
}

.ucu-shop-toolbar .woocommerce-ordering select {
    width: 100%;
}

.woocommerce.archive .site-main,
.post-type-archive-product .site-main {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.woocommerce.archive .woocommerce-notices-wrapper,
.post-type-archive-product .woocommerce-notices-wrapper {
    margin-bottom: 16px;
}

.ucu-shop-category-section,
.ucu-shop-products-section {
    display: grid;
    gap: 16px;
}

/* 2. GLOBAL WRAPPERS
/* ---------------------------------------------------------- */
.woocommerce.archive .ucu-shop-page {
    width: 100%;
    max-width: 1460px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
    overflow-x: clip;
		padding: 28px;
}

/* 3. TOOLBAR
/* ---------------------------------------------------------- */
.ucu-shop-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: end;
    padding: 26px 30px;
    border: 1px solid var(--ucu-shop-line);
    border-radius: var(--ucu-shop-radius-xl);
    background: var(--ucu-shop-surface);
    box-shadow: var(--ucu-shop-shadow-soft);
}

.ucu-shop-toolbar-left {
    display: grid;
    gap: 8px;
}

.ucu-shop-toolbar h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 800;
}

.ucu-shop-toolbar-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--ucu-shop-muted);
    font-size: 14px;
    align-items: center;
}

.ucu-shop-meta-item {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--ucu-shop-surface-soft);
    border: 1px solid var(--ucu-shop-line);
    font-size: 13px;
    font-weight: 600;
}

.ucu-shop-toolbar-right {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.ucu-shop-sort {
    min-height: 46px;
    border-radius: 999px;
    border: 1px solid var(--ucu-shop-line);
    background: var(--ucu-shop-surface-soft);
    color: var(--ucu-shop-text);
    font: inherit;
    padding: 0 18px;
}


/* 4. CATEGORY RAIL
/* ---------------------------------------------------------- */
.ucu-shop-category-rail-wrap {
    width: 100%;
    overflow: hidden;
}

.ucu-shop-category-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 340px);
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    list-style: none;
    margin: 0;
}
.ucu-shop-category-rail-wrap {
    width: 100%;
    overflow: hidden;
}

.ucu-shop-category-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(280px, 340px);
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.ucu-shop-category-rail::-webkit-scrollbar {
    display: none;
}

.ucu-shop-category-rail::-webkit-scrollbar {
    display: none;
}


/* 5. CATEGORY CARDS
/* ---------------------------------------------------------- */
.ucu-shop-category-card {
    scroll-snap-align: start;
    position: relative;
    min-height: 210px;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid var(--ucu-shop-line);
    background: #f2f2f5;
    box-shadow: var(--ucu-shop-shadow-soft);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    isolation: isolate;
    display: flex;
    align-items: end;
    padding: 20px;
}

.ucu-shop-category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ucu-shop-shadow-card);
}

.ucu-shop-category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.28) 100%);
    z-index: 1;
}

.ucu-shop-category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 0;
}

.ucu-shop-category-meta {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 8px;
    max-width: 85%;
}

.ucu-shop-category-meta h3 {
    margin: 0;
    font-size: 28px;
    line-height: 0.96;
    letter-spacing: -0.05em;
    font-weight: 800;
    color: #fff;
}

.ucu-shop-category-count {
    width: fit-content;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.22);
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    backdrop-filter: blur(10px);
}


/* 6. PRODUCTS GRID
/* ---------------------------------------------------------- */
.products.ucu-shop-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}


/* 7. PRODUCT CARDS
/* ---------------------------------------------------------- */
.ucu-shop-product-card {
    border-radius: 28px;
    border: 1px solid var(--ucu-shop-line);
    background: rgba(255,255,255,0.92);
    box-shadow: var(--ucu-shop-shadow-soft);
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ucu-shop-product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ucu-shop-shadow-card);
}

.ucu-shop-product-visual {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(180deg, #fafafd 0%, #ededf3 100%);
    overflow: hidden;
    border-bottom: 1px solid var(--ucu-shop-line);
}

.ucu-shop-product-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ucu-shop-product-body {
    padding: 18px;
    display: grid;
    gap: 14px;
}

.ucu-shop-product-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.28;
    letter-spacing: -0.03em;
    font-weight: 760;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.56em;
}


/* 8. BUTTONS / PRICE / BADGES / RATING
/* ---------------------------------------------------------- */
.ucu-shop-sale-badge,
.category-pill,
.sale-badge {
    position: absolute;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.ucu-shop-sale-badge,
.sale-badge {
    top: 16px;
    left: 16px;
    background: rgba(255,255,255,0.86);
    border: 1px solid var(--ucu-shop-line);
    color: var(--ucu-shop-text);
}

.category-pill {
    bottom: 16px;
    left: 16px;
    background: rgba(255,255,255,0.74);
    border: 1px solid rgba(255,255,255,0.9);
    color: var(--ucu-shop-muted);
}

.ucu-shop-product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--ucu-shop-muted);
    font-size: 13px;
}

.stars {
    letter-spacing: 0.1em;
    color: var(--ucu-shop-text);
    font-size: 13px;
}

.ucu-shop-price-row {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
}

.ucu-shop-price-stack {
    display: grid;
    gap: 4px;
}

.price {
    font-size: 24px;
    line-height: 1;
    letter-spacing: -0.04em;
    font-weight: 850;
    color: var(--ucu-shop-text);
}

.price del {
    font-size: 13px;
    color: var(--ucu-shop-muted);
}

.ucu-shop-product-type {
    font-size: 12px;
    color: var(--ucu-shop-muted);
    font-weight: 700;
    padding-bottom: 4px;
}

.ucu-shop-product-footer {
    display: grid;
    gap: 10px;
}

.add_to_cart_button,
.product_type_variable,
.product_type_bundle {
    min-height: 46px;
    border-radius: 16px;
    padding: 0 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 750;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    cursor: pointer;
    background: var(--ucu-shop-surface-soft);
    color: var(--ucu-shop-text);
    border: 1px solid var(--ucu-shop-line);
}

.add_to_cart_button.product_type_simple.ajax_add_to_cart {
    background: #1d1d1f;
    color: #fff;
    border: 1px solid #1d1d1f;
    box-shadow: 0 10px 20px rgba(29,29,31,0.12);
}

.add_to_cart_button:hover,
.product_type_variable:hover,
.product_type_bundle:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(0,0,0,0.08);
}


/* 9. PAGINATION
/* ---------------------------------------------------------- */
.ucu-shop-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.ucu-shop-pagination .page-numbers {
    min-width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--ucu-shop-line);
    background: var(--ucu-shop-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--ucu-shop-text);
    text-decoration: none;
}

.ucu-shop-pagination .page-numbers.current {
    background: #1d1d1f;
    color: #fff;
    border-color: #1d1d1f;
}


/* 10. RESPONSIVE
/* ---------------------------------------------------------- */
@media (min-width: 1180px) {
    .products.ucu-shop-products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .ucu-shop-toolbar {
        grid-template-columns: 1fr;
    }

    .ucu-shop-toolbar-right {
        width: 100%;
    }

    .ucu-shop-sort {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .ucu-shop-page {
        padding: 16px;
    }

    .ucu-shop-toolbar {
        padding: 20px;
    }

    .ucu-shop-category-rail {
        grid-auto-columns: 86%;
    }

    .products.ucu-shop-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .ucu-shop-product-body {
        padding: 14px;
    }

    .ucu-shop-product-title {
        font-size: 15px;
    }

    .price {
        font-size: 18px;
    }

    .add_to_cart_button,
    .product_type_variable,
    .product_type_bundle {
        min-height: 42px;
        font-size: 13px;
    }
}
.ucu-shop-category-rail {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ucu-shop-category-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}