:root {
    --bg: #F2F2F7;
    --card: #FFFFFF;
    --text: #000000;
    --muted: #8E8E93;
    --blue: #007AFF;
    --border: rgba(0,0,0,0.08);
}

* {
    -webkit-tap-highlight-color: transparent;
}

@media (hover: none) and (pointer: coarse) {
    .hero-btn:hover,
    .card:hover,
    .theme_switch:hover {
        transform: none !important;
        box-shadow: inherit !important;
        opacity: 1 !important;
    }
}

[data-theme="dark"] {
    --bg: #000000;
    --card: #1C1C1E;
    --text: #FFFFFF;
    --muted: #8E8E93;
    --blue: #0A84FF;
    --border: rgba(255,255,255,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.4;
}

.theme_switch {
    position: fixed;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    padding: 8px 14px;
    border-radius: 30px;
    cursor: pointer;
    border: 1px solid var(--border);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.theme_icon {
    font-size: 14px;
}

.theme_label {
    font-size: 13px;
    font-weight: 500;
}

.switch_track {
    width: 44px;
    height: 22px;
    background: #8E8E93;
    border-radius: 20px;
    position: relative;
}

.switch_thumb {
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

[data-theme="dark"] .switch_thumb {
    transform: translateX(22px);
}

.landing {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hero {
    background: var(--card);
    border-radius: 36px;
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid var(--border);
}

.hero-image {
    width: 100%;
}

.hero-image img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
}

.hero-content {
    padding: 30px 40px 40px 40px;
}

.hero .description {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text);
}

.hero .materials-list {
    list-style: none;
    margin-bottom: 25px;
}

.hero .materials-list li {
    margin-bottom: 8px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.hero .hero-phone {
    margin-top: 20px;
}

.hero .hero-phone a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
    font-size: 18px;
}

.hero-btn {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--blue);
    color: #fff;
    text-decoration: none;
    border-radius: 16px;
    font-weight: 600;
    transition: 0.2s ease;
    box-shadow: 0 6px 18px rgba(0,122,255,0.25);
}

.hero-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,122,255,0.35);
}

.hero-btn-sub {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.9;
}

.materials-section {
    margin-bottom: 40px;
}

.section-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.2px;
}

.section-subtitle {
    margin-top: 6px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--muted);
}

.grid-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: var(--card);
    border-radius: 20px;
    padding: 16px;
    cursor: pointer;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    background-color: var(--bg);
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card h3 {
    margin: 12px 0 4px;
    font-size: 18px;
    min-height: 44px;
}

.card .price {
    margin-top: auto;
    color: var(--blue);
    font-weight: 700;
    font-size: 16px;
}

.footer {
    margin-top: 50px;
    width: 100%;
}

.footer-content {
    background: var(--card);
    border-radius: 24px;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border);
}

.footer a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}

.skeleton-card {
    background: var(--card);
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(
        90deg,
        rgba(0,0,0,0.04) 25%,
        rgba(0,0,0,0.08) 37%,
        rgba(0,0,0,0.04) 63%
    );
    background-size: 400% 100%;
    animation: shimmer 1.2s infinite;
}

[data-theme="dark"] .skeleton-img {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.05) 25%,
        rgba(255,255,255,0.1) 37%,
        rgba(255,255,255,0.05) 63%
    );
}

@keyframes shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

.skeleton-body {
    padding: 16px;
}

.skeleton-line {
    height: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    background: rgba(0,0,0,0.06);
    animation: shimmer 1.2s infinite;
}

[data-theme="dark"] .skeleton-line {
    background: rgba(255,255,255,0.08);
}

.fade-in {
    opacity: 0;
    transform: translateY(6px);
    animation: fadeIn 0.25s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .landing {
        padding: 16px;
    }

    .hero-content {
        padding: 20px 25px 30px 25px;
    }

    .hero-image img {
        height: 220px;
    }

    .grid-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .theme_switch {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
    }

    .theme_label {
        font-size: 12px;
    }
}

@media (max-width: 600px) {
    .landing {
        padding: 0;
    }

    .hero {
        margin-top: 40px;
        border-radius: 28px;
        margin-bottom: 20px;
        overflow: hidden;
    }

    .hero-image img {
        width: 100%;
        height: auto;
        max-height: 280px;
        object-fit: cover;
        object-position: center;
        display: block;
    }

    .hero-content {
        padding: 20px 16px 25px 16px;
    }

    .hero .description {
        font-size: 14px;
        margin-bottom: 15px;
    }

    .hero .materials-list li {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .hero .hero-phone a {
        font-size: 16px;
    }

    .materials-section {
        padding: 0 16px;
    }

    .grid-inner {
        gap: 12px;
    }

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

    .footer {
        margin-top: 20px;
    }

    .footer-content {
        border-radius: 20px;
        padding: 14px 16px;
    }
}

@media (max-width: 480px) {
    .grid-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .theme_label {
        display: none;
    }

    .card {
        padding: 12px;
    }

    .card h3 {
        font-size: 16px;
        min-height: 40px;
    }

    .card .price {
        font-size: 14px;
    }

    .materials-section {
        padding: 0 12px;
    }

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

html {
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: auto;
}

.page-out {
    opacity: 0;
    transform: scale(0.98) translateY(-8px);
    filter: blur(6px);
    transition: all 0.25s ease;
}

.page-in {
    animation: pageIn 0.25s ease forwards;
}