* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
    background: #f4f4f4;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 0;
}

a,
a:visited,
a:hover,
a:active {
    color: inherit;
    text-decoration: none;
}

.site-banner img {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
}

.wrap {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 240px;
    gap: 20px;
    align-items: start;
}

.sidebar,
.main-content {
    min-width: 0;
}

.sidebar-box,
.card,
.empty-note,
.product-layout {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(0,0,0,.07);
}

.sidebar-box {
    padding: 18px;
    margin-bottom: 20px;
}

.sidebar-box h3 {
    margin: 0 0 14px;
    font-size: 18px;
}

.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-links li + li {
    margin-top: 10px;
}

.sidebar-links a {
    display: block;
    padding: 10px 14px;
    background: #111;
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
}

.sidebar-links a:hover,
.card-btn:hover,
.deal-btn:hover {
    background: #333;
    color: #fff;
}

.video-embed {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.video-embed iframe {
    display: block;
    width: 100%;
    height: 215px;
    border: 0;
    border-radius: 8px;
}

.ad-placeholder {
    padding: 20px;
    text-align: center;
    background: #f8f8f8;
    border: 1px dashed #bbb;
    border-radius: 8px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 22px;
    align-items: stretch;
}

.card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform .18s ease, box-shadow .18s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0,0,0,.10);
}

.card-image {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(180deg, #fbfbfb 0%, #f3f3f3 100%);
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}

.product-badge {
    top: 16px;
    left: 16px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: transparent;
    transition: transform .2s ease;
}

.card:hover .card-image img {
    transform: scale(1.03);
}

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

.card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.42;
    margin: 0 0 10px;
    min-height: 46px;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta,
.product-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
    color: #666;
    margin: 0 0 10px;
}

.card-rating {
    color: #a16207;
    font-weight: 700;
}

.card-pricing,
.product-pricing {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 10px;
}

.card-price,
.product-price {
    font-size: 28px;
    font-weight: 800;
    color: #b91c1c;
    line-height: 1.1;
}

.card-old-price,
.product-old-price {
    font-size: 14px;
    color: #777;
    text-decoration: line-through;
}

.card-description {
    font-size: 14px;
    line-height: 1.55;
    color: #555;
    margin: 0 0 16px;
    min-height: 66px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-actions {
    margin-top: auto;
}

.card-btn,
.deal-btn {
    display: inline-block;
    padding: 13px 18px;
    background: #111;
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
}

.card-btn {
    width: 100%;
    text-align: center;
}

.card-trust {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
}

.empty-note {
    padding: 30px;
}

.product-layout {
    display: grid;
    grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
    gap: 34px;
    padding: 28px;
    align-items: start;
}

.product-media {
    min-width: 0;
}

.product-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: linear-gradient(180deg, #fbfbfb 0%, #f3f3f3 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: transparent;
}

.product-summary {
    min-width: 0;
}

.product-summary h1 {
    margin: 0 0 16px;
    font-size: 32px;
    line-height: 1.26;
    word-break: break-word;
}

.product-description {
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 24px;
    color: #333;
}

.subtle-disclosure {
    font-size: 12px;
    line-height: 1.55;
    color: #6b7280;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 16px;
    max-width: 420px;
}

.product-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.back-link {
    font-weight: 700;
}

.back-link:hover,
.site-footer a:hover {
    text-decoration: underline;
}

.site-footer {
    margin-top: 30px;
    background: #111;
    color: #fff;
    padding: 20px 15px;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.site-footer a {
    color: #fff;
}

@media (max-width: 992px) {
    .wrap {
        grid-template-columns: 1fr;
    }

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

    .product-image {
        max-width: 560px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .card-title {
        font-size: 14px;
        min-height: auto;
    }

    .card-description {
        min-height: auto;
        -webkit-line-clamp: 4;
    }

    .product-summary h1 {
        font-size: 24px;
    }

    .card-price,
    .product-price {
        font-size: 24px;
    }
}

@media (max-width: 420px) {
    .grid {
        grid-template-columns: 1fr;
    }
}
