:root {
	--c-slate-50: #f8fafc;
	--c-slate-200: #e2e8f0;
	--c-slate-400: #94a3b8;
	--c-slate-600: #475569;
	--c-slate-700: #334155;
	--c-slate-800: #1e2h3b;

	--c-blue-50: #eff6ff;
	--c-blue-100: #dbeafe;
	--c-blue-200: #bfdbfe;
	--c-blue-300: #93c5fd;
	--c-blue-600: #2563eb;
	--c-blue-700: #1d4ed8;
	--c-blue-800: #1e40af;

	--c-purple-50: #faf5ff;
	--c-purple-100: #f3e8ff;
	--c-purple-600: #9333ea;
	
	--c-green-100: #dcfce7;
	--c-green-200: #bbf7d0;
	--c-green-700: #15803d;
	--c-emerald-100: #d1fae5;
	
	--c-white: #ffffff;
	--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
	--shadow-blue-glow: 0 4px 12px 0 rgb(59 130 246 / 0.1);

	/* --- [NEW] Fluid Font Sizes (Further Reduced) --- */
	--fs-xs: clamp(0.65rem, 0.6rem + 0.2vw, 0.7rem);      /* Approx 10.4px-11.2px */
	--fs-sm: clamp(0.75rem, 0.7rem + 0.2vw, 0.8rem);      /* Approx 12px-12.8px */
	--fs-base: clamp(0.8rem, 0.75rem + 0.25vw, 0.9rem);   /* Approx 12.8px-14.4px */
	--fs-lg: clamp(0.9rem, 0.8rem + 0.5vw, 1rem);         /* Approx 14.4px-16px */
	--fs-xl: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);        /* Approx 16px-18.4px */
	--fs-h3: clamp(1.1rem, 1rem + 0.5vw, 1.25rem);        /* Approx 17.6px-20px */
	--fs-h2: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);       /* Approx 19.2px-24px */
}

/* --- Global Layout --- */
.shop-layout {
	background: linear-gradient(to bottom right, rgba(248,250,252,0.3), rgba(239,246,255,0.2), rgba(250,245,255,0.2));
	padding: 32px 24px;
}
.shop-layout__container {
	display: grid;
	grid-template-columns: 288px 1fr;
	gap: 32px;
	max-width: 1600px; margin: 0 auto;
	padding-bottom: 48px;
}

/* --- Sidebar --- */
.shop-layout__sidebar {
	align-self: start;
}
.shop-layout__sidebar-inner {
	width: 100%;
	background: linear-gradient(to bottom, rgba(248, 250, 252, 0.5), var(--c-white));
	border: 1px solid var(--c-slate-200);
	border-radius: 12px;
	box-shadow: var(--shadow-sm);
	display: flex; 
	flex-direction: column;
	max-height: calc(100vh - 64px); 
}
.sidebar-header {
	padding: 0;
	border-bottom: 1px solid var(--c-slate-200);
}
.sidebar-toggle {
    width: 100%;
    padding: 24px;
    background: linear-gradient(to right, var(--c-blue-50), var(--c-purple-50));
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    text-align: left;
}
.sidebar-header__icon-wrapper {
	display: flex; align-items: center;
	gap: 8px; margin-bottom: 0;
}
.sidebar-header__icon { width: 20px; height: 20px; color: var(--c-blue-600); }
.sidebar-header__title {
	margin: 0; 
	font-size: var(--fs-base);
	font-weight: 600; color: var(--c-slate-800);
}
.sidebar-content {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}
.sidebar-search { position: relative; padding: 16px 24px; }
.sidebar-search__icon {
	position: absolute; left: 36px; top: 50%;
	transform: translateY(-50%);
	width: 16px; height: 16px; color: var(--c-slate-400); pointer-events: none;
}
.sidebar-search input[type="search"] {
	width: 100%; padding: 8px 12px 8px 36px;
	border: 1px solid var(--c-slate-200);
	background: var(--c-white); color: var(--c-slate-700); border-radius: 8px;
	font-size: var(--fs-base);
}
.sidebar-nav {
	padding: 16px; display: grid; gap: 4px;
	border-top: 1px solid var(--c-slate-200);
}
.sidebar-nav__link {
	display: flex; align-items: center; justify-content: space-between;
	width: 100%; text-align: left; padding: 12px;
	border-radius: 12px; transition: all 0.2s ease; text-decoration: none;
	color: var(--c-slate-700); border: none; background: transparent; cursor: pointer;
}
.sidebar-nav__link:hover {
	background: linear-gradient(to right, var(--c-blue-50), var(--c-purple-50));
	box-shadow: var(--shadow-sm);
}
.sidebar-nav__link.is-active {
	background: linear-gradient(to right, var(--c-blue-100), var(--c-purple-100));
	color: var(--c-blue-800); box-shadow: var(--shadow-sm);
}
.sidebar-nav__name { font-weight: 500; font-size: var(--fs-base); }
.sidebar-nav__count {
	padding: 2px 8px; border-radius: 6px; 
	font-size: var(--fs-xs);
	background: var(--c-blue-50); color: var(--c-blue-600);
	border: 1px solid var(--c-blue-200); transition: all 0.2s ease;
}
.sidebar-nav__link.is-active .sidebar-nav__count {
	background: var(--c-white); color: var(--c-blue-700); border-color: var(--c-blue-200);
}

/* --- Main Content: Header --- */
.shop-header { margin-bottom: 32px; }
.shop-header__banner {
	position: relative; overflow: hidden;
	background: linear-gradient(to bottom right, var(--c-blue-50), var(--c-purple-50), #f0f0ff);
	border-radius: 24px; padding: 32px; border: 1px solid var(--c-blue-100);
}
.shop-header__banner-bg-shape-1, .shop-header__banner-bg-shape-2 { position: absolute; border-radius: 50%; }
.shop-header__banner-bg-shape-1 { top: 0; right: 0; width: 256px; height: 256px; background: rgba(255,255,255,0.3); transform: translate(128px, -128px); }
.shop-header__banner-bg-shape-2 { bottom: 0; left: 0; width: 192px; height: 192px; background: rgba(219, 234, 254, 0.2); transform: translate(-96px, 96px); }
.shop-header__banner-content { position: relative; display: flex; justify-content: space-between; align-items: flex-start; }
.shop-header__title-wrapper { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.shop-header__title-icon { width: 40px; height: 40px; background: rgba(255,255,255,0.6); backdrop-filter: blur(4px); border-radius: 12px; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); }
.shop-header__title-icon svg { width: 20px; height: 20px; color: var(--c-blue-600); }
.shop-header__title { margin: 0; font-size: var(--fs-h2); font-weight: 700; color: var(--c-slate-800); }
.shop-header__subtitle { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--c-slate-600); font-size: var(--fs-base); }
.shop-header__subtitle-badge { display: inline-flex; padding: 4px 12px; border-radius: 99px; font-weight: 600; background: rgba(255,255,255,0.6); backdrop-filter: blur(4px); color: var(--c-blue-700); }
.shop-header__subtitle .woocommerce-result-count { margin: 0; }
.shop-header__subtitle-badge.is-category { color: var(--c-purple-600); }
.btn.btn--basket { position: relative; background: rgba(255,255,255,0.7); backdrop-filter: blur(4px); border: 2px solid var(--c-blue-200); color: var(--c-blue-700); font-weight: 500; padding: 10px 16px; height: auto; border-radius: 12px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; transition: all .2s ease; }
.btn.btn--basket:hover { border-color: var(--c-blue-300); background: rgba(255,255,255,0.9); }
.btn.btn--basket .basket-count { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: linear-gradient(to right, #ef4444, #ec4899); color: var(--c-white); font-size: var(--fs-xs); display: flex; align-items: center; justify-content: center; }

/* --- Main Content: Product List --- */
.product-list { display: grid; gap: 12px; }
.product-card { position: relative; overflow: hidden; background: linear-gradient(to right, var(--c-white), rgba(248, 250, 252, 0.3)); border: 1px solid var(--c-slate-200); border-radius: 16px; transition: all 0.3s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg), var(--shadow-blue-glow); }
.product-card__overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(239, 246, 255, 0.3), rgba(250, 245, 255, 0.3)); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.product-card:hover .product-card__overlay { opacity: 1; }
.product-card__inner { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 24px; gap: 20px; }
.product-card__left { display: flex; align-items: center; gap: 20px; min-width: 0; flex: 1 1 auto; }
.product-card__icon { width: 56px; height: 56px; flex-shrink: 0; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: linear-gradient(to bottom right, var(--c-blue-100), var(--c-purple-100)); box-shadow: var(--shadow-sm); transition: all 0.3s ease; }
.product-card:hover .product-card__icon { transform: scale(1.05); box-shadow: var(--shadow-md); }
.product-card__meta { min-width: 0; }
/* [FIX] Removed nowrap and ellipsis to allow the title to wrap */
.product-card__title { 
    margin: 0 0 8px; 
    font-size: var(--fs-lg); 
    font-weight: 600; 
    color: var(--c-slate-800); 
    line-height: 1.4; 
}
.product-card__title a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.product-card__title a:hover { color: var(--c-blue-600); }
.product-card__meta-line { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.product-card__category { font-size: var(--fs-sm); font-weight: 500; color: var(--c-slate-600); }
.badge { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 99px; font-size: var(--fs-xs); font-weight: 500; border: 1px solid transparent; }
.badge--cert { background: linear-gradient(to right, var(--c-blue-50), var(--c-purple-50)); border-color: var(--c-blue-200); color: var(--c-blue-700); }
.badge--format { font-size: var(--fs-sm); color: var(--c-slate-600); background: var(--c-slate-100); border-color: var(--c-slate-200); }
.badge--discount { background: linear-gradient(to right, var(--c-green-100), var(--c-emerald-100)); color: var(--c-green-700); border-color: var(--c-green-200); font-size: var(--fs-xs); padding: 2px 8px; }

/* --- [FINAL FIX] Forceful & Specific CSS --- */
.product-card .product-card__right {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    flex-shrink: 0;
}
.product-card .product-card__right > * {
    width: auto !important;
    flex-shrink: 0 !important;
}
.product-card .product-card__price { text-align: right; }
.product-card .product-card__price-was-wrapper { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 4px; }
.product-card .price-was, .product-card .price-was .woocommerce-Price-amount.amount { text-decoration: line-through; color: var(--c-slate-400); font-size: var(--fs-sm); }
.product-card .product-card__price-now, .product-card .product-card__price-now .woocommerce-Price-amount.amount { font-size: var(--fs-h2); font-weight: 700; background: linear-gradient(to right, var(--c-blue-600), var(--c-purple-600)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.product-card .product-card__price-now ins { text-decoration: none; }
.product-card .product-card__price-now del { display: none; }

/* --- Product Card Actions & Buttons --- */
.product-card .product-card__right .btn,
.product-card .product-card__right .button.add_to_cart_button { display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important; padding: 0 1rem !important; height: 48px !important; min-width: 150px; border-radius: 12px !important; font-weight: 600 !important; font-size: var(--fs-base) !important; line-height: 1 !important; box-sizing: border-box !important; text-decoration: none !important; border: 2px solid transparent !important; transition: all 0.3s ease !important; transform-origin: center !important; }
.product-card .product-card__right .btn:hover,
.product-card .product-card__right .button.add_to_cart_button:hover { transform: scale(1.05) !important; box-shadow: var(--shadow-md) !important; }
.product-card .product-card__right .btn--details { background-color: transparent !important; border-color: var(--c-slate-200) !important; color: var(--c-slate-700) !important; }
.product-card .product-card__right .btn--details:hover { border-color: var(--c-blue-300) !important; background: linear-gradient(to right, var(--c-blue-50), var(--c-purple-50)) !important; }
.product-card .product-card__right .add_to_cart_button.ajax_add_to_cart {
    background: linear-gradient(to right, var(--c-blue-50), var(--c-purple-50)) !important;
    border-color: var(--c-blue-200) !important;
    color: var(--c-blue-700) !important;
    position: relative !important;
    top: 6px !important;
}
.product-card .product-card__right .add_to_cart_button.ajax_add_to_cart:hover { border-color: var(--c-blue-300) !important; }
.product-card .product-card__right .add_to_cart_button.ajax_add_to_cart.added { background: linear-gradient(to right, #4ade80, #22c55e) !important; border-color: transparent !important; color: var(--c-white) !important; }
.product-card .product-card__right .added_to_cart.wc-forward { display: none !important; }

/* --- Product Category Grouping --- */
.product-category-group {
	margin-bottom: 48px;
}
.product-category-group:last-of-type {
    margin-bottom: 0;
}
.product-category-title {
	font-size: var(--fs-h2);
	font-weight: 700;
	color: var(--c-slate-800);
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--c-slate-200);
}

/* --- Pagination & No Products --- */
.shop-pagination-wrapper { margin-top: 48px; display: flex; justify-content: center; }
.shop-pagination-wrapper .woocommerce-pagination { padding: 12px; background: rgba(255,255,255,0.8); backdrop-filter: blur(4px); border: 1px solid var(--c-slate-200); border-radius: 16px; box-shadow: var(--shadow-sm); }
.woocommerce-no-products-found-wrapper { text-align: center; padding: 48px; margin: 32px auto; max-width: 448px; background: rgba(255,255,255,0.8); backdrop-filter: blur(4px); border: 1px solid var(--c-slate-200); border-radius: 24px; box-shadow: var(--shadow-sm); }
.woocommerce-no-products-found-wrapper .icon-wrapper { width: 64px; height: 64px; background: linear-gradient(to bottom right, var(--c-blue-100), var(--c-purple-100)); border-radius: 16px; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.woocommerce-no-products-found-wrapper .icon-wrapper svg { width: 32px; height: 32px; color: var(--c-blue-600); }
.woocommerce-no-products-found-wrapper h3 { font-size: var(--fs-xl); font-weight: 600; color: var(--c-slate-800); margin-bottom: 8px; }
.woocommerce-no-products-found-wrapper p { color: var(--c-slate-600); margin: 0; font-size: var(--fs-base); }

/* --- Theme / Plugin Overrides --- */
body.post-type-archive-product .shop-page-title,
body.tax-product_cat .shop-page-title,
body.post-type-archive-product .page-title,
body.tax-product_cat .page-title { display: none !important; }
body.post-type-archive-product,
body.tax-product_cat { background: linear-gradient(to bottom right, rgba(248,250,252,0.3), rgba(239,246,255,0.2), rgba(250,245,255,0.2)); }

/* --- Responsive Layout --- */
@media (max-width: 1024px) {
	.shop-layout__container { grid-template-columns: 1fr; }
	.shop-layout__sidebar {
		max-height: none;
	}
    .sidebar-toggle {
        border-radius: 0;
    }
    .sidebar-toggle__icon {
        color: var(--c-slate-600);
        transition: transform 0.3s ease;
    }
    .sidebar-content {
        transition: max-height 0.4s ease, padding 0.4s ease, border-top-width 0.4s ease;
        overflow: hidden;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-top: none;
    }
    .shop-layout__sidebar-inner.is-open .sidebar-content {
        max-height: 1000px;
        border-top: 1px solid var(--c-slate-200);
		overflow-y: auto;
    }
    .shop-layout__sidebar-inner.is-open .sidebar-toggle__icon {
        transform: rotate(180deg);
    }
    .shop-layout__sidebar-inner:not(.is-open) .sidebar-content > * {
        visibility: hidden;
    }
}
@media (max-width: 768px) {
	.shop-layout { padding: 16px; }
	.shop-header__banner { padding: 24px; }
	.shop-header__banner-content { flex-direction: column; gap: 24px; }
	.product-card__inner { flex-direction: column; align-items: flex-start; gap: 16px; padding: 16px; }
	.product-card .product-card__right { flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; width: 100%; gap: 16px !important; }
	.product-card .product-card__price { text-align: left; flex-grow: 1; }
	.product-card .product-card__right .btn, .product-card .product-card__right .button.add_to_cart_button { flex-grow: 1; justify-content: center; min-width: 0; }
    .product-card .product-card__title { white-space: normal; } /* This rule is now redundant but harmless */
}