/**
 * WooCommerce Styles
 * 
 * @package UnDetalle
 * @since 1.0.0
 */

/* ============================================
   SHOP / ARCHIVE PAGES
   ============================================ */
.woocommerce-breadcrumb {
	padding: var(--spacing-md) 0;
	font-size: 0.9rem;
	color: #666;
}

.category-banner {
	width: 100%;
	margin-bottom: var(--spacing-lg);
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.category-banner img {
	width: 100%;
	height: auto;
	display: block;
}

.woocommerce-result-count,
.woocommerce-ordering {
	margin-bottom: var(--spacing-md);
}

.woocommerce-ordering select {
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: var(--radius-sm);
}

/* Product Loop */
.woocommerce ul.products {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--spacing-lg);
}

.woocommerce ul.products li.product {
	background: var(--color-white);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: transform var(--transition-normal), box-shadow var(--transition-normal);
	box-shadow: var(--shadow-sm);
	position: relative;
}

.woocommerce ul.products li.product:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-lg);
}

.woocommerce ul.products li.product img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform var(--transition-slow);
}

.woocommerce ul.products li.product:hover img {
	transform: scale(1.05);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 1.1rem;
	margin: var(--spacing-md) 0 0.5rem;
	padding: 0 var(--spacing-md);
	color: var(--color-dark);
}

.woocommerce ul.products li.product .price {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--color-primary);
	padding: 0 var(--spacing-md) var(--spacing-md);
}

.woocommerce ul.products li.product .price del {
	color: #999;
	font-size: 1rem;
	margin-right: 0.5rem;
}

.woocommerce ul.products li.product .button {
	width: 100%;
	margin: 0;
	border-radius: 0;
	text-align: center;
}

/* Pagination */
.woocommerce-pagination {
	text-align: center;
	padding: var(--spacing-xl) 0;
}

.woocommerce-pagination ul {
	list-style: none;
	display: inline-flex;
	gap: 0.5rem;
	border: none;
}

.woocommerce-pagination ul li {
	margin: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 2px solid var(--color-primary);
	border-radius: var(--radius-sm);
	color: var(--color-primary);
	text-decoration: none;
	transition: all var(--transition-fast);
}

.woocommerce-pagination ul li a:hover,
.woocommerce-pagination ul li span.current {
	background-color: var(--color-primary);
	color: var(--color-white);
}

/* ============================================
   SINGLE PRODUCT
   ============================================ */
.woocommerce div.product {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.woocommerce div.product .woocommerce-product-gallery {
	position: sticky;
	top: 100px;
	align-self: start;
}

.woocommerce div.product .woocommerce-product-gallery__image img {
	width: 100%;
	border-radius: var(--radius-lg);
}

.woocommerce div.product .summary {
	padding: var(--spacing-md);
}

.woocommerce div.product .summary .product_title {
	font-size: 2.5rem;
	margin-bottom: var(--spacing-md);
	color: var(--color-dark);
}

.woocommerce div.product .summary .price {
	font-size: 2rem;
	font-weight: 700;
	color: var(--color-primary);
	margin-bottom: var(--spacing-md);
}

.woocommerce div.product .summary .price del {
	color: #999;
	font-size: 1.5rem;
	margin-right: 0.5rem;
}

.woocommerce div.product .summary .woocommerce-product-details__short-description {
	margin-bottom: var(--spacing-lg);
	line-height: 1.6;
	color: #666;
}

/* Product Fields */
.product-fields {
	margin-bottom: var(--spacing-lg);
}

.product-field {
	margin-bottom: var(--spacing-md);
	padding: var(--spacing-md);
	background-color: #f9f9f9;
	border-radius: var(--radius-md);
}

.product-field label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
}

.product-field.card-message {
	background-color: rgba(236, 89, 112, 0.1);
}

.product-field textarea {
	width: 100%;
	min-height: 100px;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: var(--radius-sm);
	resize: vertical;
}

/* Photo Upload */
.photo-upload-container {
	padding: var(--spacing-md);
	border: 2px dashed #ddd;
	border-radius: var(--radius-md);
	text-align: center;
}

.photo-preview {
	margin-top: var(--spacing-md);
	min-height: 150px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.photo-preview img {
	max-width: 100%;
	max-height: 200px;
	border-radius: var(--radius-sm);
}

/* Complements */
.complements-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: var(--spacing-md);
	margin-top: var(--spacing-md);
}

.complement-item {
	text-align: center;
	padding: var(--spacing-sm);
	border: 2px solid #ddd;
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: all var(--transition-fast);
}

.complement-item:hover {
	border-color: var(--color-primary);
}

.complement-item.selected {
	border-color: var(--color-primary);
	background-color: rgba(236, 89, 112, 0.1);
}

.complement-item img {
	width: 100%;
	height: 80px;
	object-fit: cover;
	border-radius: var(--radius-sm);
	margin-bottom: 0.5rem;
}

.complement-item .name {
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.25rem;
}

.complement-item .price {
	color: var(--color-primary);
	font-weight: 700;
	font-size: 0.85rem;
}

/* Delivery Date Selection */
.delivery-date-selector {
	margin-bottom: var(--spacing-md);
}

.date-options {
	display: flex;
	gap: var(--spacing-sm);
	margin-bottom: var(--spacing-md);
}

.date-option {
	flex: 1;
	padding: var(--spacing-md);
	border: 2px solid #ddd;
	border-radius: var(--radius-md);
	text-align: center;
	cursor: pointer;
	transition: all var(--transition-fast);
}

.date-option:hover {
	border-color: var(--color-primary);
}

.date-option.selected {
	border-color: var(--color-primary);
	background-color: rgba(236, 89, 112, 0.1);
}

.time-range-options {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--spacing-sm);
}

.time-range-option {
	padding: var(--spacing-sm);
	border: 2px solid #ddd;
	border-radius: var(--radius-md);
	text-align: center;
	cursor: pointer;
	transition: all var(--transition-fast);
}

.time-range-option:hover {
	border-color: var(--color-primary);
}

.time-range-option input:checked + span {
	color: var(--color-primary);
	font-weight: 600;
}

/* Cart Form */
.woocommerce div.product form.cart {
	margin-bottom: var(--spacing-lg);
}

.woocommerce div.product form.cart .quantity {
	display: inline-flex;
	margin-right: var(--spacing-sm);
}

.woocommerce div.product form.cart .quantity input {
	width: 80px;
	padding: 12px;
	text-align: center;
	border: 1px solid #ddd;
	border-radius: var(--radius-sm);
}

.woocommerce div.product form.cart .button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

/* Product Tabs */
.woocommerce-tabs {
	margin-top: var(--spacing-xl);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--spacing-xl);
}

.woocommerce-tabs .panel {
	padding: var(--spacing-lg);
	background-color: #f9f9f9;
	border-radius: var(--radius-lg);
}

.woocommerce-tabs .panel h2 {
	margin-bottom: var(--spacing-md);
	color: var(--color-dark);
}

/* ============================================
   CHECKOUT
   ============================================ */
body.undetalle-checkout #primary {
	max-width: 1400px;
	margin: 0 auto;
	padding: var(--spacing-lg);
}

.checkout-logo {
	text-align: center;
	margin-bottom: var(--spacing-xl);
}

.checkout-logo img {
	max-height: 60px;
}


.woocommerce-checkout .col2-set {
	grid-column: 1;
}

#order_review {
	grid-column: 2;
	align-self: stretch;
	border-radius: var(--radius-lg);
	position: static;
	top: auto;
}

.delivery-type-selector,
.invoice-fields {
	margin-bottom: var(--spacing-lg);
	padding: var(--spacing-lg);
	background: #f9f9f9;
	border-radius: var(--radius-lg);
}

.delivery-type-selector h3,
.invoice-fields h3 {
	margin: 0 0 var(--spacing-md) 0;
}

.recipient-type-selector {
	display: flex;
	gap: var(--spacing-md);
	margin-bottom: var(--spacing-md);
}

#google-maps-container {
	margin: var(--spacing-md) 0;
}

#map-search {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: var(--radius-sm);
}

#map {
	border-radius: var(--radius-md);
}

.optional{
	display: none;
}

.pickup-info-box {
	padding: var(--spacing-lg);
	background: #fff;
	border-radius: var(--radius-md);
	border-left: 4px solid var(--color-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
	.woocommerce ul.products {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.woocommerce div.product {
		grid-template-columns: 1fr;
	}
	
	.woocommerce div.product .woocommerce-product-gallery {
		position: relative;
		top: 0;
	}
	
	.woocommerce-checkout {
		grid-template-columns: 1fr;
	}
	
	#order_review {
		position: static;
		top: auto;
	}
}

@media (max-width: 768px) {
	.woocommerce ul.products {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--spacing-md);
	}
	
	.woocommerce div.product .summary .product_title {
		font-size: 1.8rem;
	}
	
	.woocommerce div.product .summary .price {
		font-size: 1.5rem;
	}
	
	.complements-grid {
		grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	}
	
	.time-range-options {
		grid-template-columns: 1fr;
	}
	
	.woocommerce-tabs {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.date-options {
		flex-direction: column;
	}
}

/* ============================================
   MENSAJES DE WOOCOMMERCE - Mejorados
   ============================================ */
/* Mensaje "Añadido al carrito" - Estilo card bonito */
.woocommerce-message.undetalle-cart-message {
	background: linear-gradient(135deg, #ffffff 0%, #fff5f7 100%);
	border: 2px solid #EC5970;
	border-left: 6px solid #EC5970;
	border-radius: 16px;
	padding: 18px 22px;
	margin: 20px 0;
	box-shadow: 0 8px 25px rgba(236, 89, 112, 0.2);
	display: flex !important;
	align-items: center;
	gap: 15px;
	animation: slideInDown 0.5s ease-out;
}

.woocommerce-message.undetalle-cart-message .message-icon {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	background: linear-gradient(135deg, #EC5970 0%, #e94562 100%);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(236, 89, 112, 0.3);
}

.woocommerce-message.undetalle-cart-message .message-icon svg {
	stroke: white;
	width: 22px;
	height: 22px;
}

.woocommerce-message.undetalle-cart-message .message-text {
	flex: 1;
	color: #242424;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.4;
}

.woocommerce-message.undetalle-cart-message::before {
	display: none !important;
}

@keyframes slideInDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ============================================
   CHECKOUT - CAMPOS OCULTOS
   ============================================ */
/* Ocultar campo de País */
#billing_country_field {
	display: none !important;
}

/* Ocultar campo de Ciudad */
#billing_city_field {
	display: none !important;
}

/* Ocultar campo de Región/Provincia */
#billing_state_field {
	display: none !important;
}


