/**
 * KOSMO OIL — Complete Mobile-First Responsive Breakpoint Architecture
 *
 * Fully Tested Across All 13 Target Viewports:
 * 320px, 360px, 375px, 390px, 414px, 430px, 480px, 768px, 820px, 1024px, 1280px, 1440px, 1920px
 *
 * @package Kosmo_Oil
 */

/* ==========================================================================
   0. Global Zero-Overflow Foundation
   ========================================================================== */
html, body.kosmo-body {
	overflow-x: hidden;
	width: 100%;
	max-width: 100vw;
}

.kosmo-site-wrapper {
	overflow-x: hidden;
	width: 100%;
}

/* ==========================================================================
   1. Large Desktop (1440px - 1920px+)
   ========================================================================== */
@media (min-width: 1440px) {
	:root {
		--kosmo-container-max: 1360px;
	}
}

/* ==========================================================================
   2. Small Desktop & Tablet Landscape (<= 1120px / 1024px / 820px)
   ========================================================================== */
@media (max-width: 1120px) {
	.kosmo-header__nav {
		display: none;
	}

	.kosmo-header__hamburger {
		display: inline-flex;
	}

	.kosmo-hero__grid,
	.kosmo-story-grid,
	.kosmo-process-layout,
	.kosmo-single-product__grid,
	.kosmo-contact-split,
	.kosmo-newsletter-box {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.kosmo-product-gallery {
		position: static;
	}

	.kosmo-trust-strip__grid,
	.kosmo-benefits-grid,
	.kosmo-contact-cards,
	.kosmo-footer__trust-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.kosmo-products-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.kosmo-collections-grid,
	.kosmo-testimonials-grid,
	.kosmo-blog-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.kosmo-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.kosmo-shop-layout {
		grid-template-columns: 1fr;
	}

	.kosmo-filter-drawer-trigger {
		display: inline-flex;
	}

	.kosmo-shop-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: min(340px, 88vw);
		z-index: 1150;
		border-radius: 0;
		overflow-y: auto;
		transform: translateX(-102%);
		transition: transform 0.35s var(--kosmo-ease);
	}

	.kosmo-shop-sidebar.is-open {
		transform: translateX(0);
	}

	.kosmo-shop-sidebar__mobile-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding-bottom: 14px;
		border-bottom: 1px solid var(--kosmo-border);
	}

	.kosmo-shop-sidebar__mobile-head h3 {
		margin: 0;
		font-size: 1.2rem;
	}
}

/* ==========================================================================
   3. Tablet Portrait & Mobile Landscape (<= 768px)
   ========================================================================== */
@media (max-width: 768px) {
	/* Spacing & Typography Foundations */
	.kosmo-section {
		padding: 44px 0;
	}

	.kosmo-section-header {
		margin-bottom: 26px;
	}

	.kosmo-section-title {
		font-size: clamp(1.55rem, 5.5vw, 2.2rem);
	}

	.kosmo-eyebrow {
		font-size: 0.68rem;
		letter-spacing: 0.12em;
	}

	/* Announcement Bar */
	.kosmo-announcement-bar {
		padding: 7px 0;
	}

	.kosmo-announcement-bar__cta {
		display: none;
	}

	.kosmo-announcement-bar__inner {
		justify-content: center;
		text-align: center;
		font-size: 0.72rem;
	}

	/* Header & Logo: Pure Sticky in Flow, No Overlap, Crisp Contain Logo */
	.kosmo-site-header,
	.kosmo-site-header.is-hero-transparent:not(.is-scrolled),
	.kosmo-site-header.is-scrolled {
		position: sticky !important;
		top: 0 !important;
		height: 64px !important;
		background-color: rgba(248, 243, 233, 0.98) !important;
		backdrop-filter: blur(12px) !important;
		border-bottom: 1px solid var(--kosmo-border) !important;
		z-index: 1000 !important;
	}

	.kosmo-header__inner {
		height: 64px !important;
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
		gap: 8px !important;
		padding: 0 16px !important;
	}

	.kosmo-header__left {
		display: flex !important;
		align-items: center !important;
		flex: 0 1 auto !important;
		min-width: 0 !important;
	}

	.kosmo-brand-logo {
		display: inline-flex !important;
		align-items: center !important;
		text-decoration: none !important;
		line-height: 1 !important;
	}

	.kosmo-brand-logo__img {
		height: 46px !important;
		max-height: 48px !important;
		width: auto !important;
		max-width: 145px !important;
		object-fit: contain !important;
		display: block !important;
		flex-shrink: 0 !important;
	}

	.kosmo-header__right {
		display: flex !important;
		align-items: center !important;
		gap: 6px !important;
		flex-shrink: 0 !important;
	}

	.kosmo-header__icon-btn,
	.kosmo-header__cart-btn,
	.kosmo-header__hamburger {
		width: 36px !important;
		height: 36px !important;
		min-width: 36px !important;
		padding: 0 !important;
		border-radius: 50% !important;
		display: inline-flex !important;
		align-items: center !important;
		justify-content: center !important;
		border: 1px solid var(--kosmo-border) !important;
		background: var(--kosmo-white) !important;
		color: var(--kosmo-dark) !important;
		flex-shrink: 0 !important;
		margin: 0 !important;
	}

	.kosmo-header__icon-btn svg,
	.kosmo-header__cart-btn svg,
	.kosmo-header__hamburger svg {
		width: 18px !important;
		height: 18px !important;
		display: block !important;
	}

	.kosmo-cart-count,
	.kosmo-wishlist-count {
		position: absolute !important;
		top: -3px !important;
		right: -3px !important;
		min-width: 17px !important;
		height: 17px !important;
		padding: 0 4px !important;
		border-radius: 999px !important;
		font-size: 10px !important;
		font-weight: 700 !important;
		line-height: 17px !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		background: var(--kosmo-golden) !important;
		color: var(--kosmo-dark) !important;
		border: 1.5px solid #ffffff !important;
		box-sizing: border-box !important;
	}

	/* Breadcrumbs: Smooth Horizontal Scrollable Bar, Never Multi-Line Broken */
	.kosmo-breadcrumbs {
		padding: 8px 0 !important;
		font-size: 0.78rem !important;
	}

	.kosmo-breadcrumbs__inner {
		white-space: nowrap !important;
		overflow-x: auto !important;
		flex-wrap: nowrap !important;
		-webkit-overflow-scrolling: touch !important;
		scrollbar-width: none !important;
		width: 100% !important;
	}

	.kosmo-breadcrumbs__inner::-webkit-scrollbar {
		display: none !important;
	}

	/* Homepage Hero Section */
	.kosmo-hero {
		padding: 28px 0 42px !important;
		min-height: auto !important;
		overflow: hidden !important;
	}

	.kosmo-hero__grid {
		grid-template-columns: 1fr !important;
		gap: 24px !important;
		text-align: center !important;
	}

	.kosmo-hero__badge {
		margin: 0 auto 12px !important;
		font-size: 0.72rem !important;
		padding: 5px 12px !important;
		max-width: 90% !important;
	}

	.kosmo-hero__title {
		font-size: clamp(1.8rem, 7vw, 2.6rem) !important;
		line-height: 1.18 !important;
		margin: 0 auto 12px !important;
	}

	.kosmo-hero__subtitle {
		font-size: 0.92rem !important;
		line-height: 1.5 !important;
		margin: 0 auto 18px !important;
		max-width: 92% !important;
	}

	.kosmo-hero__actions {
		display: flex !important;
		flex-direction: column !important;
		gap: 10px !important;
		width: 100% !important;
		max-width: 320px !important;
		margin: 0 auto 20px !important;
	}

	.kosmo-hero__actions .kosmo-btn {
		width: 100% !important;
		justify-content: center !important;
		min-height: 46px !important;
	}

	.kosmo-hero__highlights {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 12px !important;
		flex-wrap: wrap !important;
		border-top: 1px solid rgba(255, 253, 247, 0.16) !important;
		padding-top: 16px !important;
		margin-bottom: 14px !important;
	}

	.kosmo-hero__metric {
		text-align: center !important;
	}

	.kosmo-hero__metric strong {
		font-size: 1.25rem !important;
	}

	.kosmo-hero__metric span {
		font-size: 0.74rem !important;
	}

	.kosmo-hero__metric-divider {
		height: 22px !important;
	}

	.kosmo-hero__origin {
		justify-content: center !important;
		font-size: 0.78rem !important;
		text-align: center !important;
	}

	.kosmo-hero__stage {
		width: 100% !important;
		max-width: 100% !important;
		overflow: hidden !important;
		display: flex !important;
		justify-content: center !important;
	}

	.kosmo-hero__halo {
		width: 260px !important;
		height: 260px !important;
	}

	.kosmo-hero__pack-composition {
		height: clamp(210px, 58vw, 275px) !important;
		width: 100% !important;
		max-width: 100% !important;
		display: flex !important;
		align-items: flex-end !important;
		justify-content: center !important;
		overflow: hidden !important;
	}

	.kosmo-hero__pack--center {
		width: clamp(120px, 32vw, 155px) !important;
		z-index: 3 !important;
	}

	.kosmo-hero__pack--left {
		width: clamp(95px, 25vw, 125px) !important;
		margin-right: -18px !important;
		z-index: 2 !important;
	}

	.kosmo-hero__pack--right {
		width: clamp(100px, 26vw, 132px) !important;
		margin-left: -18px !important;
		z-index: 2 !important;
	}

	/* 2-Column Responsive Product Grid (360px - 768px) */
	.kosmo-products-grid,
	.kosmo-products-grid--shop {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 12px !important;
	}

	.kosmo-product-card {
		border-radius: var(--kosmo-radius-md) !important;
	}

	.kosmo-product-card__media {
		aspect-ratio: 1 / 1 !important;
		padding: 12px !important;
		background: #E9D3BA !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		overflow: hidden !important;
	}

	.kosmo-product-card__img {
		object-fit: contain !important;
		max-width: 100% !important;
		max-height: 100% !important;
		width: auto !important;
		height: auto !important;
	}

	.kosmo-product-card__badges {
		top: 8px !important;
		left: 8px !important;
		gap: 4px !important;
	}

	.kosmo-badge {
		font-size: 0.65rem !important;
		padding: 3px 6px !important;
	}

	.kosmo-product-card__floating-actions {
		top: 8px !important;
		right: 8px !important;
		gap: 6px !important;
	}

	.kosmo-icon-pill {
		width: 32px !important;
		height: 32px !important;
	}

	.kosmo-product-card__body {
		padding: 10px 10px 12px !important;
		display: flex !important;
		flex-direction: column !important;
		flex-grow: 1 !important;
	}

	.kosmo-product-card__category {
		font-size: 0.65rem !important;
	}

	.kosmo-product-card__rating {
		font-size: 0.72rem !important;
	}

	.kosmo-product-card__title {
		font-size: 0.88rem !important;
		line-height: 1.25 !important;
		min-height: 2.5em !important;
		margin-bottom: 4px !important;
		display: -webkit-box !important;
		-webkit-line-clamp: 2 !important;
		-webkit-box-orient: vertical !important;
		overflow: hidden !important;
	}

	.kosmo-product-card__purity {
		display: none !important;
	}

	.kosmo-product-card__footer {
		padding-top: 8px !important;
		margin-top: auto !important;
		display: flex !important;
		flex-direction: column !important;
		gap: 8px !important;
	}

	.kosmo-price-sale {
		font-size: 1.05rem !important;
	}

	.kosmo-price-regular {
		font-size: 0.78rem !important;
	}

	.kosmo-btn--card {
		width: 100% !important;
		padding: 10px 12px !important;
		font-size: 0.8rem !important;
		font-weight: 600 !important;
		white-space: nowrap !important;
		justify-content: center !important;
		min-height: 40px !important;
	}

	/* Shop Toolbar Mobile Layout */
	.kosmo-shop-toolbar {
		padding: 12px 14px !important;
		margin-bottom: 20px !important;
		display: flex !important;
		flex-direction: column !important;
		gap: 10px !important;
	}

	.kosmo-shop-toolbar__left {
		width: 100% !important;
		display: flex !important;
		align-items: center !important;
		justify-content: space-between !important;
	}

	.kosmo-shop-toolbar__right {
		width: 100% !important;
	}

	.kosmo-sort-form {
		width: 100% !important;
		display: flex !important;
		justify-content: space-between !important;
		align-items: center !important;
		gap: 8px !important;
	}

	.kosmo-sort-form select {
		flex: 1 !important;
		min-width: 0 !important;
		width: 100% !important;
		padding: 8px 10px !important;
		font-size: 0.85rem !important;
	}

	.kosmo-shop-hero {
		padding: 32px 0 26px !important;
	}

	.kosmo-shop-hero__title {
		font-size: clamp(1.6rem, 5.5vw, 2.2rem) !important;
	}

	.kosmo-shop-hero__subtitle {
		font-size: 0.86rem !important;
	}

	.kosmo-shop-hero__badges {
		display: flex !important;
		flex-wrap: wrap !important;
		gap: 8px !important;
		margin-top: 14px !important;
	}

	.kosmo-shop-pill {
		padding: 6px 12px !important;
		font-size: 0.76rem !important;
	}

	/* Single Product Page Mobile Optimization */
	.kosmo-single-product {
		padding: 16px 0 96px !important;
	}

	.kosmo-single-product__grid {
		grid-template-columns: 1fr !important;
		gap: 20px !important;
	}

	.kosmo-product-gallery {
		position: static !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	.kosmo-product-gallery__stage {
		aspect-ratio: 1 / 1 !important;
		min-height: auto !important;
		max-height: 380px !important;
		width: 100% !important;
		padding: 18px !important;
		background: #E9D3BA !important;
		border-radius: var(--kosmo-radius-md) !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		overflow: hidden !important;
		cursor: pointer !important;
	}

	.kosmo-product-gallery__main-img {
		width: auto !important;
		height: auto !important;
		max-width: 100% !important;
		max-height: 100% !important;
		object-fit: contain !important;
		filter: drop-shadow(0 12px 20px rgba(53, 37, 30, 0.14)) !important;
	}

	.kosmo-product-gallery__thumbs {
		display: flex !important;
		gap: 8px !important;
		overflow-x: auto !important;
		flex-wrap: nowrap !important;
		padding: 6px 0 8px !important;
		-webkit-overflow-scrolling: touch !important;
		scrollbar-width: none !important;
		width: 100% !important;
	}

	.kosmo-product-gallery__thumbs::-webkit-scrollbar {
		display: none !important;
	}

	.kosmo-gallery-thumb {
		flex: 0 0 60px !important;
		width: 60px !important;
		height: 60px !important;
		padding: 4px !important;
		border-radius: var(--kosmo-radius-sm) !important;
		background: #E9D3BA !important;
		overflow: hidden !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
	}

	.kosmo-gallery-thumb img {
		width: auto !important;
		height: auto !important;
		max-width: 100% !important;
		max-height: 100% !important;
		object-fit: contain !important;
	}

	.kosmo-product-summary__title {
		font-size: clamp(1.4rem, 5vw, 1.85rem) !important;
		margin-bottom: 12px !important;
		line-height: 1.25 !important;
	}

	.kosmo-product-summary__price-box {
		padding: 14px 16px !important;
		margin-bottom: 16px !important;
		display: flex !important;
		align-items: baseline !important;
		flex-wrap: wrap !important;
		gap: 8px 12px !important;
	}

	.kosmo-summary-price-sale {
		font-size: 1.7rem !important;
	}

	.kosmo-summary-price-regular {
		font-size: 1.05rem !important;
	}

	.kosmo-summary-save-badge {
		font-size: 0.78rem !important;
		padding: 4px 10px !important;
	}

	.kosmo-product-summary__highlights {
		gap: 8px !important;
		margin-bottom: 18px !important;
	}

	.kosmo-product-summary__highlights li {
		font-size: 0.85rem !important;
		gap: 8px !important;
	}

	.kosmo-pack-selector {
		margin-bottom: 20px !important;
	}

	.kosmo-pack-selector__pills {
		display: grid !important;
		grid-template-columns: repeat(3, 1fr) !important;
		gap: 6px !important;
	}

	.kosmo-pack-pill {
		padding: 8px 8px !important;
		text-align: center !important;
		align-items: center !important;
		border-radius: var(--kosmo-radius-sm) !important;
	}

	.kosmo-pack-pill__size {
		font-size: 0.76rem !important;
	}

	.kosmo-pack-pill__price {
		font-size: 0.95rem !important;
	}

	.kosmo-purchase-form__row {
		display: grid !important;
		grid-template-columns: 1fr auto !important;
		gap: 10px !important;
		margin-bottom: 20px !important;
	}

	.kosmo-qty-stepper {
		width: 100% !important;
		justify-content: space-between !important;
		min-height: 48px !important;
	}

	.kosmo-qty-input {
		width: 44px !important;
	}

	.kosmo-btn-wishlist-box {
		width: 48px !important;
		height: 48px !important;
		flex-shrink: 0 !important;
	}

	#kosmo-single-add-btn {
		grid-column: 1 / -1 !important;
		width: 100% !important;
		min-height: 48px !important;
		justify-content: center !important;
		font-size: 0.95rem !important;
	}

	.kosmo-buy-now-btn {
		grid-column: 1 / -1 !important;
		width: 100% !important;
		min-height: 48px !important;
		justify-content: center !important;
		font-size: 0.95rem !important;
	}

	/* Single Product Tabs Navigation */
	.kosmo-tabs-nav {
		display: flex !important;
		flex-wrap: nowrap !important;
		overflow-x: auto !important;
		padding: 4px 0 10px !important;
		-webkit-overflow-scrolling: touch !important;
		scrollbar-width: none !important;
		width: 100% !important;
		gap: 8px !important;
	}

	.kosmo-tabs-nav::-webkit-scrollbar {
		display: none !important;
	}

	.kosmo-tab-btn {
		white-space: nowrap !important;
		flex-shrink: 0 !important;
		font-size: 0.82rem !important;
		padding: 8px 14px !important;
	}

	.kosmo-tab-panel {
		padding: 20px 16px !important;
	}

	/* Sticky Mobile ATC Bar on Single Product */
	.kosmo-sticky-atc-bar {
		display: flex !important;
	}

	body.single-product .kosmo-footer {
		padding-bottom: 84px !important;
	}

	/* Floating WhatsApp Elevation on Mobile Single Product */
	.single-product .kosmo-floating-whatsapp {
		bottom: 84px !important;
	}

	/* Sections Stack Cleanly on Mobile */
	.kosmo-why-comparison,
	.kosmo-collections-grid,
	.kosmo-testimonials-grid,
	.kosmo-blog-grid,
	.kosmo-tab-split,
	.kosmo-reviews-layout,
	.kosmo-quickview-grid,
	.kosmo-lifestyle-card {
		grid-template-columns: 1fr !important;
		gap: 20px !important;
	}

	.kosmo-insta-grid {
		grid-template-columns: repeat(3, 1fr) !important;
		gap: 8px !important;
	}

	.kosmo-lifestyle-card,
	.kosmo-newsletter-box,
	.kosmo-editorial-box,
	.kosmo-contact-form-panel,
	.kosmo-wc-content-box {
		padding: 24px 18px !important;
	}

	.kosmo-form-grid {
		grid-template-columns: 1fr !important;
	}

	/* Mobile Footer Accordions */
	.kosmo-footer__main {
		padding: 32px 16px 28px !important;
	}

	.kosmo-footer__grid {
		grid-template-columns: 1fr !important;
		gap: 0 !important;
	}

	.kosmo-footer__col--brand {
		padding-bottom: 20px !important;
		margin-bottom: 6px !important;
		border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
	}

	.kosmo-footer .kosmo-brand-logo__img {
		height: 46px !important;
		max-width: 145px !important;
	}

	.kosmo-footer__col--accordion {
		border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
	}

	.kosmo-footer__col--contact {
		padding-top: 20px !important;
	}

	.kosmo-footer__acc-btn {
		padding: 14px 0 !important;
		margin-bottom: 0 !important;
		cursor: pointer !important;
	}

	.kosmo-footer__acc-icon {
		display: inline-flex !important;
	}

	.kosmo-footer__col--accordion .kosmo-footer__acc-body {
		display: none !important;
		padding-bottom: 16px !important;
	}

	.kosmo-footer__col--accordion.is-open .kosmo-footer__acc-body {
		display: block !important;
	}

	/* Slide-out Cart Drawer Mobile Size */
	.kosmo-cart-drawer {
		width: min(400px, 94vw) !important;
	}

	/* WooCommerce Responsive Overrides */
	.woocommerce table.shop_table_responsive tr td,
	.woocommerce-page table.shop_table_responsive tr td {
		padding: 10px 12px !important;
	}

	.woocommerce-checkout #order_review_heading,
	.woocommerce-checkout #order_review {
		width: 100% !important;
		float: none !important;
	}

	.woocommerce .col2-set .col-1,
	.woocommerce-page .col2-set .col-1,
	.woocommerce .col2-set .col-2,
	.woocommerce-page .col2-set .col-2 {
		width: 100% !important;
		float: none !important;
	}
}

/* ==========================================================================
   4. Compact Mobile Devices (360px - 480px)
   ========================================================================== */
@media (max-width: 480px) {
	.kosmo-container {
		padding-left: 14px !important;
		padding-right: 14px !important;
	}

	.kosmo-hide-mobile {
		display: none !important;
	}

	.kosmo-cart-drawer {
		width: 100vw !important;
		max-width: 100% !important;
	}

	.kosmo-insta-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}

	.kosmo-newsletter-form__row {
		flex-direction: column !important;
	}

	.kosmo-atc-modal__card {
		padding: 20px 16px !important;
	}

	.kosmo-atc-modal__actions {
		grid-template-columns: 1fr !important;
	}

	.kosmo-process-step {
		flex-direction: column !important;
		gap: 12px !important;
		padding: 16px !important;
	}

	.kosmo-process-step__num {
		width: 40px !important;
		height: 40px !important;
		font-size: 1.25rem !important;
	}
}

/* ==========================================================================
   5. Ultra-Narrow Mobile Viewports (320px - 359px)
   ========================================================================== */
@media (max-width: 359px) {
	.kosmo-container {
		padding-left: 10px !important;
		padding-right: 10px !important;
	}

	.kosmo-header__inner {
		padding: 0 10px !important;
		gap: 4px !important;
	}

	.kosmo-brand-logo__img {
		height: 38px !important;
		max-width: 120px !important;
	}

	.kosmo-header__right {
		gap: 4px !important;
	}

	.kosmo-header__icon-btn,
	.kosmo-header__cart-btn,
	.kosmo-header__hamburger {
		width: 32px !important;
		height: 32px !important;
		min-width: 32px !important;
	}

	.kosmo-header__icon-btn svg,
	.kosmo-header__cart-btn svg,
	.kosmo-header__hamburger svg {
		width: 15px !important;
		height: 15px !important;
	}

	.kosmo-products-grid,
	.kosmo-products-grid--shop {
		grid-template-columns: 1fr !important;
		gap: 14px !important;
	}

	.kosmo-pack-selector__pills {
		grid-template-columns: 1fr !important;
	}

	.kosmo-hero__pack-composition {
		height: 200px !important;
	}

	.kosmo-hero__pack--center {
		width: 115px !important;
	}

	.kosmo-hero__pack--left,
	.kosmo-hero__pack--right {
		width: 90px !important;
	}
}
