html, body.app-body { height: 100%; }

body.app-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: #ffffff;
    color: #212121;
}

.app-header {
    background: #ffffff;
    border-bottom: 3px solid #e30613;
    padding: 18px 0;
}

.app-header-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

.app-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
}

.app-brand img {
    height: 48px;
    width: auto;
    display: block;
}

@media (max-width: 640px) {
    .app-header { padding: 14px 0; }
    .app-brand img { height: 38px; }
}

.app-main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.app-main > #footer {
    margin-top: auto;
    flex-shrink: 0;
}

.app-footer {
    background: #1f2937;
    color: #d1d5db;
    border-top: 3px solid #e30613;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    font-size: 13px;
    padding: 20px 0;
}

.app-footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.app-footer-brand img {
    height: 28px;
    width: auto;
    display: block;
    filter: brightness(1.1);
}

.app-footer-copy {
    color: #9ca3af;
    flex: 1 1 auto;
    text-align: center;
    letter-spacing: 0.2px;
}

.app-footer-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.15s ease;
}

.app-footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.app-footer-sep {
    color: #6b7280;
    font-size: 10px;
}

@media (max-width: 640px) {
    .app-footer { padding: 16px 0; }
    .app-footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    .app-footer-copy { text-align: center; }
}

.product-view {
    max-width: 720px;
    margin: 0 auto;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
    color: #212121;
}

.btn-back {
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #424242;
    margin-bottom: 16px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-back:hover {
    background: #f5f5f5;
    border-color: #b0b0b0;
}

.btn-back span {
    font-size: 18px;
    line-height: 1;
    vertical-align: middle;
    margin-right: 4px;
}

.link-button {
    background: none;
    border: none;
    color: #1976d2;
    padding: 0;
    margin: 8px 0 16px 0;
    cursor: pointer;
    font-size: 15px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.link-button:hover { text-decoration: underline; }

.product-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    margin-bottom: 20px;
}

.product-card-row {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 15px;
}

.product-card-row:first-child { border-top: none; }

.product-title {
    font-size: 18px;
    font-weight: 700;
    color: #212121;
}

.product-meta {
    color: #9e9e9e;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.product-price {
    color: #2e7d32;
    font-weight: 600;
    font-size: 20px;
}

.product-download {
    color: #1976d2;
    text-decoration: underline;
    font-size: 15px;
}

.product-download:hover { color: #0d47a1; }

.product-image-box {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 24px;
    background: #fff;
    text-align: center;
    max-width: 420px;
    margin-bottom: 24px;
}

.product-image-box img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.variants-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 20px 0;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
}

.variant-thumb {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    width: 110px;
    background: #fff;
    text-align: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.variant-thumb:hover {
    border-color: #9e9e9e;
}

.variant-thumb.active {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.15);
}

.variant-thumb img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    display: block;
}

.variant-thumb .variant-code {
    font-size: 11px;
    color: #616161;
    margin-top: 6px;
    word-break: break-word;
    line-height: 1.2;
}

@media (max-width: 576px) {
    .product-view { padding: 0 8px; }
    .product-title { font-size: 16px; }
    .product-price { font-size: 18px; }
    .variant-thumb { width: calc(50% - 6px); }
}
