/* ── Tapatio Auto Listings — Frontend ── */

.tal-page,
.tal-page * {
    font-family: 'Titillium Web', sans-serif !important;
}

.tal-page {
    background: #fff;
    padding: 28px 0 56px;
}

.tal-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* Stock label */
.tal-stock-row {
    font-size: 16px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 18px;
}

.tal-stock-row strong {
    color: #222;
    font-weight: 600;
}

/* Two-column layout */
.tal-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
}

/* ── Gallery ── */
.tal-main-wrap {
    position: relative;
    background: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    max-height: 480px;
}

#tal-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.18s ease;
}

.tal-no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #aaa;
    font-size: 14px;
}

/* Arrow buttons */
.tal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    width: 38px;
    height: 38px;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    padding: 0;
}

.tal-arrow:hover   { background: rgba(0, 0, 0, 0.65); }
.tal-prev          { left: 10px; }
.tal-next          { right: 10px; }

/* Thumbnails */
.tal-thumbs {
    display: flex;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.tal-thumb {
    flex: 0 0 calc(25% - 6px);
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.68;
    transition: opacity 0.15s, border-color 0.15s;
}

.tal-thumb:hover,
.tal-thumb.active {
    opacity: 1;
    border-color: #e5892a;
}

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

/* Description */
.tal-description {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tal-description h2 {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px;
}

.tal-description p {
    font-size: 14px;
    line-height: 1.75;
    color: #444;
    margin: 0;
}

/* ── Inquiry Form ── */
.tal-inquiry-box {
    border: 1px solid #e4e4e4;
    border-radius: 6px;
    padding: 24px 22px;
    background: #fff;
}

.tal-inquiry-title {
    font-size: 20px;
    font-weight: 600;
    color: #e5892a;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.tal-form-row {
    margin-bottom: 10px;
}

.tal-inquiry-box input[type="text"],
.tal-inquiry-box input[type="tel"],
.tal-inquiry-box input[type="email"],
.tal-inquiry-box textarea {
    width: 100%;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 16px;
    font-family: inherit;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
}

.tal-inquiry-box input:focus,
.tal-inquiry-box textarea:focus {
    outline: none;
    border-color: #e5892a;
    box-shadow: 0 0 0 3px rgba(229, 137, 42, 0.12);
}

.tal-inquiry-box textarea {
    resize: vertical;
    min-height: 110px;
}

#tal-submit-btn {
    width: 100%;
    background: #e5892a;
    color: #fff;
    border: none;
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.15s;
}

#tal-submit-btn:hover   { background: #cf7820; }
#tal-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.tal-form-msg {
    margin: 10px 0 0;
    font-size: 13px;
    text-align: center;
    min-height: 18px;
}

.tal-form-msg.tal-success { color: #2a7a2a; }
.tal-form-msg.tal-error   { color: #c0392b; }

/* ── Responsive ── */
@media ( max-width: 820px ) {
    .tal-layout {
        grid-template-columns: 1fr;
    }
}

@media ( max-width: 480px ) {
    .tal-thumb {
        flex: 0 0 calc(33.333% - 6px);
    }
}
