/**
 * My Offers Plugin - Frontend Styles
 * Compatible with Woodmart Theme
 */

/* ============================================
   Badges & Labels
   ============================================ */

.my-offers-badge {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	line-height: 1.4;
	z-index: 10;
	position: relative;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Badge on Shop/Archive Pages */
.my-offers-badge-loop {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 20;
}

/* Badge on Single Product */
.my-offers-badge-single {
	margin-bottom: 15px;
	display: block;
}

/* Badge Types */
.my-offers-badge-bundle {
	/* Bundle specific styles */
}

.my-offers-badge-flash {
	animation: pulse 2s infinite;
}

.my-offers-badge-bogo {
	/* BOGO specific styles */
}

@keyframes pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

/* Woodmart Theme Compatibility */
.woodmart-product-badge.my-offers-woodmart-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 20;
}

/* ============================================
   Bundle Products
   ============================================ */

.my-offers-bundle-wrapper {
	margin: 20px 0;
	padding: 20px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	background: #f9f9f9;
}

.my-offers-bundle-title {
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 15px;
	color: #333;
}

.my-offers-bundle-products {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
	margin-bottom: 20px;
}

.my-offers-bundle-product-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 15px;
	background: #fff;
	border-radius: 6px;
	border: 1px solid #e0e0e0;
	text-align: center;
}

.my-offers-bundle-product-image {
	margin-bottom: 10px;
}

.my-offers-bundle-product-image img {
	max-width: 100px;
	height: auto;
	border-radius: 4px;
}

.my-offers-bundle-product-info h4 {
	font-size: 14px;
	margin: 0 0 8px 0;
	color: #333;
}

.my-offers-bundle-product-price {
	font-size: 14px;
	color: #666;
	margin-bottom: 10px;
}

.my-offers-bundle-product-quantity {
	margin-top: 10px;
}

.my-offers-bundle-product-quantity label {
	display: block;
	margin-bottom: 5px;
	font-size: 12px;
	color: #666;
}

.my-offers-bundle-product-quantity input {
	width: 60px;
	padding: 5px;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-align: center;
}

.my-offers-bundle-pricing {
	padding: 15px;
	background: #fff;
	border-radius: 6px;
	margin-bottom: 15px;
}

.my-offers-bundle-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.my-offers-bundle-regular-price {
	font-size: 14px;
	color: #999;
}

.my-offers-bundle-regular-price del {
	margin-right: 10px;
}

.my-offers-bundle-bundle-price {
	font-size: 18px;
	font-weight: 600;
	color: #333;
}

.my-offers-bundle-savings {
	font-size: 14px;
	color: #00aa00;
	font-weight: 600;
	margin-bottom: 10px;
}

.my-offers-bundle-free-shipping {
	font-size: 14px;
	color: #00aa00;
	font-weight: 600;
}

.my-offers-add-bundle-to-cart {
	width: 100%;
	padding: 12px 20px;
	font-size: 16px;
	font-weight: 600;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.3s;
}

.my-offers-add-bundle-to-cart:hover {
	background: #005a87;
}

.my-offers-add-bundle-to-cart:disabled {
	background: #ccc;
	cursor: not-allowed;
}

/* ============================================
   Flash Offers
   ============================================ */

.my-offers-flash-wrapper {
	margin: 20px 0;
	padding: 20px;
	border: 2px dashed #ff6b6b;
	border-radius: 8px;
	background: #fff5f5;
}

.my-offers-flash-content {
	text-align: center;
}

.my-offers-flash-gift-info {
	margin-bottom: 20px;
}

.my-offers-flash-gift-info h4 {
	font-size: 18px;
	color: #ff6b6b;
	margin-bottom: 15px;
}

.my-offers-flash-gift-image {
	margin-bottom: 10px;
}

.my-offers-flash-gift-image img {
	max-width: 120px;
	height: auto;
	border-radius: 4px;
}

.my-offers-flash-gift-name {
	font-size: 16px;
	font-weight: 600;
	color: #333;
	margin-bottom: 5px;
}

.my-offers-flash-gift-price {
	font-size: 14px;
	color: #666;
}

/* ============================================
   BOGO Offers
   ============================================ */

.my-offers-bogo-wrapper {
	margin: 20px 0;
	padding: 20px;
	border: 2px solid #00aa00;
	border-radius: 8px;
	background: #f0fff4;
}

.my-offers-bogo-content {
	text-align: center;
}

.my-offers-bogo-message {
	font-size: 18px;
	font-weight: 600;
	color: #00aa00;
	margin-bottom: 20px;
}

.my-offers-bogo-free-product {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
	margin-bottom: 15px;
	padding: 15px;
	background: #fff;
	border-radius: 6px;
}

.my-offers-bogo-free-image {
	flex-shrink: 0;
}

.my-offers-bogo-free-image img {
	max-width: 80px;
	height: auto;
	border-radius: 4px;
}

.my-offers-bogo-free-info {
	text-align: left;
}

.my-offers-bogo-free-info h4 {
	font-size: 14px;
	margin: 0 0 5px 0;
	color: #666;
}

.my-offers-bogo-free-info p {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #333;
}

.my-offers-bogo-free-price {
	font-size: 14px;
	color: #666;
	margin-top: 5px;
}

.my-offers-bogo-limit-info {
	font-size: 12px;
	color: #666;
	margin-top: 10px;
}

.my-offers-bogo-limit-reached {
	font-size: 14px;
	color: #ff6b6b;
	font-weight: 600;
	margin-top: 10px;
}

/* ============================================
   Countdown Timer
   ============================================ */

.my-offers-countdown {
	margin-top: 20px;
	padding: 15px;
	background: #fff;
	border-radius: 6px;
	text-align: center;
}

.my-offers-countdown-label {
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 10px;
	color: #333;
}

.my-offers-countdown-timer {
	display: flex;
	justify-content: center;
	gap: 10px;
	font-size: 24px;
	font-weight: 700;
	font-family: 'Courier New', monospace;
}

.my-offers-countdown-timer span {
	padding: 8px 12px;
	background: #f0f0f0;
	border-radius: 4px;
	min-width: 50px;
	display: inline-block;
	text-align: center;
}

/* ============================================
   Cart Items
   ============================================ */

.my-offers-free-gift-label {
	font-size: 12px;
	color: #00aa00;
	font-weight: 600;
	font-style: italic;
}

.my-offers-bundle-item-label {
	font-size: 12px;
	color: #0073aa;
	font-weight: 600;
	font-style: italic;
}

.my-offers-gift-quantity {
	display: inline-block;
	padding: 5px 10px;
	background: #f0f0f0;
	border-radius: 4px;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
	.my-offers-bundle-products {
		grid-template-columns: 1fr;
	}
	
	.my-offers-bundle-total {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	
	.my-offers-bogo-free-product {
		flex-direction: column;
		text-align: center;
	}
	
	.my-offers-bogo-free-info {
		text-align: center;
	}
	
	.my-offers-countdown-timer {
		font-size: 18px;
		gap: 5px;
	}
	
	.my-offers-countdown-timer span {
		min-width: 40px;
		padding: 6px 8px;
	}
}

/* ============================================
   Woodmart Theme Specific
   ============================================ */

/* Woodmart Product Badge */
.woodmart-product-badge.my-offers-woodmart-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 20;
}

/* Woodmart Sticky Add to Cart */
.my-offers-sticky-badge {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	margin-left: 10px;
}

/* ============================================
   Loading States
   ============================================ */

.my-offers-loading {
	opacity: 0.6;
	pointer-events: none;
}

.my-offers-loading::after {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
	margin-left: 10px;
	vertical-align: middle;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

