.cc-shop-intro { margin-bottom: 2rem; }
.cc-shop-intro h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.2; margin: 0 0 1rem; }
.cc-shop-intro p { color: var(--cc-muted); line-height: 1.7; }
.cc-shop-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.cc-shop-category { min-width: 0; overflow: hidden; background: var(--cc-card); border: 1px solid var(--cc-line); border-radius: 1rem; }
.cc-shop-category-image { display: block; aspect-ratio: 4/3; background: var(--cc-bg); }
.cc-shop-category-image img { width: 100%; height: 100%; object-fit: contain; }
.cc-shop-category-copy { padding: clamp(1.25rem, 2vw, 2rem); }
.cc-shop-category-copy h2 { margin: 0 0 .75rem; font-size: 1.5rem; }
.cc-shop-category-copy p { line-height: 1.7; color: var(--cc-muted); }
.cc-shop-featured { margin-top: 3rem; }
.cc-shop-featured > h2 { font-size: 1.75rem; }
.cc-shop-all { margin-top: 2rem; }
@media (max-width: 600px) { .cc-shop-category-grid { grid-template-columns: minmax(0, 1fr); } }
.cc-shop-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 2rem; padding-bottom: 3rem; }
.cc-shop-results { min-width: 0; }
.cc-shop-sidebar { padding: 1.25rem; align-self: start; border: 1px solid var(--cc-line); border-radius: .75rem; background: var(--cc-card); }
.cc-shop-browse summary { font-size: 1rem; font-weight: 400; cursor: pointer; }
.cc-shop-sidebar h2 { font-size: 1rem; line-height: 1.4; margin: 1.5rem 0 .75rem; }
.cc-shop-sidebar ul { list-style: none; padding: 0; margin: .5rem 0; }
.cc-shop-sidebar ul.children { padding-left: 1rem; }
.cc-shop-sidebar a { display: block; padding: .4rem 0; line-height: 1.45; }
.cc-shop-sidebar a:hover { text-decoration: underline; }
.cc-shop-sidebar :is(.current-cat > a, a[aria-current="page"]) { color: var(--cc-blue); text-decoration: underline; text-underline-offset: .2em; }
/* Keep WooCommerce clearfix helpers out of the shop grid as well. */
.cc-shop-results ul.products::before,
.cc-shop-results ul.products::after { content: none; display: none; }
.woocommerce .cc-shop-results ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 901px) {
    .cc-shop-browse summary { display: none; }
    .cc-shop-sidebar nav:first-of-type h2 { margin-top: 0; }
}
@media (max-width: 1100px) and (min-width: 901px) {
    .woocommerce .cc-shop-results ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .cc-shop-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    .woocommerce .cc-shop-results ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .woocommerce .cc-shop-results ul.products { grid-template-columns: minmax(0, 1fr); }
}

/* Even thumbnail spacing within the main product gallery's width. */
.woocommerce div.product div.images .flex-control-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}
.woocommerce div.product div.images .flex-control-thumbs li {
    float: none;
    clear: none;
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    width: auto;
    margin: 0;
    padding: 0;
}
.woocommerce div.product div.images .flex-control-thumbs li img {
    display: block;
    width: 100%;
    height: auto;
}

/* WooCommerce clearfix pseudo-elements must not occupy product-grid cells. */
.woocommerce .related.products ul.products::before,
.woocommerce .related.products ul.products::after {
    display: none;
    content: none;
}
.woocommerce .related.products {
    clear: both;
    padding: clamp(1.25rem, 3vw, 2.5rem);
}
.woocommerce .related.products ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.25rem;
    width: 100%;
    padding: 0;
    margin: 1.5rem 0 0;
}
.woocommerce .related.products ul.products li.product {
    float: none;
    clear: none;
    min-width: 0;
    padding: .85rem;
}
.woocommerce .related.products ul.products li.product .woocommerce-loop-product__title {
    font-size: 1rem;
    line-height: 1.5;
}
@media (max-width: 900px) {
    .woocommerce .related.products ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
    .woocommerce .related.products ul.products { grid-template-columns: minmax(0, 1fr); }
}

/* Give the product description comfortable space inside its panel in both modes. */
.woocommerce div.product .woocommerce-tabs #tab-description {
    padding: clamp(1.25rem, 3vw, 2.5rem);
    line-height: 1.75;
    overflow-wrap: break-word;
}
.woocommerce div.product .woocommerce-tabs #tab-description > :first-child {
    margin-top: 0;
}
.woocommerce div.product .woocommerce-tabs #tab-description > :last-child {
    margin-bottom: 0;
}

/* Shop and category product-card controls. Product-page purchase buttons retain the larger primary style. */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
    display: inline-flex !important;
    min-height: 40px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: .6rem 1rem !important;
    text-align: center !important;
    line-height: 1.1 !important;
    font-size: .8rem !important;
}
