/* Final dark page polish for remaining storefront issues. */

:root[data-theme="dark"] .site-footer .logo__image,
:root[data-theme="dark"] .catalog-drawer__panel .logo__image,
:root[data-theme="dark"] .mobile-menu__panel .logo__image {
    content: url('/images/logo-ipodil-for-dark-bg.png?v=20260524-3') !important;
    width: auto !important;
    max-width: 124px !important;
    height: auto !important;
    filter: none !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .site-footer__link-columns h2,
:root[data-theme="dark"] .site-footer__link-columns a,
:root[data-theme="dark"] .site-footer__bottom span,
:root[data-theme="dark"] .site-footer__bottom a,
:root[data-theme="dark"] .site-footer__compact-contact > span {
    color: #eaf2ff !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .site-footer__link-columns h2 {
    color: #93b4ff !important;
}

:root[data-theme="dark"] .compare-hero,
:root[data-theme="dark"] .compare-help,
:root[data-theme="dark"] .iphone-compare,
:root[data-theme="dark"] .compare-quick-guide article,
:root[data-theme="dark"] .compare-device,
:root[data-theme="dark"] .compare-section,
:root[data-theme="dark"] .compare-section__cell {
    background: linear-gradient(180deg, rgba(17, 24, 39, .98), rgba(8, 15, 29, .98)) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    color: #f8fbff !important;
    box-shadow: 0 14px 42px rgba(0, 0, 0, .30) !important;
}

:root[data-theme="dark"] .compare-device__image-wrap {
    background: #f8fafc !important;
    border-radius: 22px !important;
    padding: 10px !important;
    box-shadow: inset 0 0 0 1px rgba(17, 26, 54, .06) !important;
}

:root[data-theme="dark"] .compare-device h2,
:root[data-theme="dark"] .compare-section h2,
:root[data-theme="dark"] .compare-section__title,
:root[data-theme="dark"] .compare-quick-guide h2,
:root[data-theme="dark"] .compare-help h2,
:root[data-theme="dark"] .compare-hero h1 {
    color: #f8fbff !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .compare-device p,
:root[data-theme="dark"] .compare-section__cell p,
:root[data-theme="dark"] .compare-section__cell p:not(:first-child),
:root[data-theme="dark"] .compare-quick-guide p,
:root[data-theme="dark"] .compare-help p,
:root[data-theme="dark"] .compare-hero p,
:root[data-theme="dark"] .compare-device__select-label,
:root[data-theme="dark"] .compare-device__color-name {
    color: #c7d4ea !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .compare-device select,
:root[data-theme="dark"] .compare-toggle,
:root[data-theme="dark"] .compare-scroll-hint {
    background: #0b1324 !important;
    color: #ffffff !important;
    border-color: rgba(148, 163, 184, .32) !important;
}

:root[data-theme="dark"] .iphone-check-page-hero,
:root[data-theme="dark"] .iphone-check-card-map,
:root[data-theme="dark"] .iphone-check-list article,
:root[data-theme="dark"] .iphone-check-score {
    background: radial-gradient(circle at 92% 6%, rgba(59, 115, 255, .18), transparent 34%), linear-gradient(180deg, rgba(17, 24, 39, .98), rgba(8, 15, 29, .98)) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    color: #f8fbff !important;
    box-shadow: 0 14px 42px rgba(0, 0, 0, .28) !important;
}

:root[data-theme="dark"] .iphone-check-list h2,
:root[data-theme="dark"] .iphone-check-card-map h2,
:root[data-theme="dark"] .iphone-check-page-hero h1,
:root[data-theme="dark"] .iphone-check-score b {
    color: #f8fbff !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .iphone-check-list p,
:root[data-theme="dark"] .iphone-check-card-map p,
:root[data-theme="dark"] .iphone-check-page-hero p,
:root[data-theme="dark"] .iphone-check-score span {
    color: #c7d4ea !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .iphone-check-card-map__items span,
:root[data-theme="dark"] .iphone-check-list article span {
    background: rgba(59, 115, 255, .20) !important;
    color: #cfe0ff !important;
    border-color: rgba(147, 197, 253, .24) !important;
}

:root[data-theme="dark"] .product-buy-card,
:root[data-theme="dark"] .product-summary,
:root[data-theme="dark"] .product-cta,
:root[data-theme="dark"] .product-warranty,
:root[data-theme="dark"] .product-benefits,
:root[data-theme="dark"] .product-benefits article,
:root[data-theme="dark"] .product-accordion,
:root[data-theme="dark"] .accordion-item,
:root[data-theme="dark"] .product-detail [class*="character"],
:root[data-theme="dark"] .product-detail [class*="spec"] {
    background: linear-gradient(180deg, rgba(17, 24, 39, .98), rgba(8, 15, 29, .98)) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    color: #f8fbff !important;
}

:root[data-theme="dark"] .product-detail h2,
:root[data-theme="dark"] .product-detail h3,
:root[data-theme="dark"] .product-detail summary,
:root[data-theme="dark"] .product-buy-card b,
:root[data-theme="dark"] .product-summary b,
:root[data-theme="dark"] .product-benefits b {
    color: #f8fbff !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .product-detail p,
:root[data-theme="dark"] .product-detail span,
:root[data-theme="dark"] .product-detail small,
:root[data-theme="dark"] .product-benefits p {
    color: #c7d4ea !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .product-buy-box,
:root[data-theme="dark"] .product-buy-box-v2,
:root[data-theme="dark"] .product-buy-box-light,
:root[data-theme="dark"] .product-buy-box-final {
    background: linear-gradient(180deg, rgba(17, 24, 39, .98), rgba(8, 15, 29, .98)) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    color: #f8fbff !important;
    box-shadow: 0 14px 42px rgba(0, 0, 0, .30) !important;
}

:root[data-theme="dark"] .product-buy-box strong,
:root[data-theme="dark"] .product-buy-box-v2 strong,
:root[data-theme="dark"] .product-buy-box-final strong {
    color: #f8fbff !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .product-buy-box small,
:root[data-theme="dark"] .product-buy-box-v2 small,
:root[data-theme="dark"] .product-buy-box-final small,
:root[data-theme="dark"] .product-buy-box .old-price {
    color: #c7d4ea !important;
    opacity: 1 !important;
}

:root[data-theme="dark"] .product-buy-box .button-secondary,
:root[data-theme="dark"] .product-buy-box-v2 .button-secondary,
:root[data-theme="dark"] .product-buy-box-final .button-secondary {
    background: rgba(248, 251, 255, .94) !important;
    color: #0f172a !important;
    border-color: rgba(255, 255, 255, .55) !important;
}

:root[data-theme="dark"] .product-buy-box .button-secondary span,
:root[data-theme="dark"] .product-buy-box-v2 .button-secondary span,
:root[data-theme="dark"] .product-buy-box-final .button-secondary span {
    color: #0f172a !important;
}

:root[data-theme="dark"] .product-buy-box .button-buy-attention,
:root[data-theme="dark"] .product-buy-box-v2 .button-buy-attention,
:root[data-theme="dark"] .product-buy-box-final .button-buy-attention {
    background: linear-gradient(135deg, #2358f6, #5b7cff) !important;
    color: #ffffff !important;
    border-color: rgba(147, 197, 253, .34) !important;
    box-shadow: 0 14px 32px rgba(35, 88, 246, .30) !important;
}

:root[data-theme="dark"] .product-buy-box .button-buy-attention span,
:root[data-theme="dark"] .product-buy-box-v2 .button-buy-attention span,
:root[data-theme="dark"] .product-buy-box-final .button-buy-attention span {
    color: #ffffff !important;
}

:root[data-theme="dark"] .product-buy-box .button img,
:root[data-theme="dark"] .product-buy-box-v2 .button img,
:root[data-theme="dark"] .product-buy-box-final .button img {
    filter: none !important;
    opacity: 1 !important;
}

.checkout-submit-block {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.checkout-submit-button,
.checkout-telegram {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
}

:root[data-theme="dark"] .checkout-form,
:root[data-theme="dark"] .checkout-form--final,
:root[data-theme="dark"] .checkout-fieldset,
:root[data-theme="dark"] .checkout-consent,
:root[data-theme="dark"] .checkout-payment-note,
:root[data-theme="dark"] .checkout-cart-list,
:root[data-theme="dark"] .checkout-cart-item,
:root[data-theme="dark"] .checkout-summary-line {
    background: linear-gradient(180deg, rgba(17, 24, 39, .98), rgba(8, 15, 29, .98)) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    color: #f8fbff !important;
}

:root[data-theme="dark"] .checkout-form h2,
:root[data-theme="dark"] .checkout-form legend,
:root[data-theme="dark"] .checkout-form label,
:root[data-theme="dark"] .checkout-summary-line b {
    color: #f8fbff !important;
}

:root[data-theme="dark"] .checkout-form p,
:root[data-theme="dark"] .checkout-form span {
    color: #c7d4ea !important;
}

body.lightbox-open .product-sticky-buy,
body.lightbox-open .product-buy-card,
body.lightbox-open .product-purchase,
body.lightbox-open .product-summary,
body.lightbox-open .product-cta {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.product-lightbox[aria-hidden="false"],
.product-lightbox.is-open {
    z-index: 9999 !important;
    background: rgba(3, 7, 18, .82) !important;
    backdrop-filter: blur(8px) !important;
}

@media (max-width: 767px) {
    .checkout-submit-block {
        grid-template-columns: 1fr !important;
    }
}
