/* ==========================================================================
   FIKA PRODUCT CARDS & MINI CART DESIGN (Matching Snus Da Nang UI)
   ========================================================================== */

/* Hide default Flatsome / WooCommerce add to cart buttons & discount % badges */
.product-small .add-to-cart-button,
.box-text .add-to-cart-button,
.product-small a.add_to_cart_button:not(.fika-add-to-cart-btn),
.product-small div.add-to-cart-button,
.box-text a.button:not(.fika-product-view-button),
.add_to_cart_button:not(.fika-add-to-cart-btn),
.badge-container .sale-badge,
.badge-container .badge-circle,
.product-small .badge-container .sale-badge,
.badge-container .callout-badge,
.box-image .sale-badge,
.sale-badge {
	display: none !important;
}

/* Fade-in Animation for smooth button morphing */
.fika-fade-in {
	animation: fikaFadeIn .25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fikaFadeIn {
	from {
		opacity: 0;
		transform: scale(0.96);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* 0. Product Small Box Border & Card Styling (Matching Snus Da Nang UI) */
.product-small .box,
.box-product {
	background: #ffffff !important;
	border-radius: 10px !important;
	overflow: hidden !important;
	transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease !important;
}

.product-small .box:hover,
.box-product:hover {
	transform: translateY(-4px) !important;
	border-color: #111111 !important;
	box-shadow: unset!important;
}

.product-small .box-image {
	border-top-left-radius: 9px !important;
	border-top-right-radius: 9px !important;
	overflow: hidden !important;
}

.product-small .box-text {
	padding: 14px 16px 16px 16px !important;
}

/* Fixed min-height for .box-text p to align buttons perfectly across grid rows */
.product-small .box-text p,
.box-text p {
	min-height: 22px !important;
	line-height: 1.4 !important;
	margin-bottom: 6px !important;
}

/* 1. Nicotine Badge Tag (Positioned absolute left top z-1 with margin auto) */
.fika-badge-stack {
	position: absolute !important;
	top: 10px !important;
	left: 10px !important;
	z-index: 15 !important;
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: auto !important;
	pointer-events: none;
}

.fika-nicotine-badge {
	display: inline-block;
	background: #364395;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 4px 8px;
	border-radius: 3px;
	line-height: 1.2;
	margin: auto;
}

/* 2. Product Card CTA Area */
.fika-product-view-wrapper {
	margin-top: 14px;
	width: 100%;
}

.fika-product-view {
	width: 100%;
}

/* Add to Cart Button [ 🛒 THÊM VÀO GIỎ ] */
.fika-product-view .fika-product-view-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-height: 42px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid #111111;
	border-radius: 4px;
	background: #ffffff;
	color: #111111;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.04em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition: all .2s ease;
	cursor: pointer;
}

.fika-product-view .fika-product-view-button:hover,
.fika-product-view .fika-product-view-button:focus {
	border-color: #364395;
	background: #364395;
	color: #ffffff;
}

.fika-product-view .fika-product-view-button .fika-cart-icon {
	width: 15px;
	height: 15px;
	flex-shrink: 0;
}

/* 3. Card Quantity Selector [ —  10  + ] */
.fika-card-qty-control {
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-sizing: border-box;
	width: 100%;
	min-height: 42px;
	padding: 0 12px;
	border-radius: 4px;
	background: #364395;
	color: #ffffff;
	transition: opacity .2s ease, transform .2s ease;
}

.fika-card-qty-control.fika-loading {
	opacity: 0.6;
	pointer-events: none;
}

.fika-card-qty-control .fika-qty-btn {
	background: transparent;
	border: none;
	color: #ffffff;
	font-size: 18px;
	font-weight: 400;
	cursor: pointer;
	padding: 4px 12px;
	line-height: 1;
	transition: opacity .15s ease;
	user-select: none;
	outline: none;
	margin: auto;
}

.fika-card-qty-control .fika-qty-btn:hover {
	opacity: 0.7;
}

.fika-card-qty-control .fika-qty-num {
	font-size: 14px;
	font-weight: 600;
	color: #ffffff;
	margin: auto;
}

/* 4. Mini Cart Dropdown Position Clamping & Anchor Alignment */
.header-nav .cart-item,
.cart-item.has-dropdown,
li.cart-item {
	position: relative !important;
}

.header-nav .cart-item .nav-dropdown,
.cart-item.has-dropdown .nav-dropdown,
.cart-item .dropdown-menu,
.nav-dropdown.nav-dropdown-simple {
	position: absolute !important;
	right: 0 !important;
	left: auto !important;
	top: 100% !important;
	margin: 0 !important;
	transform: none !important;
	max-width: calc(100vw - 20px) !important;
	box-shadow: none !important;
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
	z-index: 99999 !important;
}

.fika-mini-cart-container {
	padding: 18px 20px;
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.15);
	width: 360px;
	max-width: calc(100vw - 20px);
	font-family: inherit;
	box-sizing: border-box;
	margin: 0 !important;
}

.fika-mini-cart-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 14px;
	border-bottom: 1px solid #f0f0f0;
	margin-bottom: 14px;
}

.fika-mini-cart-title {
	font-size: 16px;
	font-weight: 700;
	margin: 0;
	color: #111111;
}

.fika-mini-cart-close {
	background: transparent;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #777;
	line-height: 1;
}

.fika-mini-cart-items {
	max-height: 340px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding-right: 4px;
}

.fika-mini-cart-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.fika-mini-cart-media img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 10px;
	background: #f7f7f7;
}

.fika-mini-cart-details {
	flex: 1;
}

.fika-mini-cart-name {
	font-size: 13px;
	font-weight: 600;
	margin: 0 0 4px 0;
	line-height: 1.35;
}

.fika-mini-cart-name a {
	color: #111111;
	text-decoration: none;
}

.fika-mini-cart-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 12px;
	color: #777777;
	margin-bottom: 4px;
}

.fika-mini-cart-price {
	font-weight: 600;
	color: #111111;
}

.fika-mini-cart-remove {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: #777777;
	text-decoration: none;
	transition: color .15s ease;
}

.fika-mini-cart-remove:hover {
	color: #d32f2f;
}

.fika-mini-cart-footer {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #f0f0f0;
}

.fika-mini-cart-subtotal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 15px;
	margin-bottom: 14px;
}

.fika-subtotal-label {
	color: #555555;
	font-weight: 500;
}

.fika-subtotal-amount {
	font-weight: 700;
	color: #111111;
	font-size: 17px;
}

.fika-checkout-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	background: #364395;
	color: #ffffff !important;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: background .2s ease;
}

.fika-checkout-btn:hover {
	background: #111111;
}

/* 5. Single Product Information Specs Accordion (Matching UI Image) */
.fika-product-specs-accordion {
	margin-top: 24px;
	margin-bottom: 24px;
	border-radius: 12px;
	background: #ffffff;
	border: 1px solid #eef0f4;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
	overflow: hidden;
}

.fika-product-specs-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	font-size: 15px;
	font-weight: 700;
	color: #111827;
	cursor: pointer;
	user-select: none;
	list-style: none;
	background: #ffffff;
}

.fika-product-specs-title::-webkit-details-marker {
	display: none;
}

.fika-accordion-arrow {
	transition: transform 0.25s ease;
	color: #9ca3af;
}

.fika-product-specs-accordion[open] .fika-accordion-arrow {
	transform: rotate(180deg);
}

.fika-product-specs-table {
	display: flex;
	flex-direction: column;
	border-top: 1px solid #f3f4f6;
}

.fika-spec-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 13px 20px;
	border-bottom: 1px solid #f3f4f6;
	font-size: 14px;
	transition: background 0.15s ease;
}

.fika-spec-row:nth-child(even) {
	background: #fafafa;
}

.fika-spec-row:last-child {
	border-bottom: none;
}

.fika-spec-label {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #6b7280;
	font-weight: 500;
}

.fika-spec-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #6b7280;
}

.fika-spec-value {
	font-weight: 600;
	color: #111827;
	text-align: right;
}

/* Mobile Adjustments */
@media (max-width: 549px) {
	.fika-product-view-wrapper {
		margin-top: 10px;
	}
	.fika-product-view .fika-product-view-button,
	.fika-card-qty-control {
		min-height: 38px;
		font-size: 12px;
		padding: 0 10px;
	}
	.fika-nicotine-badge {
		font-size: 10px;
		padding: 3px 6px;
	}
	.fika-spec-row {
		padding: 11px 14px;
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fika-product-view .fika-product-view-button,
	.fika-card-qty-control {
		transition: none;
	}
}
