/**
 * Atomic Elements – One Page Checkout frontend storefront styles.
 */

/* Wrapper ---------------------------------------------------------- */

.atomel-opc-wrap {
	max-width: 1200px;
	margin: 0 auto;
}

.atomel-opc-empty {
	text-align: center;
	padding: 40px 20px;
	color: #646970;
	font-style: italic;
}

/* Product grid / list / dropdown ----------------------------------- */

.atomel-opc-grid {
	display: grid;
	grid-template-columns: repeat(var(--atomel-opc-columns, 3), 1fr);
	gap: 20px;
	margin-bottom: 40px;
}

.atomel-opc-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 40px;
}

.atomel-opc-dropdown-wrap {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 40px;
}

.atomel-opc-product-select {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
}

/* Product card ----------------------------------------------------- */

.atomel-opc-card {
	background: #fff;
	border: 2px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.atomel-opc-card:hover {
	border-color: #d1d5db;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.atomel-opc-card--selected {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.atomel-opc-card--list {
	flex-direction: row;
	align-items: center;
}

.atomel-opc-card--list .atomel-opc-card__img {
	width: 80px;
	min-width: 80px;
}

.atomel-opc-card--list .atomel-opc-card__img img {
	height: 80px;
	object-fit: cover;
}

.atomel-opc-card__img img {
	width: 100%;
	height: auto;
	display: block;
}

.atomel-opc-card__body {
	padding: 16px;
	flex: 1;
}

.atomel-opc-card__title {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 600;
	color: #1e1e1e;
}

.atomel-opc-card__desc {
	margin: 0 0 8px;
	font-size: 13px;
	color: #646970;
	line-height: 1.45;
}

.atomel-opc-card__price {
	font-size: 15px;
	font-weight: 600;
	color: #2271b1;
}

.atomel-opc-card__price del {
	color: #9ca3af;
	font-weight: 400;
}

.atomel-opc-card__price ins {
	text-decoration: none;
}

.atomel-opc-card__actions {
	padding: 12px 16px;
	border-top: 1px solid #f3f4f6;
	display: flex;
	align-items: center;
	gap: 10px;
}

.atomel-opc-card--list .atomel-opc-card__actions {
	border-top: none;
	border-left: 1px solid #f3f4f6;
	flex-direction: column;
	padding: 16px;
	min-width: 130px;
}

/* Buttons ---------------------------------------------------------- */

.atomel-opc-add {
	background: #2271b1 !important;
	color: #fff !important;
	border: none !important;
	border-radius: 6px !important;
	padding: 8px 20px !important;
	font-weight: 600 !important;
	font-size: 13px !important;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
	width: 100%;
}

.atomel-opc-add:hover {
	background: #135e96 !important;
}

.atomel-opc-add:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.atomel-opc-remove {
	background: #fee2e2 !important;
	color: #dc2626 !important;
	border: none !important;
	border-radius: 6px !important;
	padding: 6px 14px !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	cursor: pointer;
}

.atomel-opc-remove:hover {
	background: #fecaca !important;
}

/* Quantity controls ------------------------------------------------ */

.atomel-opc-card__qty-wrap {
	display: flex;
	align-items: center;
	gap: 0;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	overflow: hidden;
}

.atomel-opc-qty-btn {
	background: #f9fafb;
	border: none;
	width: 32px;
	height: 32px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	color: #374151;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
}

.atomel-opc-qty-btn:hover {
	background: #f3f4f6;
}

.atomel-opc-qty-value {
	min-width: 32px;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: #1e1e1e;
}

/* Checkout section ------------------------------------------------- */

.atomel-opc-checkout {
	margin-top: 20px;
}

.atomel-opc-order-review {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 30px;
}

/* Loading state ---------------------------------------------------- */

.atomel-opc-card--loading {
	opacity: 0.5;
	pointer-events: none;
}

/* Responsive ------------------------------------------------------- */

@media (max-width: 768px) {
	.atomel-opc-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.atomel-opc-card--list {
		flex-direction: column;
	}
	.atomel-opc-card--list .atomel-opc-card__img {
		width: 100%;
	}
	.atomel-opc-card--list .atomel-opc-card__actions {
		border-left: none;
		border-top: 1px solid #f3f4f6;
		flex-direction: row;
		width: 100%;
		box-sizing: border-box;
	}
}

@media (max-width: 480px) {
	.atomel-opc-grid {
		grid-template-columns: 1fr;
	}
}

/* Single product: embedded checkout -------------------------------- */

.atomel-opc-single-embed {
	width: 100%;
	margin-top: 1.5rem;
	clear: both;
}

.atomel-opc-single-embed .woocommerce-checkout {
	max-width: 100%;
}

body.atomel-opc-single-two-column .product {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	align-items: flex-start;
}

body.atomel-opc-single-two-column .product .woocommerce-product-gallery {
	flex: 1 1 320px;
	max-width: 100%;
}

body.atomel-opc-single-two-column .product .summary,
body.atomel-opc-single-two-column .product .entry-summary {
	flex: 1 1 360px;
	max-width: 100%;
}

@media (max-width: 768px) {
	body.atomel-opc-single-two-column .product {
		flex-direction: column;
	}
}
