/*
 * Deco Will Inicio - Shortcodes WooCommerce
 * Diseño inspirado en la portada de referencia entregada por el cliente.
 */

.dw-home-shortcodes,
.dw-home-shortcodes * {
	box-sizing: border-box;
}

.dw-home-shortcodes {
	--dw-olive: #6f774b;
	--dw-olive-dark: #5e6640;
	--dw-gold: #c99c4a;
	--dw-text: #2f302b;
	--dw-muted: #77766f;
	--dw-border: #eceae5;
	--dw-surface: #ffffff;
	--dw-image-bg: #f8f7f4;
	width: 100%;
}

/* ---------- Categorías ---------- */
.dw-category-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
}

.dw-category-card {
	position: relative;
	display: block;
	min-width: 0;
	overflow: hidden;
	border-radius: 5px;
	background: var(--dw-surface);
	box-shadow: 0 1px 2px rgba(34, 31, 24, 0.08);
	text-decoration: none !important;
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.dw-category-card:hover,
.dw-category-card:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 7px 18px rgba(34, 31, 24, 0.12);
}

.dw-category-card__image-wrap {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--dw-image-bg);
}

.dw-category-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 300ms ease;
}

.dw-category-card:hover .dw-category-card__image {
	transform: scale(1.025);
}

.dw-category-card__title {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 33px;
	padding: 7px 10px 8px;
	background: var(--dw-olive);
	color: #fff;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
}

/* ---------- Productos ---------- */
.dw-product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.dw-product-card {
	position: relative;
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--dw-border);
	border-radius: 5px;
	background: var(--dw-surface);
	box-shadow: 0 1px 2px rgba(34, 31, 24, 0.025);
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.dw-product-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(34, 31, 24, 0.08);
}

.dw-product-card__media {
	position: relative;
	display: flex;
	aspect-ratio: 1 / 0.92;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: var(--dw-image-bg);
}

.dw-product-card__image-link {
	display: flex;
	width: 100%;
	height: 100%;
	align-items: center;
	justify-content: center;
	padding: 14px;
	text-decoration: none !important;
}

.dw-product-card__image,
.woocommerce .dw-product-card__image {
	display: block !important;
	width: 100% !important;
	max-width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: contain;
	transition: transform 260ms ease;
}

.dw-product-card:hover .dw-product-card__image {
	transform: scale(1.025);
}

.dw-product-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 23px;
	padding: 4px 9px;
	border-radius: 2px;
	background: var(--dw-gold);
	color: #fff;
	font-size: 10px;
	font-weight: 500;
	line-height: 1;
}

.dw-product-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 10px 11px 11px;
}

.dw-product-card__category {
	margin: 0 0 4px;
	color: var(--dw-muted);
	font-size: 10px;
	font-weight: 400;
	line-height: 1.3;
}

.dw-product-card__name {
	display: -webkit-box;
	overflow: hidden;
	min-height: 35px;
	margin: 0 0 8px;
	color: var(--dw-text) !important;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.25;
	text-decoration: none !important;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.dw-product-card__name:hover,
.dw-product-card__name:focus-visible {
	color: var(--dw-olive-dark) !important;
}

.dw-product-card__footer {
	display: flex;
	min-height: 34px;
	align-items: flex-end;
	justify-content: space-between;
	gap: 8px;
	margin-top: auto;
}

.dw-product-card__price {
	padding-bottom: 2px;
	color: var(--dw-text);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.15;
}

.dw-product-card__price del {
	display: block;
	margin-bottom: 2px;
	color: #99978f;
	font-size: 11px;
	font-weight: 400;
	opacity: 0.9;
}

.dw-product-card__price ins {
	background: transparent;
	color: inherit;
	text-decoration: none;
}

.dw-home-shortcodes .dw-product-card__cart.button,
.woocommerce .dw-home-shortcodes .dw-product-card__cart.button {
	display: inline-flex !important;
	width: 33px !important;
	min-width: 33px !important;
	height: 33px !important;
	min-height: 33px !important;
	align-items: center !important;
	justify-content: center !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 2px !important;
	background: var(--dw-olive) !important;
	box-shadow: none !important;
	color: #fff !important;
	font-size: 0 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	transition: background-color 160ms ease, transform 160ms ease;
}

.dw-home-shortcodes .dw-product-card__cart.button:hover,
.dw-home-shortcodes .dw-product-card__cart.button:focus-visible,
.woocommerce .dw-home-shortcodes .dw-product-card__cart.button:hover,
.woocommerce .dw-home-shortcodes .dw-product-card__cart.button:focus-visible {
	background: var(--dw-olive-dark) !important;
	color: #fff !important;
	transform: translateY(-1px);
}

.dw-cart-icon {
	display: block;
	width: 18px;
	height: 18px;
}

.dw-home-shortcodes .added_to_cart.wc-forward {
	display: none !important;
}

/* ---------- Responsive solicitado ---------- */
@media (max-width: 1024px) {
	.dw-category-grid,
	.dw-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.dw-category-grid,
	.dw-product-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.dw-category-card__title {
		min-height: 38px;
		font-size: 14px;
	}

	.dw-product-card__media {
		aspect-ratio: 1 / 0.84;
	}

	.dw-product-card__image-link {
		padding: 18px;
	}

	.dw-product-card__body {
		padding: 12px 13px 13px;
	}

	.dw-product-card__category {
		font-size: 11px;
	}

	.dw-product-card__name {
		min-height: auto;
		font-size: 15px;
	}

	.dw-product-card__price {
		font-size: 17px;
	}
}
