/* carousel layout and cards */
.gallery-section {
    max-width: 1000px;
    margin: 0 auto;
}

.carousel-flex-layout {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* CAROUSEL ENGINE */
.custom-scroll-container {
    display: flex !important;
    overflow: hidden;
    scroll-behavior: smooth;
    width: 100%;
    padding: 20px 0;
}

.no-smooth {
    scroll-behavior: auto !important;
}

.custom-item {
    flex: 0 0 100%;
    min-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

@media(min-width: 768px) {
    .custom-item {
        flex: 0 0 33.333%;
        min-width: 33.333%;
    }
}

/* Profile card & comments */
.profile-card-custom {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: #0A100D !important;
    border-radius: 18px;
    color: #D6D5C9 !important;
    padding: 1rem;
    border: var(--border) !important;
}

.card.profile-card-custom,
.card.card-comments {
    border: var(--border) !important;
}

.card-comments {
    background: #0A100D !important;
    color: #D6D5C9 !important;
    border-radius: 18px;
    padding: 1rem;
    box-shadow: none !important;
    border: var(--border) !important;
}

.comments-section > a,
.comments-section a {
    text-decoration: none !important;
    color: inherit !important;
}
.comments-section > a:hover,
.comments-section a:hover {
    text-decoration: none !important;
}

.comments-section > a {
    display: block;
    border-radius: 15px;
}

.comment-item:hover,
.comment-item:focus-within {
    background: #902923;
}

.comments-section {
    background: #0A100D !important;
    border-radius: 18px;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 5px;
    color: #D6D5C9 !important;
}

.comment-item {
    display: flex;
    position: relative;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    margin-bottom: 15px;
    background: #0A100D;
    border-radius: 15px;
    border: 1px solid #902923;
    transition: all 0.3s ease;
}

.comment-body {
    flex-grow: 1;
}

.comment-author {
    font-weight: 700;
    font-size: 0.9rem;
    color: #D6D5C9;
    margin-bottom: 2px;
    display: block;
}

.comments-section .text-muted,
.comments-section small.text-muted,
.comment-item .small.text-muted {
    color: #D6D5C9 !important;
}

.comment-text {
    font-size: 0.88rem;
    color: #D6D5C9;
    margin: 0;
    line-height: 1.4;
}

.comments-section::-webkit-scrollbar {
    width: 6px;
}
.comments-section::-webkit-scrollbar-thumb {
    background: rgba(214,213,201,0.18);
    border-radius: 10px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    object-fit: contain;
    background-color: #d6ddda;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid rgba(214,213,201,0.04);
    padding: 4px;
}

.delete-comment-btn {
  position:absolute; right:10px; top:10px; width:28px; height:28px; border-radius:50%; padding:0; display:inline-flex; align-items:center; justify-content:center;
  font-size:12px; background:#fff; border:1px solid rgba(144,34,35,0.12); color:#902923; box-shadow:0 2px 6px rgba(0,0,0,0.08); z-index:20; cursor:pointer; line-height:1;
}
.delete-comment-btn:hover { transform:scale(1.05); box-shadow:0 4px 10px rgba(0,0,0,0.12); }

/* Gallery cards appearance */
.card-gallery {
    background: #0A100D;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.25s ease;
    transform-origin: center center;
}

.most-rated-section .card-gallery,
.cars-in-garage-section .card-gallery {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.most-rated-section .card-gallery:hover,
.cars-in-garage-section .card-gallery:hover {
    transform: scale(1.04);
}

.img-container-rel {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
}

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

.texto-traslucido {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    backdrop-filter: blur(8px);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.img-mini-overlay {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.texto-detalle {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

/* Navigation buttons (carousel controls) */
.nav-btn {
    background: #222;
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.nav-btn:hover {
    background: #000;
    transform: scale(1.1);
}
.arrow {
    border: solid white;
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: 4px;
}
.right { transform: rotate(-45deg); }
.left { transform: rotate(135deg); }

/* Modal & form buttons */
.modal-dialog { max-width: 600px; }
.modal-content {
    background: #0A100D !important;
    color: #D6D5C9 !important;
    border: var(--border) !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4) !important;
}
.modal-header,
.modal-body,
.modal-footer { background: transparent !important; border: none !important; color: #D6D5C9 !important; }
.modal-header .modal-title { color: #D6D5C9 !important; font-weight: 700; }
.modal .btn-close { filter: invert(1) brightness(0.9) !important; opacity: 0.9; }
.modal .form-control.bg-light { background: rgba(255,255,255,0.06) !important; color: #D6D5C9 !important; border-radius: 12px !important; border: 1px solid rgba(255,255,255,0.06) !important; }
.modal .form-control::placeholder { color: rgba(214,213,201,0.6) !important; }

#edit-profile-btn { background: #D6D5C9 !important; color: #902923 !important; border: 1px solid #902923 !important; font-weight: 700; box-shadow: none !important; border-radius: var(--bs-border-radius) !important; }
#edit-profile-btn:hover, #edit-profile-btn:focus { background: #d2d1cc !important; color: #902923 !important; transform: translateY(-1px); }

#submit-form-btn { background: #D6D5C9 !important; color: #902923 !important; border: 1px solid #902923 !important; font-weight: 700; box-shadow: none !important; border-radius: var(--bs-border-radius) !important; }
#submit-form-btn:hover, #submit-form-btn:focus { background: #d2d1cc !important; color: #902923 !important; transform: translateY(-1px); }

.modal .btn, .modal .btn.btn-primary, .modal .btn.btn-secondary {
    padding: 0.5rem 1rem !important;
    height: 42px !important;
    min-width: 140px;
    font-size: 0.95rem !important;
    border-radius: 18px !important;
    box-shadow: none !important;
}

.delete-account-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--bs-border-radius);
    background: #902923 !important;
    color: #D6D5C9 !important;
    border: 1px solid #D6D5C9 !important;
    font-weight: 700;
    text-decoration: none;
    margin: 0.5rem auto 0;
    box-shadow: none !important;
    transition: all 0.15s ease;
}
.delete-account-link:hover, .delete-account-link:focus { background: #7a2220 !important; color: #fff2ec !important; transform: translateY(-1px); }
.delete-account-link:active { transform: translateY(0) !important; }

.delete-account-link2 {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--bs-border-radius);
    background: #D6D5C9 !important;
    color: #902923 !important;
    border: 1px solid #902923!important;
    font-weight: 700;
    text-decoration: none;
    margin: 0.5rem auto 0;
    box-shadow: none !important;
    transition: all 0.15s ease;
}
.delete-account-link2:hover, .delete-account-link:focus { background: #fff2ec  !important; color: #7a2220 !important; transform: translateY(-1px); }
.delete-account-link2:active { transform: translateY(0) !important; }


/* Rating stars */
.rating-static { display: flex; justify-content: center; gap: 0.2rem; margin: 5px 0; }
.rating-static svg { width: 1.1rem; height: 1.1rem; fill: #e8e8e8; }
.rating-static .gold { fill: #ffca08; filter: drop-shadow(0 0 2px rgba(255, 202, 8, 0.3)); }

/* Bottom band */
.banda-inferior { background: #ffffff; padding: 12px; border-top: 1px solid #eee; display: flex; justify-content: center; align-items: center; }

.card { background-color: #0A100D }

.photo-delete-btn {
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    line-height: 1 !important;
    border-width: 1px !important;
    box-shadow: none !important;
}
.photo-delete-btn:hover {
    transform: scale(1.05);
}