/**
 * Modlino Design System — Polish layer
 * Visual refinements: micro-interactions، gradients، depth، typography polish
 */

/* ═══ BACKGROUND & DEPTH ═════════════════════════════════════ */

body {
    background: #ffffff !important;
}

main#main {
    background: #ffffff;
}

/* Subtle pattern in page */
.modlino-hero {
    background:
        radial-gradient(circle at 20% 50%, rgba(225, 29, 72, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(225, 29, 72, 0.06) 0%, transparent 50%),
        linear-gradient(135deg, #fff1f2 0%, #ffffff 70%) !important;
}

/* ═══ TYPOGRAPHY POLISH ═══════════════════════════════════════ */

body {
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.015em;
}

/* Persian text needs more vertical space */
.modlino-hero h1 {
    line-height: 1.45;
    word-spacing: 0.05em;
}

/* ═══ HOMEPAGE HERO POLISH ═══════════════════════════════════ */

.mh-hero-tag {
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.15);
    backdrop-filter: blur(8px);
}

.mh-hero-blob {
    box-shadow:
        0 20px 60px rgba(225, 29, 72, 0.25),
        0 8px 24px rgba(225, 29, 72, 0.15);
    position: relative;
}
.mh-hero-blob::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), transparent 50%);
    pointer-events: none;
}

.mh-hero-stats {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}
.mh-stat-num {
    background: linear-gradient(135deg, var(--m-color-brand-600), var(--m-color-brand-700));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ═══ CATEGORY CARDS — more delight ═════════════════════════ */

.mh-cat-card {
    position: relative;
    overflow: hidden;
    transition: transform var(--m-duration-normal) var(--m-ease-spring),
                box-shadow var(--m-duration-normal) var(--m-ease-standard),
                border-color var(--m-duration-normal) var(--m-ease-standard);
}
.mh-cat-card::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(225, 29, 72, 0.06), transparent);
    transition: left var(--m-duration-slower) var(--m-ease-standard);
    pointer-events: none;
}
.mh-cat-card:hover::before { left: 100%; }
.mh-cat-card:hover {
    transform: translateY(-6px) scale(1.02);
}
.mh-cat-card:hover .mh-cat-icon {
    transform: rotate(-8deg) scale(1.1);
}
.mh-cat-icon {
    transition: transform var(--m-duration-normal) var(--m-ease-spring),
                background var(--m-duration-normal) var(--m-ease-standard),
                color var(--m-duration-normal) var(--m-ease-standard);
}

/* ═══ FEATURE ICONS POLISH ═══════════════════════════════════ */

.mh-feature {
    transition: transform var(--m-duration-normal) var(--m-ease-standard);
}
.mh-feature:hover { transform: translateY(-2px); }
.mh-feature-icon {
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.12);
    transition: transform var(--m-duration-normal) var(--m-ease-spring);
}
.mh-feature:hover .mh-feature-icon {
    transform: scale(1.08) rotate(-4deg);
}

/* ═══ BANNERS POLISH ═════════════════════════════════════════ */

.mh-banner {
    transition: transform var(--m-duration-slow) var(--m-ease-standard),
                box-shadow var(--m-duration-slow) var(--m-ease-standard);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.mh-banner:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.15);
}
.mh-banner-cta {
    transition: all var(--m-duration-normal) var(--m-ease-standard);
}
.mh-banner:hover .mh-banner-cta {
    background: rgba(255, 255, 255, 0.3);
    padding-inline: 22px;
}

/* ═══ PRODUCT CARD POLISH (loop) — minimal premium ══════════
 * Card transitions live in 05-pages.css. Polish layer kept light:
 * no badge pulse, no figure vignette, no title color change, no
 * button gradient (button hidden). Just position:relative for badge anchor.
 * ════════════════════════════════════════════════════════════ */

.woocommerce ul.products li.product,
[data-products] li.product {
    position: relative;
}

/* ═══ HEADER POLISH ══════════════════════════════════════════ */

header.ct-header {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.98);
    position: sticky;
    top: 0;
    z-index: var(--m-z-sticky);
}

.ct-header .site-title {
    transition: transform var(--m-duration-fast) var(--m-ease-spring);
}
.ct-header .site-title:hover {
    transform: scale(1.04);
}

.modlino-icons a {
    transition: background var(--m-duration-fast) var(--m-ease-standard),
                color var(--m-duration-fast) var(--m-ease-standard),
                transform var(--m-duration-fast) var(--m-ease-spring);
}
.modlino-icons a:hover {
    transform: translateY(-2px);
}

/* ═══ SINGLE PRODUCT POLISH ══════════════════════════════════ */

body.single-product .product-entry-wrapper {
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.06);
}

body.single-product .single_add_to_cart_button {
    position: relative;
    overflow: hidden;
}
body.single-product .single_add_to_cart_button::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left var(--m-duration-slower) var(--m-ease-standard);
}
body.single-product .single_add_to_cart_button:hover::before { left: 100%; }

/* Gallery image hover */
body.single-product .ct-product-gallery-container .flexy-container {
    transition: box-shadow var(--m-duration-normal) var(--m-ease-standard);
}
body.single-product .ct-product-gallery-container .flexy-container:hover {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

/* Swatches polish */
.modlino-swatch {
    transition: transform var(--m-duration-fast) var(--m-ease-spring),
                border-color var(--m-duration-fast) var(--m-ease-standard),
                box-shadow var(--m-duration-fast) var(--m-ease-standard);
}
.modlino-swatch:hover {
    transform: scale(1.12);
}
.modlino-swatch.active {
    transform: scale(1.05);
}

/* Brand link polish */
.modlino-brand-link {
    box-shadow: 0 2px 6px rgba(225, 29, 72, 0.1);
    position: relative;
    overflow: hidden;
}
.modlino-brand-link::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--m-color-brand-500), var(--m-color-brand-700));
    opacity: 0;
    transition: opacity var(--m-duration-fast) var(--m-ease-standard);
}
.modlino-brand-link:hover::before { opacity: 1; }
.modlino-brand-link > * { position: relative; z-index: 1; }

/* ═══ TABS POLISH ════════════════════════════════════════════ */

body.single-product .woocommerce-tabs ul.tabs li a {
    position: relative;
}
body.single-product .woocommerce-tabs ul.tabs li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--m-primary);
    transform: translateX(-50%);
    transition: width var(--m-duration-normal) var(--m-ease-standard);
}
body.single-product .woocommerce-tabs ul.tabs li:hover a::after {
    width: 60%;
}
body.single-product .woocommerce-tabs ul.tabs li.active a::after {
    width: 100%;
}

/* ═══ FOOTER POLISH ══════════════════════════════════════════ */

.modlino-footer {
    background: linear-gradient(180deg, #fafafa 0%, #f3f4f6 100%);
}

.modlino-footer-col a {
    transition: color var(--m-duration-fast) var(--m-ease-standard),
                transform var(--m-duration-fast) var(--m-ease-standard);
}
.modlino-footer-col a:hover {
    transform: translateX(-2px);
}

/* ═══ BUTTON SHEEN ════════════════════════════════════════════ */

.m-btn--primary, .single_add_to_cart_button {
    position: relative;
    overflow: hidden;
}

/* ═══ SCROLL CUSTOMIZATION ═══════════════════════════════════ */

html { scroll-behavior: smooth; }

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--m-bg-subtle);
}
::-webkit-scrollbar-thumb {
    background: var(--m-color-neutral-300);
    border-radius: var(--m-radius-full);
    border: 2px solid var(--m-bg-subtle);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--m-color-neutral-400);
}

/* ═══ FOCUS POLISH ═══════════════════════════════════════════ */

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--m-primary);
    outline-offset: 2px;
}

/* ═══ FADE-IN ON LOAD ════════════════════════════════════════ */

@keyframes m-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mh-hero-text,
.mh-hero-image,
.mh-section-block .container,
.mh-cats-grid > *,
.mh-banner,
.modlino-brand-card {
    animation: m-fade-in var(--m-duration-slower) var(--m-ease-decelerate) both;
}
.mh-cats-grid > *:nth-child(1)  { animation-delay: 0.05s; }
.mh-cats-grid > *:nth-child(2)  { animation-delay: 0.1s; }
.mh-cats-grid > *:nth-child(3)  { animation-delay: 0.15s; }
.mh-cats-grid > *:nth-child(4)  { animation-delay: 0.2s; }
.mh-cats-grid > *:nth-child(5)  { animation-delay: 0.25s; }
.mh-cats-grid > *:nth-child(6)  { animation-delay: 0.3s; }
.mh-cats-grid > *:nth-child(7)  { animation-delay: 0.35s; }
.mh-cats-grid > *:nth-child(8)  { animation-delay: 0.4s; }
.mh-cats-grid > *:nth-child(9)  { animation-delay: 0.45s; }
.mh-cats-grid > *:nth-child(10) { animation-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═══ MOBILE STICKY CART BAR — better on mobile ══════════════ */

@media (max-width: 768px) {
    .modlino-sticky-cart {
        border-radius: 16px 16px 0 0;
    }
}

/* ═══ TEMP: hide header search icon — toggle is broken (navigates to /?s= instead of opening modal) ══ */
.ct-header-search.ct-toggle,
[data-toggle-panel="#search-modal"] {
    display: none !important;
}
