/* ── Cadastro de Marcas — Front-end ────────────────────────────────── */

/* Reset shared */
.cdm-carrossel-wrapper *,
.cdm-grid * {
    box-sizing: border-box;
}

/* ── Item ──────────────────────────────────────────────────────────── */
.cdm-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e8e8e8;
    transition: box-shadow .25s, transform .25s;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

a.cdm-item:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.10);
    transform: translateY(-2px);
    text-decoration: none;
}

.cdm-item picture,
.cdm-item picture img {
    display: block;
    width: 100%;
    max-width: 160px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto;
}

.cdm-nome {
    font-size: .78rem;
    color: var(--txt) /*#888*/;
    text-align: center;
    line-height: 1.3;
}

/* ── Grid ──────────────────────────────────────────────────────────── */
.cdm-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.cdm-grid-item {
    min-width: 0;
}

@media (max-width: 900px) {
    .cdm-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .cdm-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 360px) {
    .cdm-grid { grid-template-columns: 1fr; }
}

/* ── Carrossel ─────────────────────────────────────────────────────── */
.cdm-carrossel-root {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.cdm-carrossel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 48px;
    user-select: none;
}

.cdm-track-outer {
    overflow: hidden;
    width: 100%;
}

.cdm-track {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    gap: 16px;
    transition: transform .45s cubic-bezier(.4,0,.2,1);
    will-change: transform;
}

.cdm-slide {
    flex: 0 0 calc(25% - 12px);   /* 4 por linha, descontando gap */
    min-width: 0;
}

/* Botões prev / next */
.cdm-prev,
.cdm-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /*box-shadow: 0 2px 8px rgba(0,0,0,.10);*/
    transition: 400ms;
    z-index: 2;
    fill: var(--txt);
    padding: 0;
}
.cdm-prev { left: 0; }
.cdm-next { right: 0; }
.cdm-prev:hover,
.cdm-next:hover {
	fill: var(--c2);
	border: 1px solid var(--c2);
    /*background: #f0f6fc;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);*/
}
.cdm-prev:disabled,
.cdm-next:disabled {
    opacity: .3;
    cursor: not-allowed;
}

/* Dots */
.cdm-dots {
    display: flex;
    justify-content: center;
    gap: 0px;
}
.cdm-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
/* Círculo visual menor via pseudo-elemento */
.cdm-dot::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ddd;
    transition: background .2s, transform .2s;
}
.cdm-dot.ativo::before {
    background: var(--c2) /*#2271b1*/;
    transform: scale(1.3);
}
.cdm-dot:hover::before { background: #aaa; }

/* Responsivo carrossel */
@media (max-width: 900px) {
    .cdm-slide { flex: 0 0 calc(33.333% - 11px); }
}
@media (max-width: 600px) {
    .cdm-slide { flex: 0 0 calc(50% - 8px); }
    .cdm-carrossel-wrapper { padding: 0 36px; }
    .cdm-prev, .cdm-next { width: 32px; height: 32px; font-size: 1.2rem; }
}
@media (max-width: 380px) {
    .cdm-slide { flex: 0 0 calc(100% - 0px); }
}
