/* ==========================================================================
   d-rooming Wallpaper Simulator - Frontend
   All styles scoped to .drs-app to avoid theme conflicts.
   ========================================================================== */

.drs-app, .drs-app * { box-sizing: border-box; }

.drs-app {
    max-width: 1200px;
    margin: 32px auto;
    background: #fff;
    color: #2a2622;
    font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.7;
    border: 1px solid #ebe7df;
    border-radius: 4px;
    box-shadow: 0 8px 30px -20px rgba(0,0,0,0.15);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

.drs-notice {
    padding: 20px;
    background: #fef9c3;
    border: 1px solid #f59e0b;
    border-radius: 4px;
    color: #92400e;
    font-size: 14px;
    text-align: center;
    margin: 20px 0;
}

/* Header */
.drs-app-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid #ebe7df;
    background: #fff;
}
.drs-brand-product {
    font-size: 13px;
    color: #6b635a;
    letter-spacing: 0.05em;
}
.drs-app-tools { display: flex; gap: 4px; align-items: center; }
.drs-tool-btn {
    background: none;
    border: 1px solid transparent;
    color: #4a423a;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 4px;
    transition: all 0.15s;
    font-family: inherit;
}
.drs-tool-btn:hover { border-color: #d8d2c4; background: #faf8f3; }
.drs-tool-btn .drs-ic { font-size: 14px; }

/* Main */
.drs-app-main {
    display: grid;
    grid-template-columns: 1fr 440px;
}

/* Stage */
.drs-stage-wrap {
    background: #f5f4f0;
    padding: 28px;
}
.drs-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 16px 50px -25px rgba(0,0,0,0.3);
}
.drs-wall-layer {
    position: absolute;
    inset: 0;
    background-color: #ece5d8;
    background-image: var(--drs-wp-image, none);
    background-size: var(--drs-wp-size, 280px);
    background-repeat: repeat;
    transition: background-image 0.4s ease;
}
.drs-wall-shading {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(255, 240, 210, 0.4) 0%, transparent 40%),
        linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,0.18) 100%),
        linear-gradient(to right, rgba(0,0,0,0) 75%, rgba(0,0,0,0.15) 100%);
    mix-blend-mode: multiply;
    pointer-events: none;
}
.drs-overlay-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}
.drs-stage-info {
    margin-top: 12px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-size: 12px;
    color: #6b635a;
}
.drs-stage-hint {
    display: flex;
    align-items: center;
    gap: 8px;
}
.drs-stage-hint::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2a2622;
    display: inline-block;
}

/* Sidebar */
.drs-sidebar {
    background: #fff;
    border-left: 1px solid #ebe7df;
    display: flex;
    flex-direction: column;
}

.drs-sidebar-head {
    padding: 18px 22px 14px;
    border-bottom: 1px solid #ebe7df;
}
.drs-sidebar-eyebrow {
    font-size: 10px;
    color: #a89c8a;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.drs-sidebar-title {
    font-size: 16px;
    font-weight: 500;
    margin-top: 4px;
}

.drs-filters-row {
    padding: 14px 22px;
    border-bottom: 1px solid #ebe7df;
    background: #faf8f3;
    display: flex;
    gap: 8px;
}
.drs-filter-group { flex: 1; }
.drs-filter-label {
    font-size: 10px;
    color: #a89c8a;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    text-transform: uppercase;
}
.drs-filter-select {
    width: 100%;
    border: 1px solid #d8d2c4;
    background: #fff;
    padding: 6px 8px;
    font-size: 12px;
    color: #2a2622;
    font-family: inherit;
    border-radius: 3px;
    cursor: pointer;
}

.drs-result-count {
    padding: 9px 22px;
    font-size: 11px;
    color: #6b635a;
    border-bottom: 1px solid #ebe7df;
}
.drs-result-count strong {
    color: #2a2622;
    font-size: 14px;
    font-weight: 500;
    margin-right: 4px;
}

.drs-product-grid {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
    max-height: 440px;
}
.drs-product-card {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    font-family: inherit;
    transition: transform 0.15s;
}
.drs-product-card:hover { transform: translateY(-2px); }
.drs-product-thumb {
    width: 100%;
    aspect-ratio: 1;
    background-size: cover;
    background-position: center;
    border: 1px solid #ebe7df;
    border-radius: 3px;
    margin-bottom: 4px;
    transition: all 0.15s;
}
.drs-product-card.active .drs-product-thumb {
    border-color: #2a2622;
    box-shadow: 0 0 0 1px #2a2622, 0 6px 16px -8px rgba(0,0,0,0.4);
}
.drs-product-code {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #2a2622;
}
.drs-product-name {
    font-size: 10px;
    color: #6b635a;
    line-height: 1.35;
    margin-top: 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.drs-product-price {
    font-size: 10px;
    color: #2a2622;
    margin-top: 2px;
    font-weight: 500;
}

.drs-detail-card {
    border-top: 1px solid #ebe7df;
    padding: 14px 22px;
    background: #faf8f3;
}
.drs-detail-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.drs-detail-thumb {
    width: 56px;
    height: 56px;
    border: 1px solid #d8d2c4;
    background: #ebe7df;
    background-size: cover;
    background-position: center;
    border-radius: 3px;
    flex-shrink: 0;
}
.drs-detail-info { flex: 1; min-width: 0; }
.drs-detail-code {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #2a2622;
}
.drs-detail-name {
    font-size: 12px;
    margin-top: 2px;
    color: #2a2622;
}
.drs-detail-price {
    font-size: 13px;
    margin-top: 4px;
    font-weight: 500;
}
.drs-detail-price small {
    font-size: 10px;
    color: #6b635a;
    margin-left: 3px;
    font-weight: 400;
}
.drs-detail-cta {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 9px;
    background: #2a2622;
    color: #fff !important;
    border: none;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    letter-spacing: 0.08em;
    border-radius: 3px;
    text-align: center;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: background 0.15s;
}
.drs-detail-cta:hover { background: #4a423a; color: #fff; }
.drs-detail-cta[aria-disabled="true"] {
    background: #d8d2c4;
    pointer-events: none;
}
.drs-arrow { margin-left: 6px; }

/* Empty grid */
.drs-grid-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px 10px;
    color: #a89c8a;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 920px) {
    .drs-app-main { grid-template-columns: 1fr; }
    .drs-sidebar { border-left: none; border-top: 1px solid #ebe7df; }
    .drs-stage-wrap { padding: 18px; }
    .drs-product-grid {
        grid-template-columns: repeat(3, 1fr);
        max-height: 420px;
    }
}
@media (max-width: 360px) {
    .drs-product-grid { grid-template-columns: repeat(2, 1fr); }
    .drs-stage-wrap { padding: 12px; }
    .drs-tool-label { display: none; }
    .drs-app-head { padding: 12px 16px; }
    .drs-sidebar-head { padding: 14px 16px 10px; }
    .drs-filters-row, .drs-result-count, .drs-detail-card { padding-left: 16px; padding-right: 16px; }
}
