/**
 * SST Car Addons — Widget Styles
 *
 * Production-ready CSS matching the Autocom Japan reference layout.
 * All selectors prefixed with .sst- to avoid conflicts.
 *
 * @package SST_Car_Addons
 * @since   1.0.0
 */

/* ═══════════════════════════════════════════
   1. VEHICLE GALLERY
   ═══════════════════════════════════════════ */

.sst-vehicle-gallery {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
}

.sst-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #1a1a1a;
    overflow: hidden;
}

.sst-gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    cursor: crosshair;
    transition: opacity 0.25s ease;
}

.sst-gallery-watermark {
    position: absolute;
    bottom: 12px;
    left: 12px;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
    pointer-events: none;
}

/* Thumbnails grid */
.sst-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(var(--sst-thumb-cols, 8), 1fr);
    padding: 6px;
    background: #f0f0f0;
}

.sst-gallery-thumb {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 2px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    transition: border-color 0.2s, opacity 0.2s;
}

.sst-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sst-gallery-thumb:hover {
    opacity: 0.8;
}

.sst-gallery-thumb.active {
    border-color: #e63946;
}

/* Action buttons */
.sst-gallery-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.sst-gallery-fullsize {
    display: block;
    text-align: center;
    padding: 8px;
    border: 1px solid #999;
    border-radius: 3px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.sst-gallery-fullsize:hover {
    background: #f5f5f5;
}

.sst-gallery-download {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: opacity 0.2s;
}

.sst-gallery-download:hover {
    opacity: 0.9;
}


/* ═══════════════════════════════════════════
   2. VEHICLE TITLE + BREADCRUMB
   ═══════════════════════════════════════════ */

.sst-breadcrumb {
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.6;
}

.sst-breadcrumb a {
    text-decoration: underline;
    transition: opacity 0.2s;
}

.sst-breadcrumb a:hover {
    opacity: 0.7;
}

.sst-sep {
    margin: 0 3px;
}

.sst-bread-current {
    color: #666;
    font-weight: 600;
}

.sst-vehicle-title {
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin: 0 0 4px;
}


/* ═══════════════════════════════════════════
   3. STOCK STATUS
   ═══════════════════════════════════════════ */

.sst-stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sst-status-prefix {
    font-weight: 400;
    color: #666;
}


/* ═══════════════════════════════════════════
   4. REF ID
   ═══════════════════════════════════════════ */

.sst-ref-id {
    line-height: 1.5;
}

.sst-ref-prefix {
    font-weight: 400;
}

.sst-ref-value {
    font-weight: 700;
}


/* ═══════════════════════════════════════════
   5. VEHICLE PRICE
   ═══════════════════════════════════════════ */

.sst-vehicle-price-widget {
    padding: 0;
}

.sst-price-heading {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #1a1a1a;
}

.sst-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
}

.sst-price-labels {
    flex: 1;
}

.sst-price-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 3px 0;
}

.sst-price-label {
    font-size: 13px;
    color: #555;
    font-weight: 600;
}

.sst-price-original {
    font-size: 14px;
    text-decoration: line-through;
}

.sst-price-fob {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.sst-price-inquire {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.sst-price-inquire:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.sst-price-discount-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 10px;
    background: #e63946;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 3px;
}


/* ═══════════════════════════════════════════
   6. VEHICLE INFORMATION TABLE
   ═══════════════════════════════════════════ */

.sst-info-heading {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 0;
    padding: 8px 0;
    border-bottom: 2px solid #1a1a1a;
}

.sst-info-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.sst-info-row {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
}

.sst-info-cell {
    padding: 7px 10px;
    font-size: 13px;
    line-height: 1.4;
}

.sst-info-label {
    flex: 0 0 42%;
    font-weight: 600;
}

.sst-info-value {
    flex: 1;
}

.sst-info-col-left {
    border-right: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
    .sst-info-two-col {
        grid-template-columns: 1fr;
    }
    .sst-info-col-left {
        border-right: none;
    }
}


/* ═══════════════════════════════════════════
   7. VEHICLE FEATURES
   ═══════════════════════════════════════════ */

.sst-features-heading {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #1a1a1a;
}

.sst-features-grid {
    display: grid;
    grid-template-columns: repeat(var(--sst-feat-cols, 5), 1fr);
}

.sst-feat-item {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    transition: background 0.15s;
}

.sst-feat-item.active {
    font-weight: 700;
}

.sst-feat-item.inactive {
    font-style: normal;
}

@media (max-width: 768px) {
    .sst-features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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


/* ═══════════════════════════════════════════
   8. QUOTE / INQUIRY FORM
   ═══════════════════════════════════════════ */

.sst-quote-form-wrap {
    border: 3px solid #00a099;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.sst-quote-step {
    padding: 20px;
}

.sst-quote-step1 {
    border-bottom: 2px solid #e0e0e0;
}

.sst-step-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    color: #1a1a1a;
}

.sst-step-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.sst-quote-country-select {
    margin-bottom: 16px;
}

.sst-quote-input {
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.sst-quote-input:focus {
    outline: none;
    border-color: #00a099;
    box-shadow: 0 0 0 2px rgba(0,160,153,0.1);
}

.sst-quote-textarea {
    height: auto;
    padding: 10px;
    resize: vertical;
}

/* Car summary card */
.sst-quote-car-card {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 4px;
}

.sst-quote-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.sst-quote-car-info {
    flex: 1;
    min-width: 0;
}

.sst-promo-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #00a099;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 2px;
    margin-right: 6px;
}

.sst-discount-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #e63946;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 2px;
}

.sst-quote-car-title {
    font-size: 14px;
    font-weight: 700;
    margin: 6px 0 2px;
    line-height: 1.3;
}

.sst-quote-ref {
    font-size: 12px;
    color: #666;
}

.sst-quote-price-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 4px;
}

.sst-quote-label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.sst-quote-original {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}

.sst-quote-fob {
    font-size: 22px;
    font-weight: 900;
}

/* Form fields */
.sst-quote-required-note {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
}

.sst-req {
    color: #e63946;
    margin-left: 2px;
}

.sst-qf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.sst-qf-full {
    grid-template-columns: 1fr;
}

.sst-qf-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.sst-phone-field {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sst-phone-icon {
    flex-shrink: 0;
    font-size: 16px;
}

.sst-phone-field .sst-quote-input {
    flex: 1;
}

.sst-phone-note {
    font-size: 11px;
    color: #999;
    margin: 6px 0 14px;
    line-height: 1.6;
}

.sst-quote-submit {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    font-family: inherit;
}

.sst-quote-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.sst-quote-notes {
    margin-top: 16px;
    padding: 14px;
    background: #f8f8f8;
    border-radius: 3px;
    font-size: 12px;
    color: #555;
    line-height: 1.8;
}

.sst-quote-response {
    margin-top: 12px;
}

.sst-quote-success {
    padding: 14px;
    background: #e8f8ef;
    color: #2ecc71;
    border-radius: 4px;
    font-weight: 700;
    text-align: center;
}

.sst-quote-error {
    padding: 14px;
    background: #ffeef0;
    color: #e63946;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 600px) {
    .sst-qf-row {
        grid-template-columns: 1fr;
    }
    .sst-quote-car-card {
        flex-direction: column;
    }
}


/* ═══════════════════════════════════════════
   9. INSPECTION SHEET
   ═══════════════════════════════════════════ */

.sst-inspection-sheet {
    border: 3px solid #8b0000;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.sst-insp-heading {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
    padding: 10px 14px;
    border-bottom: 1px solid #ddd;
}

.sst-insp-image-wrap {
    position: relative;
}

.sst-insp-link {
    display: block;
}

.sst-insp-img {
    width: 100%;
    height: auto;
    display: block;
}

.sst-insp-zoom-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}

.sst-insp-image-wrap:hover .sst-insp-zoom-hint {
    opacity: 1;
}

.sst-insp-placeholder {
    padding: 40px;
    text-align: center;
    color: #999;
    background: #f9f9f9;
}

.sst-insp-result {
    padding: 12px 14px;
    text-align: center;
    border-top: 1px solid #ddd;
}

.sst-insp-result-badge {
    display: inline-block;
    padding: 6px 28px;
    border-radius: 20px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}


/* ═══════════════════════════════════════════
   10. RELATED VEHICLES
   ═══════════════════════════════════════════ */

.sst-related-vehicles {
    padding: 24px 0;
}

.sst-rel-heading {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a1a1a;
}

.sst-rel-grid {
    display: grid;
    grid-template-columns: repeat(var(--sst-rel-count, 5), 1fr);
    gap: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 4px;
}

.sst-rel-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
    min-width: 180px;
}

.sst-rel-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.sst-rel-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #f0f0f0;
    overflow: hidden;
}

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

.sst-rel-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 32px;
    color: #ccc;
}

.sst-rel-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 8px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 2px;
}

.sst-rel-card-body {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sst-rel-title {
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
}

.sst-rel-price {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 4px;
}

.sst-rel-meta {
    font-size: 11px;
    color: #999;
    margin-top: auto;
}

/* CTA button */
.sst-rel-cta-wrap {
    text-align: center;
    margin-top: 20px;
}

.sst-rel-cta {
    display: inline-block;
    padding: 12px 36px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: opacity 0.2s, transform 0.15s;
}

.sst-rel-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

@media (max-width: 1024px) {
    .sst-rel-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .sst-rel-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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


/* ═══════════════════════════════════════════
   GLOBAL UTILITIES
   ═══════════════════════════════════════════ */

.sst-gallery-empty {
    animation: sst-fadein 0.3s ease;
}

@keyframes sst-fadein {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ═══════════════════════════════════════════
   12. CAR SHOWCASE GRID
   ═══════════════════════════════════════════ */

.sst-showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.sst-sc-card {
    border: 1px solid #e8e8e8;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sst-sc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.sst-sc-card.sst-sc-sold {
    opacity: 0.7;
}

.sst-sc-card.sst-sc-sold:hover {
    opacity: 0.85;
}

/* Image */
.sst-sc-image-link {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 11;
    background: #f0f0f0;
}

.sst-sc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.sst-sc-card:hover .sst-sc-img {
    transform: scale(1.04);
}

.sst-sc-no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 40px;
    color: #ccc;
}

.sst-sc-sold-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #e63946;
    color: #fff;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Meta line */
.sst-sc-meta {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.5;
    border-bottom: 1px solid #f0f0f0;
}

.sst-sc-meta strong {
    font-weight: 800;
}

/* Title */
.sst-sc-title {
    padding: 10px 12px 4px;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    flex: 1;
}

.sst-sc-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.sst-sc-title a:hover {
    color: #e63946;
}

/* Price */
.sst-sc-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 2px 12px 10px;
}

.sst-sc-price {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.sst-sc-fob-tag {
    font-size: 12px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 2px;
    text-transform: uppercase;
}

/* Button */
.sst-sc-btn {
    display: block;
    text-align: center;
    padding: 10px 12px;
    margin: 0 12px 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    transition: background-color 0.2s, transform 0.15s;
    border: none;
    cursor: pointer;
}

.sst-sc-btn:hover {
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 1024px) {
    .sst-showcase-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sst-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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