/* Ecommerce för Markbelysning Skandinavien AB */

/* Search Dropdown Styles - Prefixed with .search */
.search-dropdown-wrapper {
	position: relative;
	width: 100%;
	max-width: 500px;
}

.search-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.search-input {
	width: 100%;
	padding: 12px 40px 12px 16px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 16px;
	outline: none;
	transition: border-color 0.2s;
	box-sizing: border-box;
	font-family: inherit;
}

.search-input:focus {
	border-color: #2c5aa0;
}

.search-clear {
	position: absolute;
	right: 8px;
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	padding: 4px 8px;
	color: #666;
	border-radius: 50%;
	transition: background-color 0.2s;
	font-family: inherit;
}

.search-clear:hover {
	background-color: #f0f0f0;
}

.search-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: white;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.1);
	z-index: 1000;
	max-height: 400px;
	overflow-y: auto;
	margin-top: 4px;
}

.search-section {
	border-bottom: 1px solid #f0f0f0;
}

.search-section:last-child {
	border-bottom: none;
}

.search-section-header {
	padding: 12px 16px 8px;
	font-weight: 600;
	color: #666;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.search-item {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	text-decoration: none;
	color: inherit;
	transition: background-color 0.2s;
	border-bottom: 1px solid #f8f8f8;
}

.search-item:hover {
	background-color: #f8f9fa;
	text-decoration: none;
}

.search-item:last-child {
	border-bottom: none;
}

.search-item-image {
	width: 48px;
	height: 48px;
	margin-right: 12px;
	flex-shrink: 0;
}

.search-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 4px;
}

.search-item-content {
	flex: 1;
	min-width: 0;
}

.search-item-name {
	font-weight: 600;
	color: #333;
	margin-bottom: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.search-item-category,
.search-item-description {
	color: #666;
	font-size: 14px;
	margin-bottom: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.search-item-price,
.search-item-count {
	color: #2c5aa0;
	font-weight: 600;
	font-size: 14px;
}

.search-footer {
	padding: 12px 16px;
	border-top: 1px solid #f0f0f0;
	background-color: #f8f9fa;
}

.search-view-all {
	display: block;
	text-align: center;
	padding: 8px 16px;
	background-color: #2c5aa0;
	color: white;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
	transition: background-color 0.2s;
}

.search-view-all:hover {
	background-color: #1e3f73;
	text-decoration: none;
	color: white;
}

.search-loading,
.search-error,
.search-no-results {
	padding: 20px;
	text-align: center;
	color: #666;
}

.search-error {
	color: #d32f2f;
}

/* Responsiv design */
@media (max-width: 768px) {
	.search-dropdown-wrapper {
		max-width: 100%;
	}
	
	.search-item-image {
		width: 40px;
		height: 40px;
	}
	
	.search-item {
		padding: 10px 12px;
	}
	
	.search-input {
		font-size: 16px; /* Förhindrar zoom på iOS */
	}
}

/* Product Layout */
.product-layout {
	display: flex;
	gap: 30px;
	margin: 20px 0;
}


.product-brand {
	margin: 10px 0;
	padding: 8px 0;
}

.brand-link {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: inherit;
	transition: opacity 0.2s;
}

.brand-link:hover {
	opacity: 0.7;
}

.brand-image {
	max-width: 60px;
	max-height: 40px;
	object-fit: contain;
}

.brand-name {
	font-size: 14px;
	font-weight: 500;
}

.discount-price {
	color: #d32f2f;        /* Röd färg för att visa rabatt */
	font-weight: bold;
	font-size: 1.2em;
	margin-right: 0.5em;
}

.original-price {
	text-decoration: line-through;
	color: #999;
	font-size: 0.9em;
}


.gallery-column {
	flex: 2;
	min-width: 0; /* Prevents flex item from overflowing */
}

.variant-column {
	flex: 1;
	min-width: 300px;
}

/* Variant Selectors */
.variant-selectors {
	padding: 20px;
	border-radius: 8px;
	background: #f8f9fa;
	height: fit-content;
	margin-bottom: 20px;
}

.variant-attribute {
	margin-bottom: 15px;
}

.variant-attribute:last-child {
	margin-bottom: 0;
}

.variant-attribute-label {
	display: block;
	font-weight: bold;
	margin-bottom: 8px;
	color: #333;
}

.variant-attribute-select {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: white;
	font-size: 14px;
}

.variant-attribute-select:focus {
	outline: none;
	border-color: #007bff;
	box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.variant-attribute-visual {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.variant-option {
	padding: 8px 12px;
	border: 2px solid #ccc;
	border-radius: 4px;
	background: white;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 14px;
}

.variant-option:hover {
	border-color: #007bff;
}

.variant-option.selected {
	border-color: #007bff;
	background: #007bff;
	color: white;
}

.variant-option.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background: #f5f5f5;
}

.variant-option.disabled:hover {
	border-color: #ccc;
}

/* Static Product Info */
.static-product-info {
	margin: 15px 0;
	padding: 10px;
	background: #f8f9fa;
	border-radius: 4px;
	border-left: 4px solid #28a745;
}

.static-product-info p {
	margin: 5px 0;
}

.static-product-info .price-label,
.static-product-info .article-label,
.static-product-info .stock-label {
	font-weight: bold;
	display: inline;
	margin-right: 8px;
}

.static-product-info .price-value,
.static-product-info .article-value,
.static-product-info .stock-value {
	display: inline;
	color: #28a745;
}

/* Variant Product Info */
.variant-product-info {
	margin: 15px 0;
	padding: 10px;
	background: #f0f8ff;
	border-radius: 4px;
	border-left: 4px solid #007bff;
}

.variant-product-info p {
	margin: 5px 0;
}

.variant-product-info .price-label,
.variant-product-info .article-label,
.variant-product-info .stock-label {
	font-weight: bold;
	display: inline;
	margin-right: 8px;
}

.variant-product-info .price-value,
.variant-product-info .article-value,
.variant-product-info .stock-value {
	display: inline;
	color: #007bff;
}

/* Variants Display */
.variants-display {
	max-height: 400px;
	overflow-y: auto;
}

.variant-item {
	padding: 10px;
	margin-bottom: 10px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	background: white;
}

.variant-item.selected {
	border-color: #007bff;
	background: #f0f8ff;
}

.variant-item h4 {
	margin: 0 0 8px 0;
	color: #333;
}

.variant-item .variant-details {
	font-size: 14px;
	color: #666;
}

.variant-item .variant-details span {
	display: inline-block;
	margin-right: 15px;
}

/* Gallery Updates */
.variant-gallery,
.standard-gallery {
	position: relative;
}

.gallery-updating {
	opacity: 0.6;
	pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
	.product-layout {
		flex-direction: column;
		gap: 20px;
	}
	
	.gallery-column {
		flex: none;
	}
	
	.variant-column {
		flex: none;
		min-width: auto;
	}
	
	.variant-selectors {
		position: static;
		padding: 15px;
	}
	
	.variant-attribute-visual {
		gap: 6px;
	}
	
	.variant-option {
		padding: 6px 10px;
		font-size: 13px;
	}
}

@media (max-width: 480px) {
	.product-layout {
		gap: 15px;
		margin: 15px 0;
	}
	
	.variant-selectors {
		padding: 10px;
	}
	
	.variant-attribute-visual {
		gap: 4px;
	}
	
	.variant-option {
		padding: 4px 8px;
		font-size: 12px;
	}
}


/* Checkout Styles */

.checkout-page {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

.checkout-layout {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: start;
}

@media (max-width: 768px) {
	.checkout-layout {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

/* Billing Details Styles */
.billing-details {
	background: #fff;
	padding: 30px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.billing-details h2 {
	margin-top: 0;
	margin-bottom: 30px;
	font-size: 24px;
	color: #333;
}

.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
}

.form-group {
	margin-bottom: 20px;
}

.form-group.half {
	margin-bottom: 0;
}

.form-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: 500;
	color: #333;
}

.required {
	color: #e74c3c;
}

.form-group input,
.form-group select {
	width: 100%;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.3s;
	box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
	outline: none;
	border-color: #007cba;
	box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.form-group input.error,
.form-group select.error {
	border-color: #e74c3c;
	box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1);
}

.delivery-section {
	margin-top: 30px;
	padding-top: 30px;
	border-top: 1px solid #eee;
}

.delivery-section h3 {
	margin-bottom: 20px;
	font-size: 18px;
	color: #333;
}

.delivery-fields {
	margin-top: 20px;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 4px;
}

/* Order Summary Styles */
.order-summary {
	background: #f8f9fa;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
	position: sticky;
	top: 20px;
}

.order-summary-content {
	padding: 30px;
}

.order-summary h3 {
	margin-top: 0;
	margin-bottom: 25px;
	font-size: 20px;
	color: #333;
}

.order-header {
	display: flex;
	justify-content: space-between;
	padding-bottom: 10px;
	border-bottom: 1px solid #ddd;
	margin-bottom: 15px;
	font-weight: 600;
	color: #666;
}

.order-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 0;
	border-bottom: 1px solid #eee;
}

.item-info {
	flex: 1;
}

.item-name {
	display: block;
	font-weight: 500;
	font-size: 14px;
	color: #333;
}

.item-quantity {
	font-size: 14px;
	color: #666;
}

.item-total {
	font-weight: 600;
	color: #333;
}

.order-totals {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 2px solid #ddd;
}

.order-subtotal,
.order-total {
	display: flex;
	justify-content: space-between;
	margin-bottom: 10px;
}

.order-total {
	font-size: 18px;
	font-weight: 700;
	color: #333;
	margin-bottom: 0;
	padding-top: 10px;
	border-top: 1px solid #ddd;
}

/* Payment Section Styles */
.payment-section {
	margin-top: 30px;
	padding-top: 30px;
	border-top: 2px solid #ddd;
}

.terms-section {
	margin-bottom: 20px;
	padding: 15px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.terms-section input[type="checkbox"] {
	margin-right: 8px;
}

.terms-section input[type="checkbox"].error {
	outline: 2px solid #e74c3c;
}

.terms-section label {
	font-size: 14px;
	line-height: 1.4;
}

.terms-section a {
	color: #007cba;
	text-decoration: none;
}

.terms-section a:hover {
	text-decoration: underline;
}

.payment-button-section {
	text-align: center;
}

.place-order-btn {
	background: #28a745;
	color: white;
	padding: 15px 30px;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 18px;
	font-weight: 600;
	width: 100%;
	transition: background-color 0.3s;
}

.place-order-btn:hover:not(:disabled) {
	background: #218838;
}

.place-order-btn:disabled {
	background: #6c757d;
	cursor: not-allowed;
}

/* Klarna Checkout Styles */
.klarna-checkout {
	max-width: 800px;
	margin: 0 auto;
	padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.checkout-page {
		padding: 10px;
	}
	
	.billing-details,
	.order-summary-content {
		padding: 20px;
	}
	
	.form-row {
		grid-template-columns: 1fr;
		gap: 0;
	}
	
	.form-group.half {
		margin-bottom: 20px;
	}
}

/* Gift Card Specific Styles */

.gift-card-product {
	--primary-color: #007bff;
	--success-color: #28a745;
	--danger-color: #dc3545;
	--warning-color: #ffc107;
}

.gift-card-form-section {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	margin-bottom: 20px;
}

.gift-card-form-section h3 {
	margin-top: 0;
	color: var(--primary-color);
}

.amount-selection {
	margin-bottom: 30px;
}

.amount-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 15px 0;
}

.amount-button {
	padding: 12px 20px;
	border: 2px solid #dee2e6;
	background: white;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-weight: 500;
}

.amount-button:hover {
	border-color: var(--primary-color);
	background: #e3f2fd;
}

.amount-button.selected {
	border-color: var(--primary-color);
	background: var(--primary-color);
	color: white;
}

.custom-amount-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 15px;
	padding: 15px;
	background: white;
	border-radius: 6px;
	border: 1px solid #dee2e6;
}

.custom-amount-wrapper input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid #ced4da;
	border-radius: 4px;
}

.gift-card-form {
	background: white;
	padding: 20px;
	border-radius: 6px;
	border: 1px solid #dee2e6;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: 500;
	color: #495057;
}

.form-group input,
.form-group textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ced4da;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.form-group.error input,
.form-group.error textarea {
	border-color: var(--danger-color);
}

.error-message {
	color: var(--danger-color);
	font-size: 12px;
	margin-top: 5px;
}

.help-text {
	color: #6c757d;
	font-size: 12px;
	margin-top: 5px;
	display: block;
}

.char-counter {
	text-align: right;
	font-size: 12px;
	color: #6c757d;
	margin-top: 5px;
}

.gift-card-summary {
	background: #e8f5e8;
	padding: 15px;
	border-radius: 6px;
	margin: 20px 0;
	border: 1px solid #c3e6c3;
}

.gift-card-summary h4 {
	margin-top: 0;
	margin-bottom: 15px;
	color: var(--success-color);
}

.summary-item {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
}

.summary-item .label {
	font-weight: 500;
}

.summary-item .value {
	color: #495057;
}

.form-validation-summary {
	background: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
	padding: 10px 15px;
	border-radius: 4px;
	margin: 15px 0;
}

.js-add-to-cart-giftcard:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

@media (max-width: 768px) {
	.amount-buttons {
		flex-direction: column;
	}
	
	.amount-button {
		text-align: center;
	}
	
	.custom-amount-wrapper {
		flex-direction: column;
		align-items: stretch;
	}
}


/* Shipping Options Styling */
.shipping-options-section {
	margin: 20px 0;
}

.shipping-options-section h3 {
	margin-bottom: 15px;
	font-size: 1.2em;
	font-weight: 600;
}

.free-shipping-message {
	background: linear-gradient(135deg, #4CAF50, #45a049);
	color: white;
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 15px;
	text-align: center;
	box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
	animation: fadeInScale 0.5s ease-out;
}

.free-shipping-info {
	background: linear-gradient(135deg, #2196F3, #1976D2);
	color: white;
	padding: 10px 16px;
	border-radius: 6px;
	margin-bottom: 15px;
	text-align: center;
	font-size: 0.9em;
	box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.shipping-option {
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	margin-bottom: 10px;
	transition: all 0.3s ease;
	overflow: hidden;
}

.shipping-option:hover {
	border-color: #2196F3;
	box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.shipping-option input[type="radio"] {
	display: none;
}

.shipping-option input[type="radio"]:checked + .shipping-option-label {
	background: linear-gradient(135deg, #f8f9ff, #e3f2fd);
	border-left: 4px solid #2196F3;
}

.shipping-option-label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 16px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.shipping-option-info {
	flex: 1;
}

.shipping-option-name {
	font-weight: 600;
	font-size: 1em;
	color: #333;
	margin-bottom: 4px;
}

.shipping-option-method {
	font-size: 0.85em;
	color: #666;
}

.shipping-option-price {
	font-weight: 600;
	font-size: 1.1em;
	color: #2196F3;
	text-align: right;
}

/* .original-price {
	font-size: 0.8em;
	color: #999;
	text-decoration: line-through;
	font-weight: normal;
	display: block;
	margin-top: 2px;
} */

.shipping-loading {
	text-align: center;
	padding: 20px;
	color: #666;
	font-style: italic;
}

.shipping-no-options {
	text-align: center;
	padding: 20px;
	background: #f5f5f5;
	border-radius: 8px;
	color: #666;
}

.shipping-no-options p {
	margin: 5px 0;
}

#shipping-error {
	background: #ffebee;
	border: 1px solid #f44336;
	border-radius: 6px;
	padding: 12px;
	margin: 10px 0;
	color: #c62828;
}

#shipping-error button {
	background: #f44336;
	color: white;
	border: none;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
	margin-top: 8px;
	transition: background 0.3s ease;
}

#shipping-error button:hover {
	background: #d32f2f;
}

.shipping-options-section.has-error {
	border: 2px solid #f44336;
	border-radius: 8px;
	padding: 16px;
	background: #ffebee;
}

.validation-error {
	color: #f44336;
	font-size: 0.9em;
	margin-top: 8px;
	font-weight: 500;
}

/* Order summary shipping row styling */
#order-shipping-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid #eee;
}

#order-shipping-amount .original-price {
	font-size: 0.8em;
	color: #999;
	text-decoration: line-through;
	margin-left: 8px;
}

/* CSS för automatiska rabatter */
.discount-message.automatic {
	background-color: #e8f5e8;
	border-left: 4px solid #4caf50;
	color: #2e7d32;
}

.discount-section.has-automatic-discount .discount-input {
	background-color: #f5f5f5;
	border-color: #4caf50;
}

.automatic-discount-indicator {
	display: inline-block;
	background: #4caf50;
	color: white;
	padding: 2px 8px;
	border-radius: 12px;
	font-size: 0.8em;
	margin-left: 8px;
}


/* Animation for free shipping message */
@keyframes fadeInScale {
	0% {
		opacity: 0;
		transform: scale(0.9);
	}
	100% {
		opacity: 1;
		transform: scale(1);
	}
}

/* Responsive design */
@media (max-width: 768px) {
	.shipping-option-label {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
	
	.shipping-option-price {
		text-align: left;
		align-self: flex-end;
	}
	
	.free-shipping-message,
	.free-shipping-info {
		font-size: 0.9em;
		padding: 10px 12px;
	}
}