:root {
    --ui-surface: rgba(255, 255, 255, 0.92);
    --ui-surface-strong: #ffffff;
    --ui-surface-muted: #f4f7fb;
    --ui-border-soft: rgba(15, 23, 42, 0.1);
    --ui-border-strong: rgba(15, 23, 42, 0.16);
    --ui-shadow-soft: 0 14px 34px rgba(15, 23, 42, 0.08);
    --ui-shadow-card: 0 18px 40px rgba(15, 23, 42, 0.12);
    --ui-shadow-lift: 0 22px 50px rgba(15, 23, 42, 0.16);
    --ui-radius-sm: 0.875rem;
    --ui-radius-md: 1.125rem;
    --ui-radius-lg: 1.5rem;
    --ui-radius-pill: 999px;
    --ui-ring: 0 0 0 4px rgba(0, 123, 255, 0.14);
    --ui-header-height: 84px;
    --ui-header-edge-gap: clamp(0.65rem, 2vw, 1.35rem);
    --ui-header-radius: clamp(1rem, 3vw, 1.75rem);
}

body {
    background-color: #eef3f8;
}

/* Keep storefront header flush with viewport top on home/cart pages across devices. */
body[data-page="store-home"],
body[data-page="cart-page"] {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body[data-page="store-home"] .main-header,
body[data-page="cart-page"] .main-header {
    top: 0 !important;
    margin-top: calc(var(--safe-area-inset-top, 0px) * -1) !important;
    padding-top: calc(clamp(0.75rem, 2vw, 1rem) + var(--safe-area-inset-top, 0px)) !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex="0"]:focus-visible {
    outline: none;
    box-shadow: var(--ui-ring);
}

.main-content {
    padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.main-header {
    /* Keep structure here and let the active theme control header colors. */
    margin-right: max(env(safe-area-inset-right, 0px), var(--ui-header-edge-gap));
    margin-left: max(env(safe-area-inset-left, 0px), var(--ui-header-edge-gap));
    border-radius: var(--ui-header-radius);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 20px 36px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    overflow: clip;
}

/* Keep banner text simple without themed container boxes. */
.banner-content {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.header-content {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-width: 0;
    gap: 0.85rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

#site-logo {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.12), rgba(40, 167, 69, 0.14));
    padding: 0.25rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.logo h1 {
    font-size: clamp(1rem, 3.4vw, 1.4rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.main-nav {
    display: block;
    width: auto;
    max-width: 100%;
    min-width: 0;
    justify-self: start;
}

.main-nav ul {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: auto;
    max-width: 100%;
    gap: 0.6rem;
    justify-content: flex-start;
    min-height: 0;
    padding: 0;
    margin: 0;
    list-style: none;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.main-nav li {
    flex: 0 0 auto;
}

.main-nav a {
    width: auto;
    min-width: 126px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding-inline: 1rem;
    border-radius: var(--ui-radius-pill);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
}

.main-nav a.active,
.main-nav a:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.24);
}

.cart-icon {
    justify-self: end;
}

.cart-link {
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.cart-link:hover {
    background: rgba(255, 255, 255, 0.18);
}

.cart-count {
    top: -0.35rem;
    right: -0.35rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.2);
}

.hero-section {
    padding: clamp(1.35rem, 5vw, 2.6rem) 0;
    margin-bottom: clamp(1.25rem, 4vw, 2rem);
}

.hero-section::before {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.16), transparent 36%),
        linear-gradient(180deg, rgba(6, 12, 22, 0.08), rgba(6, 12, 22, 0.3));
}

.banner-slider {
    height: clamp(220px, 42vw, 430px);
    min-height: 220px;
    border-radius: clamp(1.125rem, 2.8vw, 1.75rem);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--ui-shadow-lift);
}

.banner-content {
    padding: clamp(1rem, 3vw, 1.75rem);
    max-width: min(560px, calc(100vw - 2.5rem));
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.38));
    border-radius: clamp(1rem, 2vw, 1.5rem);
    backdrop-filter: blur(10px);
}

.banner-content h2 {
    line-height: 1.15;
    margin-bottom: 0.65rem;
}

.banner-content p {
    line-height: 1.65;
}

.banner-nav {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.banner-nav.prev {
    right: 14px;
    left: auto;
}

.banner-nav.next {
    left: 14px;
    right: auto;
}

.banner-indicators {
    bottom: 14px;
    gap: 0.55rem;
}

.banner-indicator {
    width: 11px;
    height: 11px;
    background: rgba(255, 255, 255, 0.48);
}

.banner-indicator.active {
    width: 14px;
    height: 14px;
}

.filters-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding: clamp(1rem, 3vw, 1.6rem);
    background: var(--ui-surface);
    border: 1px solid var(--ui-border-soft);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow-soft);
    backdrop-filter: blur(16px);
}

.search-box,
.product-view-toggle,
.view-toggle,
.category-filters {
    margin: 0;
}

.search-box {
    grid-column: 1 / -1;
}

.search-box input,
.search-box button,
.toggle-btn,
.product-view-btn,
.all-categories-btn,
.group-button,
.simple-categories .category-item,
.category-btn,
.category-item {
    min-height: 44px;
}

.search-box input {
    border-radius: 16px;
    border-color: rgba(15, 23, 42, 0.1);
    background: #ffffff;
}

.search-box button {
    border-radius: 16px;
}

.product-view-toggle,
.view-toggle {
    background: var(--ui-surface-muted);
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 18px;
}

.product-view-btn,
.toggle-btn {
    border-radius: 14px;
}

.product-view-btn:not(.active),
.toggle-btn:not(.active) {
    color: #4b5563;
}

.all-categories-btn,
.group-button,
.simple-categories .category-item,
.category-btn,
.category-item {
    border-radius: var(--ui-radius-pill);
}

.category-filters {
    grid-column: 1 / -1;
}

.category-groups,
.simple-categories {
    gap: 0.75rem;
}

.group-dropdown {
    right: 0;
    left: auto;
    transform: translateY(12px);
    min-width: min(320px, 92vw);
    max-width: min(360px, 92vw);
    border-radius: 18px;
    border: 1px solid var(--ui-border-soft);
    box-shadow: var(--ui-shadow-card);
}

.group-dropdown.active {
    transform: translateY(0);
}

.group-dropdown::before {
    left: auto;
    right: 24px;
    transform: none;
}

.category-item {
    border-radius: 12px;
}

.products-grid,
.products-list,
.products-bubbles {
    margin-bottom: 2rem;
}

.products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.product-card,
.product-card-list,
.product-card-bubbles {
    position: relative;
    border: 1px solid var(--ui-border-soft);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow-soft);
    background: var(--ui-surface-strong);
}

.product-card,
.product-card-list {
    overflow: clip;
}

.product-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.product-card:hover,
.product-card-list:hover {
    transform: translateY(-4px);
    box-shadow: var(--ui-shadow-card);
}

.product-card[data-open-product],
.product-card-list[data-open-product],
.product-card-bubbles[data-open-product] {
    cursor: pointer;
}

.product-card[data-open-product]:focus-visible,
.product-card-list[data-open-product]:focus-visible,
.product-card-bubbles[data-open-product]:focus-visible {
    box-shadow: var(--ui-ring), var(--ui-shadow-card);
}

.product-image-container {
    background:
        radial-gradient(circle at top right, rgba(0, 123, 255, 0.08), transparent 46%),
        linear-gradient(180deg, rgba(244, 247, 251, 0.95), rgba(255, 255, 255, 0.96));
}

.product-card .product-image-container {
    aspect-ratio: 1 / 1;
}

.product-card .product-image {
    height: 100%;
}

.stock-badge {
    top: 12px;
    right: 12px;
    padding: 0.45rem 0.8rem;
    border-radius: var(--ui-radius-pill);
    box-shadow: 0 8px 18px rgba(220, 53, 69, 0.2);
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    height: 100%;
    padding: 1rem;
}

.product-category {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 0.01em;
}

.product-name {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 2.8em;
    font-size: 1rem;
}

.product-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 2.9em;
    color: #5f6b7a;
    font-size: 0.9rem;
}

.product-price-container {
    gap: 0.4rem;
    align-items: baseline;
}

.product-price {
    font-size: 1.12rem;
}

.add-to-cart-btn {
    margin-top: auto;
    min-height: 46px;
    border-radius: 15px;
    font-size: 0.92rem;
}

.products-list {
    gap: 1rem;
}

.product-card-list {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
}

.product-card-list .product-image-container {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1 / 1;
}

.product-card-list .product-image {
    border-radius: 0;
}

.product-card-list .product-info {
    padding: 1rem;
}

.product-card-list .add-to-cart-btn {
    width: 100%;
}

.products-bubbles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
}

.product-card-bubbles {
    width: 100%;
    aspect-ratio: auto;
    min-height: 280px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.product-card-bubbles .product-bubble-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.product-card-bubbles .product-image {
    max-height: 180px;
}

.product-card-bubbles .add-to-cart-btn {
    min-height: 44px;
}

.product-card-bubbles:hover {
    box-shadow: none;
}

.no-products {
    padding: 2rem 1.5rem;
    text-align: center;
    background: var(--ui-surface);
    border: 1px dashed var(--ui-border-strong);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow-soft);
}

.modal-overlay {
    background: linear-gradient(180deg, rgba(7, 12, 20, 0.62), rgba(7, 12, 20, 0.82));
    backdrop-filter: blur(14px);
}

.modal-content {
    top: 50%;
    left: 50%;
    width: min(94vw, 1220px);
    max-width: min(94vw, 1220px);
    height: min(90dvh, 860px);
    max-height: min(90dvh, 860px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 0;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.98);
    transform: translate(-50%, -48%) scale(0.98);
    box-shadow: 0 34px 80px rgba(15, 23, 42, 0.28);
}

.product-modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.35rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.94));
    border-bottom: 1px solid var(--ui-border-soft);
    backdrop-filter: blur(16px);
}

.modal-topbar-copy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.modal-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.28rem 0.72rem;
    border-radius: var(--ui-radius-pill);
    background: rgba(0, 123, 255, 0.08);
    color: #0f4d92;
    font-size: 0.78rem;
    font-weight: 800;
}

.modal-topbar-note {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.55;
}

.modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 0;
    min-height: 0;
    overflow: hidden;
}

.product-media-section {
    min-height: 0;
    padding: 1.35rem;
    background: linear-gradient(180deg, rgba(244, 247, 251, 0.95), rgba(255, 255, 255, 1));
    border-inline-end: 1px solid var(--ui-border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.product-details-section {
    min-height: 0;
    padding: 1.35rem;
    padding-bottom: 1.5rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.modal-header-actions {
    position: static;
    display: flex;
    gap: 0.65rem;
    flex-shrink: 0;
}

.modal-share-btn,
.modal-close {
    width: 46px;
    height: 46px;
    border-radius: 14px;
}

.image-slider {
    width: 100%;
    min-height: clamp(320px, 48vh, 520px);
    max-height: clamp(320px, 48vh, 520px);
    margin: auto;
    background: linear-gradient(180deg, #ffffff, #f7fafe);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 28px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 16px 40px rgba(15, 23, 42, 0.08);
}

.slider-container,
.slide {
    min-height: clamp(320px, 48vh, 520px);
    max-height: clamp(320px, 48vh, 520px);
}

.slide {
    padding: 1.35rem;
    background:
        radial-gradient(circle at top right, rgba(0, 123, 255, 0.06), transparent 42%),
        linear-gradient(180deg, rgba(248, 251, 255, 0.92), rgba(255, 255, 255, 1));
}

.slide img {
    max-height: calc(clamp(320px, 48vh, 520px) - 2.7rem);
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.slider-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
}

.slider-dots {
    bottom: 18px;
}

.product-header {
    margin: 0;
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--ui-border-soft);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
}

.product-title {
    font-size: clamp(1.35rem, 2.5vw, 1.8rem);
    line-height: 1.25;
    margin: 0;
}

.product-category-badge {
    padding: 0.55rem 1rem;
    border-radius: var(--ui-radius-pill);
    font-size: 0.85rem;
    background: rgba(0, 123, 255, 0.08);
    color: #0f4d92;
    border: 1px solid rgba(0, 123, 255, 0.12);
    box-shadow: none;
}

.product-price-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
}

.price-display,
.stock-status-display {
    max-width: none;
    min-width: 0;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid var(--ui-border-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.price-display {
    justify-content: center;
}

.stock-status-display {
    align-items: flex-start;
    text-align: right;
}

.price-value {
    font-size: clamp(1.55rem, 3vw, 2rem);
}

.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
}

.modal-detail-section,
.product-colors,
.product-sizes,
.product-video,
.product-description-full {
    margin: 0;
    padding: 1rem 1.05rem;
    background: #f8fafc;
    border: 1px solid var(--ui-border-soft);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.modal-section-heading {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.9rem;
}

.modal-section-heading h3 {
    margin: 0;
    color: #122033;
    font-size: 1rem;
}

.modal-section-heading p {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.6;
}

.product-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    max-height: none;
    overflow: visible;
    padding: 0;
}

.info-item {
    min-height: 88px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.45rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: none;
}

.info-item::before {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 3px;
    transform: scaleX(0);
    transform-origin: right;
}

.info-item:hover {
    transform: none;
    box-shadow: none;
}

.info-item .label {
    font-size: 0.82rem;
    color: #64748b;
}

.info-item .value {
    font-size: 0.96rem;
    line-height: 1.5;
}

.product-description-full {
    max-height: none;
    height: auto;
    overflow: visible !important;
    scrollbar-width: auto;
}

.product-colors h4,
.product-sizes h4,
.product-video h4,
.product-description-full h4 {
    margin: 0 0 0.8rem;
    color: #122033;
    font-size: 1rem;
}

.colors-list,
.sizes-list {
    max-height: none;
    overflow: visible;
    padding: 0;
    gap: 0.75rem;
}

.color-item,
.size-item {
    min-width: 110px;
    border-radius: 16px;
    padding: 0.8rem;
}

.product-description-full p {
    margin: 0;
    color: #4b5563;
    line-height: 1.9;
    text-align: start;
    overflow: visible !important;
    max-height: none !important;
    height: auto;
    display: block;
}

.product-actions {
    position: relative;
    bottom: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem calc(1rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--ui-border-soft);
    border-bottom: none;
    box-shadow: 0 -18px 36px rgba(15, 23, 42, 0.07);
    z-index: 6;
}

.product-actions > .quantity-selector {
    width: 100%;
    min-width: 0;
    padding-right: 0;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.product-actions > .add-to-cart-modal-btn {
    width: auto;
    min-width: 220px;
    margin-inline-start: 0;
}

.quantity-selector {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1rem;
}

.quantity-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.quantity-label {
    color: #475569;
    font-size: 0.82rem;
    font-weight: 800;
}

.quantity-selector label,
.quantity-selector > label,
.quantity-btn,
.quantity-selector input {
    position: static;
    left: auto;
    right: auto;
    margin: 0;
}

.quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem;
    background: #f5f8fc;
    border: 1px solid var(--ui-border-soft);
    border-radius: var(--ui-radius-pill);
    margin-inline-start: auto;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1rem;
}

.quantity-selector input {
    width: 64px;
    min-height: 36px;
    border-radius: 999px;
    border: 1px solid var(--ui-border-soft);
    text-align: center;
    background: #ffffff;
}

.quantity-info,
.quantity-selector > .quantity-info {
    width: auto;
    text-align: right;
    color: #64748b;
    font-size: 0.82rem;
    margin: 0;
}

.add-to-cart-modal-btn {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding-inline: 1.35rem;
    border-radius: 16px;
    font-size: 0.98rem;
    box-shadow: 0 12px 24px rgba(0, 123, 255, 0.18);
}

@media (min-width: 768px) {
    .logo h1 {
        max-width: min(24vw, 260px);
    }

    .main-nav a {
        min-width: 132px;
        padding-inline: 1.15rem;
    }

    .filters-section {
        grid-template-columns: minmax(0, 1.2fr) minmax(290px, 0.8fr);
        align-items: start;
    }

    .product-view-toggle {
        grid-column: 1 / 2;
    }

    .view-toggle {
        grid-column: 2 / 3;
    }

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

    .product-card-list {
        flex-direction: row;
        gap: 0;
    }

    .product-card-list .product-image-container {
        width: clamp(220px, 26vw, 280px);
        flex: 0 0 clamp(220px, 26vw, 280px);
        aspect-ratio: auto;
        height: 100%;
    }

    .product-card-list .product-image {
        height: 100%;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .header-content {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: flex-start;
    }

    .logo {
        grid-column: 1 / -1;
        width: 100%;
    }

    .main-nav {
        grid-column: 1 / 2;
        width: 100%;
        max-width: 100%;
    }

    .main-nav ul {
        width: 100%;
        justify-content: stretch;
    }

    .main-nav li {
        flex: 1 1 0;
    }

    .cart-icon {
        grid-column: 2 / 3;
        align-self: center;
    }

    .product-view-btn[data-view="bubbles"] {
        display: inline-flex !important;
    }

    .banner-slider {
        height: clamp(220px, 58vw, 280px);
    }

    .banner-content {
        max-width: calc(100vw - 2rem);
    }

    .banner-nav {
        width: 44px;
        height: 44px;
    }

    .view-toggle,
    .product-view-toggle {
        overflow-x: auto;
        padding: 0.45rem;
    }

    .view-toggle::-webkit-scrollbar,
    .product-view-toggle::-webkit-scrollbar {
        display: none;
    }

    .product-view-btn,
    .toggle-btn {
        min-width: max-content;
        flex: 1 0 auto;
    }

    .main-nav a {
        width: 100%;
        min-width: 0;
        padding-inline: 0.8rem;
    }

    .simple-categories,
    .category-groups {
        justify-content: flex-start;
    }

    .group-dropdown {
        min-width: 100%;
        max-width: min(92vw, 340px);
    }

    .modal-content {
        top: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        height: min(100dvh, 100vh);
        max-height: min(100dvh, 100vh);
        border-radius: 0;
        transform: translateY(100%);
    }

    .product-modal.active .modal-content {
        transform: translateY(0);
    }

    .modal-topbar {
        align-items: center;
        padding: max(env(safe-area-inset-top), 0.85rem) 1rem 0.9rem;
    }

    .modal-topbar-note {
        display: none;
    }

    .modal-body {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .product-media-section {
        padding: 1rem;
        border-inline-end: none;
        border-bottom: 1px solid var(--ui-border-soft);
        overflow: visible;
    }

    .product-details-section {
        padding: 1rem 1rem calc(7.5rem + env(safe-area-inset-bottom, 0px));
        overflow: visible;
        gap: 0.9rem;
    }

    .image-slider,
    .slider-container,
    .slide {
        min-height: clamp(240px, 46vh, 340px);
        max-height: clamp(240px, 46vh, 340px);
    }

    .slide {
        padding: 1rem;
    }

    .slide img {
        max-height: calc(clamp(240px, 46vh, 340px) - 2rem);
    }

    .product-price-section,
    .product-info-grid {
        grid-template-columns: 1fr;
    }

    .product-actions {
        position: sticky;
        bottom: 0;
        grid-template-columns: 1fr;
        gap: 0.85rem;
        padding: 0.9rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    }

    .product-actions > .quantity-selector,
    .product-actions > .add-to-cart-modal-btn {
        width: 100%;
        min-width: 0;
        margin-inline-start: 0;
    }

    .quantity-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
    }

    .quantity-meta {
        width: 100%;
    }

    .quantity-info,
    .quantity-selector > .quantity-info {
        width: 100%;
        text-align: right;
    }

    .quantity-controls {
        width: 100%;
        justify-content: space-between;
        margin-inline-start: 0;
    }

    .quantity-selector input {
        flex: 1 1 auto;
        width: auto;
    }

    .add-to-cart-modal-btn {
        width: 100%;
    }
}

@media (max-width: 479.98px) {
    .header-content {
        gap: 0.7rem;
    }

    .main-nav a {
        font-size: 0.86rem;
    }

    .main-nav a span {
        white-space: nowrap;
    }

    .products-grid {
        gap: 0.85rem;
    }

    .product-info {
        padding: 0.9rem;
    }

    .product-name {
        font-size: 0.96rem;
    }
}

/* Modal Rebuild */
.product-modal .modal-overlay {
    background: linear-gradient(180deg, rgba(9, 14, 23, 0.6), rgba(9, 14, 23, 0.82));
    backdrop-filter: blur(14px);
}

.product-modal .modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(96vw, 1220px);
    max-width: min(96vw, 1220px);
    height: min(92dvh, 880px);
    max-height: min(92dvh, 880px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 0;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    background: rgba(255, 255, 255, 0.98);
    transform: translate(-50%, -48%) scale(0.98);
    box-shadow: 0 36px 90px rgba(15, 23, 42, 0.28);
}

.product-modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.product-modal .modal-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.35rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.95));
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(16px);
}

.product-modal .modal-topbar-copy {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.product-modal .modal-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 123, 255, 0.08);
    color: #0f4d92;
    font-size: 0.78rem;
    font-weight: 800;
}

.product-modal .modal-topbar-note {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

.product-modal .modal-header-actions {
    position: static;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.product-modal .modal-share-btn,
.product-modal .modal-close {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.product-modal .modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
    gap: 0;
    min-height: 0;
    overflow: hidden;
}

.product-modal .product-media-section {
    min-height: 0;
    padding: 1.4rem;
    display: flex;
    align-items: stretch;
    justify-content: center;
    overflow: auto;
    background: linear-gradient(180deg, rgba(244, 247, 251, 0.96), rgba(255, 255, 255, 1));
    border-inline-end: 1px solid rgba(15, 23, 42, 0.08);
}

.product-modal .product-media-shell {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-modal .image-slider {
    width: min(100%, 560px);
    min-height: clamp(320px, 48vh, 520px);
    max-height: clamp(320px, 48vh, 520px);
    margin: auto;
    background: linear-gradient(180deg, #ffffff, #f7fafe);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 30px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 18px 40px rgba(15, 23, 42, 0.08);
}

.product-modal .slider-container,
.product-modal .slide {
    min-height: clamp(320px, 48vh, 520px);
    max-height: clamp(320px, 48vh, 520px);
}

.product-modal .slide {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.35rem;
    background: radial-gradient(circle at top right, rgba(0, 123, 255, 0.06), transparent 42%), linear-gradient(180deg, rgba(248, 251, 255, 0.92), rgba(255, 255, 255, 1));
}

.product-modal .slide.active {
    display: flex;
}

.product-modal .slide img {
    max-width: 100%;
    max-height: calc(clamp(320px, 48vh, 520px) - 2.7rem);
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.product-modal .slider-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
}

.product-modal .slider-dots {
    bottom: 18px;
}

.product-modal .product-details-section {
    min-height: 0;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
}

.product-modal .modal-summary-block,
.product-modal .modal-section-block {
    padding: 1rem 1.05rem;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.product-modal .product-header {
    margin: 0;
    padding: 0 0 1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.product-modal .product-heading-copy {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
}

.product-modal .product-title {
    margin: 0;
    font-size: clamp(1.4rem, 2.5vw, 1.95rem);
    line-height: 1.2;
    color: #0f172a;
}

.product-modal .modal-product-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 0.93rem;
    line-height: 1.7;
}

.product-modal .product-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(0, 123, 255, 0.08);
    color: #0f4d92;
    border: 1px solid rgba(0, 123, 255, 0.12);
    box-shadow: none;
    white-space: nowrap;
}

.product-modal .product-price-section {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
}

.product-modal .price-display,
.product-modal .stock-status-display {
    max-width: none;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.product-modal .stock-status-display {
    align-items: flex-start;
}

.product-modal .price-label,
.product-modal .stock-label {
    color: #64748b;
    font-size: 0.84rem;
    font-weight: 700;
}

.product-modal .price-container-modal {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.product-modal .price-value {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    color: var(--accent-color);
}

.product-modal .stock-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.product-modal .modal-section-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.9rem;
}

.product-modal .modal-section-header h3 {
    margin: 0;
    color: #122033;
    font-size: 1rem;
}

.product-modal .modal-section-header p {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.6;
}

.product-modal .modal-options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem;
}

.product-modal .modal-option-card {
    padding: 1rem;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
}

.product-modal .product-colors,
.product-modal .product-sizes,
.product-modal .product-video,
.product-modal .product-description-full {
    margin: 0;
    border-left: 0;
    border-right: 0;
}

.product-modal .product-colors h4,
.product-modal .product-sizes h4,
.product-modal .product-video h4,
.product-modal .product-description-full h4 {
    margin: 0 0 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #122033;
    font-size: 1rem;
}

.product-modal .colors-list,
.product-modal .sizes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    max-height: none;
    overflow: visible;
    padding: 0;
}

.product-modal .color-item,
.product-modal .size-item {
    min-width: 112px;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: none;
}

.product-modal .color-item:hover,
.product-modal .size-item:hover {
    transform: translateY(-1px);
}

.product-modal .color-item.selected,
.product-modal .size-item.selected {
    color: #0f4d92;
    background: #eef6ff;
    border-color: rgba(0, 123, 255, 0.28);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.1);
}

.product-modal .color-item.selected .color-name,
.product-modal .size-item.selected .size-name,
.product-modal .color-item.selected .color-price-badge,
.product-modal .size-item.selected .size-price-badge,
.product-modal .size-item.selected .size-stock {
    color: inherit;
}

.product-modal .color-name,
.product-modal .size-name {
    font-weight: 700;
    color: #122033;
}

.product-modal .color-price-badge,
.product-modal .size-price-badge {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-color);
}

.product-modal .size-stock {
    font-size: 0.76rem;
    font-weight: 700;
}

.product-modal .product-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    max-height: none;
    overflow: visible;
    padding: 0;
}

.product-modal .info-item {
    min-height: 88px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.45rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: none;
}

.product-modal .info-item::before {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 3px;
    transform: scaleX(0);
    transform-origin: right;
}

.product-modal .info-item:hover {
    transform: none;
    box-shadow: none;
}

.product-modal .info-item .label {
    font-size: 0.82rem;
    color: #64748b;
}

.product-modal .info-item .value {
    font-size: 0.96rem;
    line-height: 1.5;
    color: #122033;
}

.product-modal .product-description-full {
    overflow: visible !important;
    max-height: none !important;
    height: auto;
}

.product-modal .product-description-full p {
    margin: 0;
    color: #475569;
    line-height: 1.9;
    text-align: start;
    white-space: pre-wrap;
    overflow: visible !important;
    max-height: none !important;
}

.product-modal .video-link-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
}

.product-modal .product-video {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.product-modal .video-embed-shell {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.product-modal .video-responsive-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: clamp(210px, 30vh, 360px);
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: linear-gradient(180deg, #07111f, #0f172a);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

.product-modal .video-responsive-frame iframe,
.product-modal .video-responsive-frame video {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    background: #000;
}

.product-modal .video-responsive-frame video {
    object-fit: contain;
}

.product-modal .video-unavailable {
    display: grid;
    place-items: center;
    gap: 0.75rem;
    min-height: clamp(210px, 30vh, 360px);
    padding: 1.5rem;
    text-align: center;
    border-radius: 22px;
    border: 1px dashed rgba(15, 23, 42, 0.16);
    background: linear-gradient(180deg, #f8fbff, #eef5ff);
    color: #475569;
}

.product-modal .video-unavailable i {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(0, 123, 255, 0.1);
    color: var(--accent-color);
    font-size: 1.2rem;
}

.product-modal .video-unavailable p {
    margin: 0;
    line-height: 1.8;
}

.product-modal .video-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 46px;
    padding: 0.8rem 1rem;
    border-radius: 16px;
}

.product-modal .video-link-info {
    color: #64748b;
    font-size: 0.82rem;
}

.product-modal .product-actions {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.35rem calc(1rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 -16px 34px rgba(15, 23, 42, 0.07);
    z-index: 8;
}

.product-modal .quantity-selector {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
}

.product-modal .quantity-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.product-modal .quantity-label {
    color: #475569;
    font-size: 0.82rem;
    font-weight: 800;
}

.product-modal .quantity-info {
    margin: 0;
    color: #64748b;
    font-size: 0.82rem;
    text-align: right;
}

.product-modal .quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem;
    background: #f5f8fc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    margin-inline-start: auto;
}

.product-modal .quantity-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.product-modal .quantity-selector input {
    width: 68px;
    min-height: 38px;
    border-radius: 999px;
    text-align: center;
}

.product-modal .add-to-cart-modal-btn {
    min-width: 240px;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding-inline: 1.35rem;
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(0, 123, 255, 0.18);
}

@media (max-width: 1023.98px) {
    .product-modal .modal-content {
        width: min(96vw, 860px);
        max-width: min(96vw, 860px);
        height: min(94dvh, 980px);
        max-height: min(94dvh, 980px);
    }

    .product-modal .modal-body {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .product-modal .modal-topbar {
        position: sticky;
        top: 0;
        z-index: 9;
    }

    .product-modal .product-media-section {
        padding: 1rem;
        border-inline-end: none;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
        overflow: visible;
    }

    .product-modal .product-details-section {
        padding: 1rem 1rem 1.2rem;
        overflow: visible;
    }

    .product-modal .video-link-container {
        align-items: stretch;
    }

    .product-modal .video-link-btn {
        width: 100%;
        justify-content: center;
    }

    .product-modal .video-responsive-frame,
    .product-modal .video-unavailable {
        min-height: clamp(220px, 34vh, 320px);
    }

    .product-modal .modal-options-grid,
    .product-modal .product-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .product-modal .modal-content {
        top: 0;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        transform: translateY(100%);
    }

    .product-modal.active .modal-content {
        transform: translateY(0);
    }

    .product-modal .modal-topbar {
        align-items: center;
        padding: max(env(safe-area-inset-top), 0.9rem) 1rem 0.9rem;
    }

    .product-modal .modal-topbar-note {
        display: none;
    }

    .product-modal .image-slider,
    .product-modal .slider-container,
    .product-modal .slide {
        min-height: clamp(240px, 42vh, 340px);
        max-height: clamp(240px, 42vh, 340px);
    }

    .product-modal .slide {
        padding: 1rem;
    }

    .product-modal .slide img {
        max-height: calc(clamp(240px, 42vh, 340px) - 2rem);
    }

    .product-modal .product-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-modal .product-price-section {
        grid-template-columns: 1fr;
    }

    .product-modal .product-actions {
        position: sticky;
        bottom: 0;
        grid-template-columns: 1fr;
        gap: 0.85rem;
        padding: 0.9rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
        z-index: 10;
    }

    .product-modal .quantity-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .product-modal .quantity-meta {
        width: 100%;
    }

    .product-modal .quantity-info {
        width: 100%;
        text-align: right;
    }

    .product-modal .quantity-controls {
        width: 100%;
        justify-content: space-between;
        margin-inline-start: 0;
    }

    .product-modal .quantity-selector input {
        flex: 1 1 auto;
        width: auto;
    }

    .product-modal .add-to-cart-modal-btn {
        width: 100%;
        min-width: 0;
    }

    .product-modal .video-responsive-frame,
    .product-modal .video-unavailable {
        min-height: clamp(210px, 32vh, 280px);
        border-radius: 20px;
    }

    .product-modal .product-details-section {
        padding: 1rem 1rem calc(7.5rem + env(safe-area-inset-bottom, 0px));
    }
}

/* Legacy Modal Parity Patch */
.product-modal .modal-topbar {
    display: none;
}

.product-modal .modal-overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9));
    backdrop-filter: blur(8px);
}

.product-modal .modal-content {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
    padding-top: max(env(safe-area-inset-top), 12px);
    width: min(90vw, 100%);
    max-width: min(90vw, 100%);
    height: 100vh;
    max-height: 100vh;
    border-radius: 16px 16px 0 0;
    border: none;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
    z-index: 10001;
}

.product-modal.active .modal-content {
    transform: translateX(-50%) scale(1);
}

.product-modal .modal-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

.product-modal .product-media-section {
    order: 1;
    padding: 1.25rem 1.25rem 1rem;
    border-inline-end: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    overflow: visible;
}

.product-modal .product-details-section {
    order: 2;
    flex: 1;
    min-height: 0;
    padding: 1.75rem;
    padding-bottom: 0;
    background: #fff;
    overflow-y: visible;
    overflow-x: hidden;
}

.product-modal .product-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.product-modal .product-price-section {
    margin-bottom: 0;
}

.product-modal .product-info-grid {
    margin-bottom: 1rem;
}

.product-modal .product-colors,
.product-modal .product-sizes,
.product-modal .product-video,
.product-modal .product-description-full {
    margin-bottom: 1rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.product-modal .product-description-full {
    border-right: 4px solid var(--primary-color);
    max-height: 250px;
    overflow-y: auto;
}

.product-modal .product-description-full p {
    line-height: 1.8;
    text-align: justify;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.product-modal .modal-header-actions {
    position: absolute;
    top: clamp(0.5rem, 1.5vw, 0.75rem);
    right: clamp(0.75rem, 2vw, 1rem);
    left: auto;
    transform: none;
    display: flex;
    gap: 0.5rem;
    z-index: 50;
    padding: 0;
    justify-content: flex-end;
    width: auto;
    height: auto;
}

.product-modal .modal-share-btn,
.product-modal .modal-close {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid #e9ecef;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-modal .product-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;
    padding: clamp(5rem, 8vw, 6rem) clamp(0.75rem, 2vw, 1rem) clamp(0.75rem, 2vw, 1rem);
    background: #f8f9fa;
    border: none;
    border-bottom: 2px solid #e9ecef;
    margin: 0;
    position: relative;
    z-index: 150;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    order: -1;
    min-height: fit-content;
    overflow: visible;
}

.product-modal .product-actions > .quantity-selector {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.6rem;
    padding-right: clamp(4rem, 8vw, 5rem);
}

.product-modal .product-actions > .add-to-cart-modal-btn {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-modal .quantity-selector {
    flex-direction: row;
}

.product-modal .quantity-selector > label {
    margin: 0;
    font-size: 0.75rem;
}

.product-modal .quantity-selector > .quantity-controls {
    order: 2;
}

.product-modal .quantity-selector > .quantity-info {
    order: 3;
    width: auto;
    text-align: left;
    margin: 0;
    font-size: 0.7rem;
}

.product-modal .quantity-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.product-modal .quantity-selector input {
    width: 42px;
    min-height: 30px;
    border-radius: 4px;
}

.product-modal .add-to-cart-modal-btn {
    min-width: fit-content;
    border-radius: 8px;
}

.product-modal .video-embed-shell {
    margin-bottom: 0.75rem;
}

.product-modal .video-responsive-frame,
.product-modal .video-unavailable {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 180px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.product-modal .video-responsive-frame iframe,
.product-modal .video-responsive-frame video {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

@media (min-width: 768px) {
    .product-modal .product-actions {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: clamp(2.75rem, 4.5vw, 3.5rem) 0.9rem 0.9rem;
    }

    .product-modal .product-actions > .quantity-selector,
    .product-modal .product-actions > .add-to-cart-modal-btn {
        width: auto;
    }

    .product-modal .quantity-selector {
        width: auto;
    }
}

@media (max-width: 767.98px) {
    .product-modal .modal-content {
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
    }

    .product-modal .product-actions {
        position: sticky;
        top: 0;
        z-index: 220;
        padding: max(env(safe-area-inset-top), 0.9rem) 0.85rem 0.85rem;
    }

    .product-modal .product-actions > .quantity-selector,
    .product-modal .product-actions > .add-to-cart-modal-btn {
        width: 100%;
    }

    .product-modal .quantity-selector {
        padding-right: 0;
        justify-content: space-between;
    }

    .product-modal .quantity-selector > .quantity-info {
        width: auto;
    }

    .product-modal .product-details-section {
        padding: 1rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }
}

/* Mobile Quantity Controls Fix */
@media (max-width: 767.98px) {
    .product-modal .product-actions .quantity-selector {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding-inline-end: 0.6rem;
    }

    .product-modal .product-actions .quantity-selector > .quantity-controls {
        display: inline-flex;
        align-items: center;
        justify-content: flex-start !important;
        gap: 0.35rem;
        width: auto !important;
        margin-inline-start: 0 !important;
    }

    .product-modal .product-actions .quantity-selector > .quantity-controls .quantity-btn,
    .product-modal .product-actions .quantity-selector > .quantity-controls input {
        position: static !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
    }

    .product-modal .product-actions .quantity-selector > .quantity-info {
        width: auto;
        white-space: nowrap;
        margin-inline-start: 0.35rem;
    }
}

/* Modal Video Container Fix (All Screens) */
.product-modal .product-video {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-areas:
        "title"
        "embed"
        "link";
    align-items: start;
    gap: 0.75rem;
}

.product-modal .product-video > h4 {
    grid-area: title;
    margin: 0;
}

.product-modal .product-video > .video-embed-shell {
    grid-area: embed;
    width: 100%;
    margin: 0;
}

.product-modal .product-video > .video-link-container {
    grid-area: link;
    width: 100%;
    margin: 0;
}

.product-modal .video-responsive-frame,
.product-modal .video-unavailable {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: clamp(180px, 30vh, 300px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e3e8ef;
    background: #f3f6fb;
}

.product-modal .video-unavailable {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 1rem;
    text-align: center;
    color: #41556f;
}

.product-modal .video-unavailable i {
    font-size: 1.1rem;
}

.product-modal .video-unavailable p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.product-modal .video-link-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
}

@media (max-width: 767.98px) {
    .product-modal .video-responsive-frame,
    .product-modal .video-unavailable {
        min-height: clamp(160px, 26vh, 240px);
    }
}

/* Modal Video Hard Fix */
.product-modal .product-video {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
}

.product-modal .product-video > h4 {
    order: 1 !important;
}

.product-modal .product-video > .video-embed-shell {
    order: 2 !important;
    width: 100% !important;
    margin: 0 !important;
}

.product-modal .product-video > .video-link-container {
    order: 3 !important;
    width: 100% !important;
    margin: 0 !important;
}

.product-modal .video-responsive-frame {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    min-height: clamp(180px, 30vh, 300px) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid #e3e8ef !important;
    background: #111827 !important;
}

.product-modal .video-responsive-frame iframe,
.product-modal .video-responsive-frame video {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    border: 0 !important;
}

.product-modal .video-unavailable {
    width: 100% !important;
    min-height: auto !important;
    aspect-ratio: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.55rem !important;
    padding: 0.95rem 1rem !important;
    text-align: center !important;
    border-radius: 12px !important;
    border: 1px dashed #cfd8e4 !important;
    background: #f6f9fe !important;
    color: #334e68 !important;
}

.product-modal .video-unavailable p {
    margin: 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
}

@media (max-width: 767.98px) {
    .product-modal .video-responsive-frame {
        min-height: clamp(165px, 25vh, 230px) !important;
    }
}

/* Bubbles Grid Responsive Fix */
.products-bubbles {
    display: grid !important;
    gap: clamp(0.45rem, 2.2vw, 1rem) !important;
    align-items: stretch;
}

.products-bubbles .product-card-bubbles,
.products-bubbles .product-card-bubbles.size-small,
.products-bubbles .product-card-bubbles.size-medium,
.products-bubbles .product-card-bubbles.size-large {
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
}

.products-bubbles .product-card-bubbles .product-bubble-image {
    width: 100%;
    height: 100%;
    min-height: 0 !important;
    border-radius: 50%;
}

.products-bubbles .product-card-bubbles .product-image {
    width: 100%;
    height: 100%;
    max-height: none !important;
    object-fit: cover;
}

@media (max-width: 767.98px) {
    .products-bubbles {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 768px) {
    .products-bubbles {
        grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)) !important;
    }
}

/* Modal Video Final Compatibility Fix */
#modal-root .product-modal .product-details-section .product-video {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    overflow: visible !important;
}

#modal-root .product-modal .product-details-section .product-video > h4 {
    order: 1 !important;
    margin: 0 !important;
}

#modal-root .product-modal .product-details-section .product-video > .video-embed-shell {
    order: 2 !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    overflow: visible !important;
}

#modal-root .product-modal .product-details-section .product-video > .video-link-container {
    order: 3 !important;
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;
}

#modal-root .product-modal .product-details-section .product-video .video-responsive-frame {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 220px !important;
    min-height: 200px !important;
    max-height: 360px !important;
    padding-top: 0 !important;
    aspect-ratio: auto !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid #d8e0ea !important;
    background: #0f172a !important;
}

#modal-root .product-modal .product-details-section .product-video .video-responsive-frame > iframe,
#modal-root .product-modal .product-details-section .product-video .video-responsive-frame > video {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    display: block !important;
    border: 0 !important;
    background: #000 !important;
}

#modal-root .product-modal .product-details-section .product-video .video-unavailable {
    width: 100% !important;
    min-height: 180px !important;
    max-height: 360px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

@supports (aspect-ratio: 16 / 9) {
    #modal-root .product-modal .product-details-section .product-video .video-responsive-frame {
        height: auto !important;
        aspect-ratio: 16 / 9 !important;
    }
}

@media (max-width: 767.98px) {
    #modal-root .product-modal .product-details-section .product-video .video-responsive-frame {
        height: 185px !important;
        min-height: 170px !important;
        max-height: 240px !important;
    }
}

/* Raad Modal Layout Patch: remove unused left pane and keep the popup responsive. */
#modal-root .product-modal .modal-content {
    top: 50% !important;
    left: 50% !important;
    width: min(92vw, 820px) !important;
    max-width: min(92vw, 820px) !important;
    height: auto !important;
    max-height: min(92dvh, 920px) !important;
    padding-top: 0 !important;
    border-radius: 28px !important;
    transform: translate(-50%, -48%) scale(0.98) !important;
    display: flex !important;
    flex-direction: column !important;
}

#modal-root .product-modal.active .modal-content {
    transform: translate(-50%, -50%) scale(1) !important;
}

#modal-root .product-modal .modal-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#modal-root .product-modal .product-media-section {
    order: 1 !important;
    padding: 1rem 1rem 0.85rem !important;
    border-inline-end: 0 !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
    background: #ffffff !important;
    justify-content: center !important;
}

#modal-root .product-modal .product-media-shell,
#modal-root .product-modal .image-slider {
    width: min(100%, 520px) !important;
    margin-inline: auto !important;
}

#modal-root .product-modal .image-slider,
#modal-root .product-modal .slider-container,
#modal-root .product-modal .slide {
    min-height: clamp(240px, 42vh, 400px) !important;
    max-height: clamp(240px, 42vh, 400px) !important;
}

#modal-root .product-modal .slide {
    padding: 1rem !important;
}

#modal-root .product-modal .slide img {
    max-height: calc(clamp(240px, 42vh, 400px) - 2rem) !important;
}

#modal-root .product-modal .product-details-section {
    order: 2 !important;
    padding: 1rem 1rem 1.25rem !important;
    background: #ffffff !important;
    overflow-y: visible !important;
}

#modal-root .product-modal .product-header {
    flex-direction: column !important;
    align-items: flex-start !important;
}

#modal-root .product-modal .product-price-section,
#modal-root .product-modal .product-info-grid,
#modal-root .product-modal .modal-options-grid {
    grid-template-columns: 1fr !important;
}

#modal-root .product-modal .product-description-full {
    max-height: none !important;
    overflow: visible !important;
}

#modal-root .product-modal .modal-header-actions {
    top: 0.85rem !important;
    right: 0.85rem !important;
    left: auto !important;
}

#modal-root .product-modal .product-actions {
    order: 3 !important;
    position: sticky !important;
    top: auto !important;
    bottom: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 0.9rem !important;
    padding: 0.9rem 1rem calc(0.9rem + env(safe-area-inset-bottom, 0px)) !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-bottom: 0 !important;
    box-shadow: 0 -12px 24px rgba(15, 23, 42, 0.08) !important;
}

#modal-root .product-modal .product-actions > .quantity-selector {
    width: 100% !important;
    min-width: 0 !important;
    padding-right: 0 !important;
    justify-content: space-between !important;
    gap: 0.85rem !important;
}

#modal-root .product-modal .product-actions > .add-to-cart-modal-btn {
    width: auto !important;
    min-width: 220px !important;
}

#modal-root .product-modal .quantity-selector {
    flex-direction: row !important;
    align-items: center !important;
}

#modal-root .product-modal .quantity-controls {
    margin-inline-start: auto !important;
}

@media (max-width: 767.98px) {
    #modal-root .product-modal .modal-content {
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        transform: translateY(100%) !important;
    }

    #modal-root .product-modal.active .modal-content {
        transform: translateY(0) !important;
    }

    #modal-root .product-modal .image-slider,
    #modal-root .product-modal .slider-container,
    #modal-root .product-modal .slide {
        min-height: clamp(220px, 38vh, 320px) !important;
        max-height: clamp(220px, 38vh, 320px) !important;
    }

    #modal-root .product-modal .slide img {
        max-height: calc(clamp(220px, 38vh, 320px) - 2rem) !important;
    }

    #modal-root .product-modal .product-details-section {
        padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)) !important;
    }

    #modal-root .product-modal .product-actions {
        grid-template-columns: 1fr !important;
    }

    #modal-root .product-modal .product-actions > .quantity-selector,
    #modal-root .product-modal .product-actions > .add-to-cart-modal-btn {
        width: 100% !important;
        min-width: 0 !important;
    }

    #modal-root .product-modal .quantity-selector {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    #modal-root .product-modal .quantity-controls {
        width: 100% !important;
        justify-content: space-between !important;
        margin-inline-start: 0 !important;
    }

    #modal-root .product-modal .quantity-selector input {
        flex: 1 1 auto !important;
        width: auto !important;
    }
}
