/* ===== TWC Amazon Safety Products v1.0 ===== */
/* ธีม: Navy Dark + Orange — ตาม twcindustrial.com  */

/* ---- Inline text link (กลางบทความ) ---- */
.twc-inline-block {
    margin: 24px 0;
    padding: 14px 18px;
    background: #0f1923;
    border-left: 4px solid #f5a623;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #c8cdd3;
}

.twc-inline-label {
    font-weight: 700;
    color: #f5a623;
    margin-right: 6px;
}

.twc-inline-link {
    color: #7ec8e3 !important;
    text-decoration: none !important;
    transition: color 0.15s;
}

.twc-inline-link:hover {
    color: #f5a623 !important;
    text-decoration: underline !important;
}

.twc-inline-note {
    color: #666;
    font-size: 0.78rem;
    margin-left: 4px;
}

/* ---- Card grid (ท้ายบทความ) ---- */
.twc-amazon-wrapper {
    margin: 48px 0 24px;
    padding: 28px 24px 18px;
    background: #0f1923;
    border-top: 3px solid #f5a623;
    border-radius: 10px;
    font-family: inherit;
}

.twc-amazon-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #f5a623;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.twc-heading-icon {
    font-size: 1.1rem;
}

.twc-heading-sub {
    font-weight: 400;
    color: #7a8590;
    font-size: 0.88rem;
}

/* Grid: 4 col desktop → 2 col tablet → 2 col mobile */
.twc-amazon-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 860px) {
    .twc-amazon-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .twc-amazon-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Card */
.twc-amazon-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    color: inherit !important;
    background: #1a2535;
    border: 1px solid #2a3a4d;
    border-radius: 8px;
    padding: 14px 12px 14px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.twc-amazon-card:hover {
    border-color: #f5a623;
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(245,166,35,0.15);
    text-decoration: none !important;
}

/* Badge */
.twc-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #f5a623;
    color: #0f1923;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 3px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    z-index: 2;
}

/* Image */
.twc-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 12px;
    background: #111e2b;
}

.twc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.twc-amazon-card:hover .twc-img-wrap img {
    transform: scale(1.04);
}

/* Title */
.twc-title {
    font-size: 0.76rem;
    line-height: 1.45;
    color: #c8cdd3;
    margin-bottom: 12px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Button */
.twc-btn {
    display: inline-block;
    background: #f5a623;
    color: #0f1923 !important;
    font-size: 0.73rem;
    font-weight: 800;
    padding: 7px 14px;
    border-radius: 4px;
    text-decoration: none !important;
    white-space: nowrap;
    margin-top: auto;
    letter-spacing: 0.02em;
    transition: background 0.2s;
}

.twc-amazon-card:hover .twc-btn {
    background: #ffb83d;
}

/* Disclaimer */
.twc-disclaimer {
    font-size: 0.70rem;
    color: #4a5568;
    margin: 18px 0 0;
    text-align: right;
    line-height: 1.5;
}

/* ---- Compact mode สำหรับ Page (พอดีกรอบ content) ---- */
.twc-compact {
    margin: 24px 0 16px;
    padding: 20px 18px 14px;
    border-radius: 8px;
}

/* card เล็กลง รูปสั้นลง */
.twc-compact .twc-img-wrap {
    aspect-ratio: 4 / 3;
}

/* font เล็กลงนิด */
.twc-compact .twc-title {
    font-size: 0.72rem;
    -webkit-line-clamp: 2;
}

.twc-compact .twc-btn {
    font-size: 0.68rem;
    padding: 5px 10px;
}

.twc-compact .twc-amazon-heading {
    font-size: 0.88rem;
    margin-bottom: 14px;
}

.twc-compact .twc-badge {
    font-size: 0.58rem;
    padding: 2px 6px;
}

.twc-compact .twc-amazon-grid {
    gap: 10px;
}

.twc-compact .twc-disclaimer {
    font-size: 0.65rem;
    margin-top: 12px;
}
