/* WooCommerce Custom Clients Styles */

:root {
	--wcc-primary: #8D6E63;
	/* Brown 400 */
	--wcc-secondary: #D7CCC8;
	/* Brown 100 */
	--wcc-accent: #FF7043;
	/* Deep Orange 400 */
	--wcc-text: #3E2723;
	/* Brown 900 */
	--wcc-bg: #EFEBE9;
	/* Brown 50 */
	--wcc-white: #ffffff;
}

.wcc-mini-store-container {
	overflow-x: auto;
	margin: 20px 0;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
	border-radius: 8px;
	background: var(--wcc-white);
}

.wcc-mini-store-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 600px;
	/* Ensure table doesn't squish too much on mobile */
}

.wcc-mini-store-table th,
.wcc-mini-store-table td {
	padding: 15px;
	text-align: left;
	border-bottom: 1px solid #eee;
	vertical-align: middle;
}

.wcc-mini-store-table th {
	background-color: var(--wcc-bg);
	color: var(--wcc-text);
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.9em;
}

.wcc-mini-store-table tbody tr:hover {
	background-color: #fafafa;
}

/* Column Widths */
.wcc-col-image {
	width: 80px;
}

.wcc-col-name {
	width: 20%;
}

.wcc-col-desc {
	width: 35%;
}

.wcc-col-price {
	width: 15%;
	font-weight: bold;
	color: var(--wcc-primary);
}

.wcc-col-action {
	width: 15%;
	text-align: right;
}

.wcc-col-qty {
	width: 10%;
}

.wcc-qty-input {
	width: 50px;
	padding: 5px;
	border: 1px solid #ccc;
	border-radius: 4px;
	text-align: center;
}

/* Image Styling */
.wcc-mini-store-table img {
	width: 60px;
	height: auto;
	border-radius: 4px;
	display: block;
}

/* Text Styling */
.wcc-mini-store-table a {
	color: var(--wcc-text);
	text-decoration: none;
	font-weight: 500;
}

.wcc-mini-store-table a:hover {
	color: var(--wcc-primary);
}

.wcc-col-desc {
	font-size: 0.9em;
	color: #666;
}

/* Button Styling */
.wcc-mini-store-table .button {
	background-color: var(--wcc-primary);
	color: var(--wcc-white);
	border: none;
	padding: 8px 15px;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.9em;
	display: inline-block;
	white-space: nowrap;
	transition: background-color 0.2s ease;
}

.wcc-mini-store-table .button:hover {
	background-color: var(--wcc-text);
}

/* Responsive */
@media (max-width: 768px) {
	/* Hide standard table headers */
	.wcc-mini-store-table thead {
		display: none;
	}

	.wcc-mini-store-container {
		box-shadow: none !important;
		background: transparent !important;
		overflow-x: visible !important;
	}

	/* Force table elements to behave like block cards */
	.wcc-mini-store-table {
		min-width: 0 !important;
	}

	.wcc-mini-store-table,
	.wcc-mini-store-table tbody,
	.wcc-mini-store-table tr,
	.wcc-mini-store-table td {
		display: block;
		width: 100% !important;
		box-sizing: border-box;
	}

	.wcc-mini-store-table tr {
		border: 1px solid #e5dcd6;
		border-radius: 8px;
		padding: 15px;
		margin-bottom: 20px;
		background: #ffffff;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
		overflow: hidden;
	}

	.wcc-mini-store-table td {
		padding: 8px 0;
		border-bottom: none;
		text-align: left !important;
		white-space: normal !important;
		word-break: break-word;
	}

	/* Card components positioning */
	.wcc-mini-store-table .wcc-col-image {
		float: left;
		width: 70px !important;
		margin-right: 15px;
		padding-top: 0;
	}

	.wcc-mini-store-table .wcc-col-image img {
		width: 100%;
		height: auto;
		border-radius: 4px;
		display: block;
	}

	.wcc-mini-store-table .wcc-col-name {
		font-size: 1.1em;
		padding-top: 0;
		font-weight: bold;
	}

	.wcc-mini-store-table .wcc-col-desc {
		display: block !important; /* Ensure description is shown in card layout */
		clear: both;
		font-size: 0.9em;
		color: #6d5b55;
		margin: 10px 0;
		line-height: 1.4;
	}

	.wcc-mini-store-table .wcc-col-price {
		font-size: 1.15em;
		font-weight: bold;
		color: var(--wcc-primary);
		display: block;
		margin-bottom: 10px;
	}

	.wcc-mini-store-table .wcc-col-qty {
		display: flex;
		align-items: center;
		margin-bottom: 12px;
		gap: 10px;
	}

	.wcc-mini-store-table .wcc-col-qty::before {
		content: "Cantidad:";
		font-weight: 600;
		font-size: 0.9em;
		color: var(--wcc-text);
		min-width: 70px;
	}

	.wcc-mini-store-table .wcc-col-action {
		text-align: left;
		padding-bottom: 0;
	}

	.wcc-mini-store-table .wcc-col-action .button,
	.wcc-mini-store-table .wcc-col-action button {
		width: 100%;
		text-align: center;
		padding: 10px;
		display: block;
		font-size: 1em;
	}
}

/* Custom Mini Store Layout & Navigation */
.wcc-mini-store-wrapper {
	max-width: 100%;
	font-family: inherit;
	color: var(--wcc-text);
}

.wcc-store-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 2px solid var(--wcc-secondary);
	margin-bottom: 25px;
	padding-bottom: 10px;
}

.wcc-nav-tabs {
	display: flex;
	gap: 10px;
}

.wcc-nav-tab {
	background: none;
	border: none;
	color: #777;
	font-size: 1.05em;
	font-weight: 600;
	padding: 8px 16px;
	cursor: pointer;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.wcc-nav-tab:hover,
.wcc-nav-tab.active {
	background-color: var(--wcc-bg);
	color: var(--wcc-text);
}

.wcc-nav-cart {
	display: flex;
	align-items: center;
	gap: 8px;
	background-color: var(--wcc-primary);
	color: var(--wcc-white);
	padding: 8px 16px;
	border-radius: 20px;
	cursor: pointer;
	font-weight: bold;
	transition: background-color 0.2s ease;
}

.wcc-nav-cart:hover {
	background-color: var(--wcc-text);
}

.wcc-cart-icon {
	font-size: 1.2em;
}

.wcc-cart-badge {
	background-color: var(--wcc-accent);
	color: var(--wcc-white);
	border-radius: 50%;
	padding: 2px 8px;
	font-size: 0.85em;
	min-width: 20px;
	text-align: center;
}

/* Store View Toggling */
.wcc-store-view {
	display: none;
}

.wcc-store-view.active {
	display: block;
}

/* Quantity Selector Stepper */
.wcc-qty-selector {
	display: inline-flex;
	align-items: center;
	border: 1px solid #ccc;
	border-radius: 4px;
	background-color: #fff;
	overflow: hidden;
}

.wcc-qty-btn {
	background: #f5f5f5;
	border: none;
	width: 32px;
	height: 32px;
	font-size: 1.2em;
	font-weight: bold;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	color: var(--wcc-text);
}

.wcc-qty-btn:hover {
	background: #e8e8e8;
}

.wcc-qty-input-field,
.wcc-qty-input-summary {
	width: 45px;
	height: 32px;
	border: none;
	border-left: 1px solid #ccc;
	border-right: 1px solid #ccc;
	text-align: center;
	font-size: 0.95em;
	font-weight: bold;
	color: var(--wcc-text);
	-moz-appearance: textfield;
}

.wcc-qty-input-field::-webkit-outer-spin-button,
.wcc-qty-input-field::-webkit-inner-spin-button,
.wcc-qty-input-summary::-webkit-outer-spin-button,
.wcc-qty-input-summary::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Button & Action Styling */
.wcc-add-btn {
	background-color: var(--wcc-primary);
	color: var(--wcc-white);
	cursor: pointer;
	border: none;
	font-weight: 600;
	transition: background-color 0.2s ease, transform 0.1s ease;
}

.wcc-add-btn:active {
	transform: scale(0.96);
}

.wcc-add-btn.success-state {
	background-color: #4CAF50 !important;
	color: white;
}

.wcc-btn-primary {
	background-color: var(--wcc-accent);
	color: var(--wcc-white);
	border: none;
	padding: 12px 24px;
	font-size: 1.05em;
	font-weight: bold;
	border-radius: 4px;
	cursor: pointer;
	transition: opacity 0.2s, background-color 0.2s;
}

.wcc-btn-primary:hover {
	background-color: var(--wcc-text);
}

.wcc-btn-primary:disabled {
	background-color: #ccc;
	cursor: not-allowed;
}

.wcc-btn-secondary {
	background-color: #f5f5f5;
	color: var(--wcc-text);
	border: 1px solid #ccc;
	padding: 12px 24px;
	font-size: 1.05em;
	font-weight: bold;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s;
}

.wcc-btn-secondary:hover {
	background-color: #e8e8e8;
}

.wcc-catalog-footer {
	text-align: right;
	margin-top: 20px;
}

/* Cart Summary & Table */
.wcc-cart-summary-table,
.wcc-history-table {
	width: 100%;
	border-collapse: collapse;
	background-color: #fff;
}

.wcc-cart-summary-table th,
.wcc-cart-summary-table td,
.wcc-history-table th,
.wcc-history-table td {
	padding: 15px;
	text-align: left;
	border-bottom: 1px solid #eee;
	vertical-align: middle;
}

.wcc-cart-summary-table th,
.wcc-history-table th {
	background-color: var(--wcc-bg);
	color: var(--wcc-text);
	font-weight: 600;
	text-transform: uppercase;
	font-size: 0.9em;
}

.wcc-qty-btn-summary {
	background: #f5f5f5;
	border: none;
	width: 28px;
	height: 28px;
	font-size: 1.1em;
	font-weight: bold;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wcc-text);
}

.wcc-qty-btn-summary:hover {
	background: #e8e8e8;
}

.wcc-cart-totals {
	text-align: right;
	margin: 25px 0;
	font-size: 1.25em;
}

#wcc-cart-total-amount {
	color: var(--wcc-accent);
	font-weight: bold;
	margin-left: 10px;
}

.wcc-cart-actions {
	display: flex;
	justify-content: space-between;
	margin-top: 20px;
}

/* Success Screen */
.wcc-success-screen {
	text-align: center;
	padding: 40px 20px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 4px 6px rgba(0,0,0,0.05);
	max-width: 600px;
	margin: 40px auto;
}

.wcc-success-icon {
	width: 80px;
	height: 80px;
	background-color: #4CAF50;
	color: white;
	font-size: 40px;
	line-height: 80px;
	border-radius: 50%;
	margin: 0 auto 20px auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Status Badges */
.wcc-status-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 0.85em;
	font-weight: 600;
}

.wcc-status-badge.status-completed {
	background-color: #e8f5e9;
	color: #2e7d32;
}