/* =============================================== */
/* XFormula Shop - Adaptive Styles */
/* =============================================== */

/* Tablet screens (992px and below) */
@media (max-width: 992px) {
	.header {
		gap: 10px;
	}

	/* Header Navigation - Mobile Menu */
	.header-nav {
		position: fixed;
		inset: 0;
		display: none;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		background: linear-gradient(180deg, rgba(15, 8, 5, 0.98) 0%, rgba(10, 5, 2, 0.97) 100%);
		padding: 110px 16px 46px;
		gap: 8px;
		z-index: 1200;
		backdrop-filter: blur(16px);
		overflow-y: auto;
		overflow-x: hidden;
		width: 100vw;
		height: 100vh;
		transition: opacity 0.3s ease, visibility 0.3s ease;
		opacity: 0;
		visibility: hidden;
	}

	.header-nav::before {
		content: '';
		position: fixed;
		inset: 0;
		background: radial-gradient(160% 160% at 50% 0%, rgba(255, 107, 53, 0.15), transparent 60%),
					radial-gradient(circle at 100% 100%, rgba(255, 107, 53, 0.1), transparent 50%);
		pointer-events: none;
		z-index: -1;
	}

	.header-nav.active {
		display: flex;
		opacity: 1;
		visibility: visible;
	}

	/* Mobile menu list */
	.header-nav-list {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		gap: 6px;
	}

	/* Mobile menu links */
	.header-nav-link {
		width: 100%;
		justify-content: flex-start;
		font-size: 16px;
		padding: 18px 20px;
		border-radius: 14px;
		border: 1px solid rgba(255, 107, 53, 0.2);
		background: linear-gradient(135deg, rgba(255, 107, 53, 0.05), rgba(255, 174, 94, 0.02));
		box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
		text-transform: uppercase;
		letter-spacing: 0.08em;
		min-height: auto;
		font-weight: 700;
		position: relative;
		transition: all 0.25s ease;
		color: rgba(255, 255, 255, 0.9);
	}

	.header-nav-link::before {
		display: none;
	}

	.header-nav-link:active,
	.header-nav-link:hover {
		background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 174, 94, 0.1));
		border-color: rgba(255, 107, 53, 0.4);
		transform: translateX(8px);
		color: #ffb58a;
		box-shadow: inset 0 2px 4px rgba(255, 107, 53, 0.15), 0 8px 20px rgba(255, 107, 53, 0.15);
	}

	/* Active menu item */
	.header-nav-link.active {
		background: linear-gradient(135deg, rgba(255, 107, 53, 0.22), rgba(255, 174, 94, 0.12));
		border: 1px solid rgba(255, 107, 53, 0.4);
		color: #ffb58a;
		box-shadow: 0 8px 24px rgba(255, 107, 53, 0.2);
	}

	/* Phone link in mobile menu */
	.header-nav-link.header-phone-link {
		color: #ffb58a;
		font-weight: 800;
		border: 1px solid rgba(255, 107, 53, 0.5);
		background: rgba(255, 107, 53, 0.12);
		box-shadow: 0 8px 20px rgba(255, 107, 53, 0.25);
		margin-top: 8px;
	}

	.header-nav-link.header-phone-link:hover {
		background: rgba(255, 107, 53, 0.18);
		border-color: rgba(255, 107, 53, 0.6);
	}

	/* Language button in mobile menu */
	.header-nav-lang-btn {
		width: 100%;
	}

	.header-nav-lang-btn .header-nav-link--lang {
		width: 100%;
		justify-content: center;
		border-radius: 12px;
		background: linear-gradient(135deg, #ff6b35, #ff8a4b);
		color: #0d0d0d;
		font-weight: 800;
		box-shadow: 0 12px 32px rgba(255, 107, 53, 0.35);
		margin-top: auto;
	}

	.header-nav-lang-btn .header-nav-link--lang:hover {
		box-shadow: 0 14px 40px rgba(255, 107, 53, 0.45);
		background: linear-gradient(135deg, #ff7d48, #ff9d5a);
	}

	/* Language dropdown in mobile */
	.lang-dropdown {
		position: relative;
		top: 0;
		inset: auto;
		width: 100%;
		background: transparent;
		border: none;
		box-shadow: none;
		padding: 8px 0 0;
		margin-top: 6px;
		display: flex !important;
		flex-direction: column;
		gap: 6px;
		backdrop-filter: none;
	}

	.lang-dropdown a {
		display: block;
		padding: 12px 16px;
		border-radius: 10px;
		color: rgba(255, 255, 255, 0.8);
		text-decoration: none;
		transition: all 0.25s ease;
		background: rgba(255, 255, 255, 0.04);
		border: 1px solid rgba(255, 255, 255, 0.08);
		font-weight: 600;
		text-align: center;
	}

	.lang-dropdown a:hover,
	.lang-dropdown a.active-lang {
		background: rgba(255, 107, 53, 0.15);
		color: #ffb58a;
		border-color: rgba(255, 107, 53, 0.3);
	}

	/* Burger menu button */
	.burger-menu {
		display: flex;
		flex-direction: column;
		gap: 5px;
		background: rgba(255, 107, 53, 0.12);
		border: 1px solid rgba(255, 107, 53, 0.35);
		border-radius: 4px;
		cursor: pointer;
		padding: 12px 14px;
		position: relative;
		z-index: 1300;
		transition: all 0.3s cubic-bezier(0.36, 0, 0.66, 1);
		box-shadow: 0 4px 12px rgba(255, 107, 53, 0.15);
		margin: 10px;
	}

	.burger-menu:active,
	.burger-menu:hover {
		background: rgba(255, 107, 53, 0.18);
		border-color: rgba(255, 107, 53, 0.5);
		box-shadow: 0 6px 16px rgba(255, 107, 53, 0.25);
		transform: scale(1.05);
	}

	.burger-menu.active {
		background: rgba(255, 107, 53, 0.25);
		border-color: rgba(255, 107, 53, 0.6);
	}

	.burger-line {
		width: 26px;
		height: 3px;
		background: #ffb58a;
		border-radius: 2px;
		transition: all 0.35s cubic-bezier(0.36, 0, 0.66, 1);
		transform-origin: center;
	}

	/* Burger animation - active state */
	.burger-menu.active .burger-line:nth-child(1) {
		transform: translateY(8px) rotate(45deg);
	}

	.burger-menu.active .burger-line:nth-child(2) {
		opacity: 0;
		transform: scaleX(0) translateY(0);
	}

	.burger-menu.active .burger-line:nth-child(3) {
		transform: translateY(-8px) rotate(-45deg);
	}

	/* =============== End Mobile Menu =============== */

	.shop__head {
		flex-direction: column;
		align-items: flex-start;
	}

	.product-grid {
		grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
		justify-content: stretch;
	}

	.product-card {
		width: 100%;
		max-width: 350px;
		margin: 0 auto;
	}

	.catalog-toolbar {
		flex-direction: column;
		align-items: stretch;
		gap: 20px;
	}

	.catalog-search-wrapper {
		width: 100%;
	}

	.catalog-search {
		gap: 12px;
		flex-direction: column;
	}

	.catalog-search input {
		width: 100%;
		min-width: 100%;
	}

	.catalog-filters {
		flex-direction: column;
		width: 100%;
	}

	.filter-group {
		width: 100%;
	}

	.filter-select {
		width: 100%;
	}

	.catalog-grid {
		grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	}
}

/* Mobile screens (720px and below) */
@media (max-width: 720px) {
	.hero__inner {
		grid-template-columns: 1fr;
	}

	.shop-search {
		gap: 12px;
		flex-direction: column;
	}

	.shop-search input {
		width: 100%;
		min-width: 100%;
	}

	.shop-search .xf-btn {
		width: 100%;
	}

	.footer-container {
		flex-direction: column;
		text-align: center;
		gap: 18px;
	}

	.footer-left,
	.footer-right {
		width: 100%;
	}

	.footer-right {
		align-items: center;
	}

	/* Mobile modal layout */
	.modal-body {
		grid-template-columns: 1fr;
		padding: 20px;
	}

	.modal-main-image {
		height: 300px;
	}

	.modal-title {
		font-size: 22px;
	}

	.modal-price {
		font-size: 26px;
	}

	.modal-actions {
		flex-direction: column;
	}

	.modal-close {
		top: 10px;
		right: 10px;
		width: 36px;
		height: 36px;
	}

	/* Mobile cart icon */
	.cart-icon {
		width: 56px;
		height: 56px;
		bottom: 20px;
		right: 20px;
	}

	.cart-icon svg {
		width: 24px;
		height: 24px;
	}

	.cart-content {
		max-height: 95vh;
	}

	.cart-header,
	.cart-body,
	.cart-footer,
	.order-form-wrapper {
		padding: 16px 20px;
	}

	.cart-item {
		flex-direction: column;
		gap: 12px;
	}

	.cart-item-image {
		width: 100%;
		height: 200px;
	}

	.form-row {
		grid-template-columns: 1fr;
	}

	.form-actions {
		flex-direction: column;
	}
}

/* Extra large screens (1080px and above) */
@media (min-width: 1081px) {
	body {
		padding-top: 96px;
	}

	.header {
		width: calc(100% - 18px);
	}

	/* Contact page mobile */
	.contact-widget-section {
		margin-bottom: 60px;
	}

	.widget-container {
		padding: 0 16px;
	}

	.widget-frame {
		grid-template-columns: 1fr;
		border-radius: 18px;
		border-width: 4px;
	}

	.image-container {
		min-height: 350px;
	}

	.contact-panel {
		padding: 36px 28px;
	}

	.contact-panel h3 {
		font-size: 26px;
		margin-bottom: 32px;
	}

	.contact-info-list {
		gap: 28px;
	}

	.contact-info-item svg {
		width: 44px;
		height: 44px;
	}

	.contact-label {
		font-size: 11px;
		letter-spacing: 1.2px;
	}

	.contact-value {
		font-size: 15px;
	}

	.map-overlay p {
		font-size: 16px;
		padding: 0 20px;
	}

	.contact-card {
		padding: 22px 20px;
		border-radius: 14px;
	}

	.contact-card-header {
		gap: 10px;
		margin-bottom: 20px;
		padding-bottom: 0;
	}

	.contact-header-icon {
		width: 44px;
		height: 44px;
		border-radius: 12px;
	}

	.contact-header-icon svg {
		width: 24px;
		height: 24px;
	}

	.contact-card-header h3 {
		font-size: 17px;
	}

	.contact-form-description {
		font-size: 13px;
		padding: 12px 14px;
		margin-bottom: 18px;
		border-radius: 8px;
	}

	.form-success {
		padding: 36px 20px;
	}

	.form-success-icon {
		width: 64px;
		height: 64px;
		margin-bottom: 16px;
	}

	.form-success-icon svg {
		width: 36px;
		height: 36px;
	}

	.form-success h4 {
		font-size: 20px;
		margin-bottom: 8px;
	}

	.form-success p {
		font-size: 13px;
	}

	/* Покращені відступи для форми */
	.order-form .form-row {
		flex-direction: column;
		gap: 0;
	}

	.order-form .form-group {
		margin-bottom: 16px;
	}

	.order-form label {
		font-size: 13px;
		margin-bottom: 8px;
	}

	.order-form input,
	.order-form select,
	.order-form textarea {
		font-size: 15px;
		padding: 12px 14px;
	}

	.form-actions {
		flex-direction: column;
		gap: 10px;
	}

	.form-submit,
	.form-cancel {
		width: 100%;
		padding: 14px 20px;
		font-size: 15px;
	}
}
