/* Red Apple Studio – shop, category and product search pages.
   Scoped to body.ras-shop so WooCommerce defaults elsewhere are untouched. */

body.ras-shop { background: var(--ras-white); }

body.ras-shop main.site-main {
	max-width: var(--ras-wrap); margin: 0 auto; padding: 28px 24px 88px;
	font-family: var(--ras-body); color: var(--ras-ink);
}

/* Breadcrumb */
body.ras-shop .woocommerce-breadcrumb {
	margin: 0 0 20px; font-size: 13px; color: var(--ras-muted);
}
body.ras-shop .woocommerce-breadcrumb a { color: var(--ras-muted); text-decoration: none; }
body.ras-shop .woocommerce-breadcrumb a:hover { color: var(--ras-red-dark); text-decoration: underline; text-underline-offset: 3px; }

/* Title, description, category bar */
body.ras-shop .woocommerce-products-header {
	padding: 36px 40px 28px; margin: 0 0 28px; border-radius: 24px; background: var(--ras-cream);
}
body.ras-shop .woocommerce-products-header__title {
	margin: 0 0 12px; font-family: var(--ras-head); font-weight: 700; font-size: 44px; line-height: 1.1;
	letter-spacing: -0.02em; color: var(--ras-ink);
}
body.ras-shop .term-description { max-width: 720px; margin: 0; }
body.ras-shop .term-description p { margin: 0 0 8px; font-size: 17px; line-height: 1.7; color: var(--ras-walnut); }

.ras-cat-bar { margin-top: 22px; }
.ras-cat-bar ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ras-cat-bar a {
	display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 999px;
	border: 1px solid var(--ras-line); background: var(--ras-white); color: var(--ras-ink);
	font-family: var(--ras-head); font-weight: 500; font-size: 14px; text-decoration: none; white-space: nowrap;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.ras-cat-bar a:hover { border-color: var(--ras-walnut); color: var(--ras-ink); }
.ras-cat-bar a[aria-current="page"] { background: var(--ras-ink); border-color: var(--ras-ink); color: var(--ras-cream); }
.ras-cat-bar a:focus-visible { outline: 2px solid var(--ras-red); outline-offset: 2px; }

/* Toolbar: result count + sorting */
body.ras-shop .woocommerce-result-count {
	margin: 0 0 16px; padding-top: 10px; font-size: 14px; color: var(--ras-muted);
}
body.ras-shop .woocommerce-ordering { margin: 0 0 16px; }
body.ras-shop .woocommerce-ordering select {
	min-height: 42px; padding: 8px 40px 8px 16px; border: 1px solid var(--ras-line); border-radius: 999px;
	background-color: var(--ras-white); color: var(--ras-ink); font: 500 14px/1.2 var(--ras-body); cursor: pointer;
}
body.ras-shop .woocommerce-ordering select:focus { outline: 2px solid var(--ras-red); outline-offset: 2px; }

/* Product grid */
body.ras-shop.woocommerce ul.products,
body.ras-shop .woocommerce ul.products {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
	clear: both; margin: 0; padding: 0;
}
body.ras-shop.woocommerce ul.products::before,
body.ras-shop.woocommerce ul.products::after { display: none; }

body.ras-shop.woocommerce ul.products li.product {
	display: flex; flex-direction: column; width: auto !important; margin: 0 !important; float: none !important;
	padding: 14px 14px 18px; border: 1px solid var(--ras-oak); border-radius: 18px; background: var(--ras-white);
	text-align: left; transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s;
}
body.ras-shop.woocommerce ul.products li.product:hover {
	border-color: var(--ras-walnut); box-shadow: 0 12px 28px rgba(43, 0, 1, 0.08); transform: translateY(-3px);
}
body.ras-shop.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
	display: flex; flex-direction: column; flex: 1; color: var(--ras-ink); text-decoration: none;
}
body.ras-shop.woocommerce ul.products li.product a img {
	width: 100%; height: auto; aspect-ratio: 6 / 5; object-fit: contain; margin: 0 0 14px;
	border-radius: 12px; background: var(--ras-white); box-shadow: none;
}
body.ras-shop.woocommerce ul.products li.product .woocommerce-loop-product__title {
	margin: 0 0 6px; padding: 0; font-family: var(--ras-head); font-weight: 600; font-size: 16px; line-height: 1.35;
	color: var(--ras-ink);
}
body.ras-shop.woocommerce ul.products li.product .price {
	display: block; margin: auto 0 14px; padding-top: 4px; font-family: var(--ras-body); font-weight: 600;
	font-size: 16px; color: var(--ras-red-dark);
}
body.ras-shop.woocommerce ul.products li.product .price del { color: var(--ras-muted); font-weight: 400; opacity: 1; }
body.ras-shop.woocommerce ul.products li.product .price ins { text-decoration: none; }

body.ras-shop.woocommerce ul.products li.product .button {
	display: inline-flex; align-items: center; justify-content: center; width: 100%; margin: 0;
	padding: 11px 16px; border: 1.5px solid var(--ras-ink); border-radius: 999px; background: transparent;
	color: var(--ras-ink); font-family: var(--ras-head); font-weight: 600; font-size: 14px; line-height: 1.2;
	text-transform: none; letter-spacing: normal; transition: background-color 0.15s, color 0.15s;
}
body.ras-shop.woocommerce ul.products li.product .button:hover,
body.ras-shop.woocommerce ul.products li.product .button:focus {
	background: var(--ras-ink); color: var(--ras-cream);
}
body.ras-shop.woocommerce ul.products li.product .button.loading { opacity: 0.7; }
body.ras-shop.woocommerce ul.products li.product .added_to_cart {
	display: block; margin-top: 8px; font-size: 13px; font-weight: 600; text-align: center; color: var(--ras-red-dark);
}

body.ras-shop.woocommerce span.onsale {
	top: 22px; left: 22px; right: auto; min-width: 0; min-height: 0; margin: 0; padding: 4px 10px;
	border-radius: 999px; background: var(--ras-red); color: var(--ras-white);
	font-size: 12px; font-weight: 600; line-height: 1.4;
}

/* Pagination */
body.ras-shop.woocommerce nav.woocommerce-pagination { margin-top: 40px; text-align: center; }
body.ras-shop.woocommerce nav.woocommerce-pagination ul { display: inline-flex; gap: 6px; border: 0; margin: 0; }
body.ras-shop.woocommerce nav.woocommerce-pagination ul li { border: 0; float: none; }
body.ras-shop.woocommerce nav.woocommerce-pagination ul li a,
body.ras-shop.woocommerce nav.woocommerce-pagination ul li span {
	display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px;
	border: 1px solid var(--ras-line); border-radius: 999px; background: var(--ras-white);
	color: var(--ras-ink); font-weight: 600; font-size: 14px;
}
body.ras-shop.woocommerce nav.woocommerce-pagination ul li a:hover { border-color: var(--ras-walnut); background: var(--ras-white); color: var(--ras-ink); }
body.ras-shop.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--ras-ink); border-color: var(--ras-ink); color: var(--ras-cream); }

/* Empty results */
body.ras-shop .woocommerce-info,
body.ras-shop .woocommerce-no-products-found .woocommerce-info {
	border: 0; border-radius: 16px; background: var(--ras-cream); color: var(--ras-ink); padding: 20px 24px;
}
body.ras-shop .woocommerce-info::before { display: none; }

/* Collection + custom build note */
.ras-shop-note {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 48px; clear: both;
}
.ras-shop-note__item {
	display: flex; gap: 14px; align-items: flex-start; padding: 24px; border-radius: 18px; background: var(--ras-cream);
}
.ras-shop-note__item .ras-icon { flex: none; margin-top: 2px; color: var(--ras-walnut); }
.ras-shop-note p { margin: 0 0 6px; font-size: 15px; line-height: 1.6; color: var(--ras-muted); }
.ras-shop-note__title { font-family: var(--ras-head); font-weight: 600; font-size: 16px !important; color: var(--ras-ink) !important; }
.ras-shop-note__links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px !important; }
.ras-shop-note__links a { font-weight: 600; color: var(--ras-red-dark); text-decoration: none; }
.ras-shop-note__links a:hover { color: var(--ras-red); text-decoration: underline; text-underline-offset: 3px; }

/* Responsive */
@media (max-width: 1180px) {
	body.ras-shop.woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
	body.ras-shop .woocommerce-products-header { padding: 28px 24px 24px; }
	body.ras-shop .woocommerce-products-header__title { font-size: 34px; }
	body.ras-shop.woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
	.ras-shop-note { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	body.ras-shop main.site-main { padding: 20px 16px 64px; }
	body.ras-shop .woocommerce-products-header { padding: 24px 18px 20px; border-radius: 18px; }
	body.ras-shop .woocommerce-products-header__title { font-size: 28px; }
	body.ras-shop .term-description p { font-size: 15px; }
	/* Category bar scrolls sideways instead of wrapping into many rows. */
	.ras-cat-bar ul { flex-wrap: nowrap; overflow-x: auto; margin: 0 -18px; padding: 0 18px 4px; scrollbar-width: none; }
	.ras-cat-bar ul::-webkit-scrollbar { display: none; }
	body.ras-shop .woocommerce-result-count, body.ras-shop .woocommerce-ordering { float: none; }
	body.ras-shop .woocommerce-ordering select { width: 100%; }
	body.ras-shop.woocommerce ul.products li.product { padding: 10px 10px 14px; border-radius: 14px; }
	body.ras-shop.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px; }
	body.ras-shop.woocommerce ul.products li.product .price { font-size: 14px; }
	body.ras-shop.woocommerce ul.products li.product .button { padding: 9px 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
	body.ras-shop.woocommerce ul.products li.product { transition: none; }
	body.ras-shop.woocommerce ul.products li.product:hover { transform: none; }
}
