/* ═══════════════════════════════════════════════════════════════
   DekaMasini — Premium Dark Theme Frontend
   Inspired by badsi.ro | Variables from admin design settings
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reset & Base ─── */
.deka-masini-wrapper,
.deka-single-wrap {
    font-family: var(--deka-font);
    color: var(--deka-text);
    background: var(--deka-bg);
    padding: 32px 24px;
    border-radius: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.deka-masini-wrapper *,
.deka-single-wrap * {
    box-sizing: border-box;
}

/* ═══════════════════════════════
   FILTERS BAR
   ═══════════════════════════════ */
.deka-filters-bar {
    margin-bottom: 28px;
}

.deka-filters-form {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.deka-filters-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
}

.deka-filter-select,
.deka-filter-input {
    background: var(--deka-bg-card);
    color: var(--deka-text);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-family: var(--deka-font);
    min-width: 140px;
    transition: all .25s ease;
    appearance: none;
    -webkit-appearance: none;
}

.deka-filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L2 5h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.deka-filter-select:focus,
.deka-filter-input:focus {
    outline: none;
    border-color: var(--deka-accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, .15);
}

.deka-filter-input {
    width: 120px;
}

.deka-filter-btn {
    background: var(--deka-accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    font-family: var(--deka-font);
}

.deka-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, .35);
}

/* View Toggle */
.deka-view-toggle {
    display: flex;
    gap: 4px;
}

.deka-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    color: var(--deka-text-sec);
    transition: all .2s;
    text-decoration: none;
}

.deka-view-btn:hover,
.deka-view-btn.active {
    background: var(--deka-accent);
    border-color: var(--deka-accent);
    color: #fff;
}

/* ═══════════════════════════════
   GRID VIEW
   ═══════════════════════════════ */
.deka-grid {
    display: grid;
    grid-template-columns: repeat(var(--deka-cols, 3), 1fr);
    gap: 20px;
}

.deka-card {
    background: var(--deka-bg-card);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: var(--deka-text);
    transition: all .35s cubic-bezier(.25, .46, .45, .94);
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, .04);
}

.deka-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 0 0 1px rgba(233, 69, 96, .2);
}

.deka-card-image {
    position: relative;
    width: 100%;
    padding-top: 65%;
    overflow: hidden;
    background: #111;
}

.deka-card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.deka-card:hover .deka-card-image img {
    transform: scale(1.06);
}

.deka-card-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.deka-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--deka-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
    backdrop-filter: blur(4px);
}

.deka-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.deka-card-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
    color: var(--deka-text);
}

.deka-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.deka-spec {
    background: rgba(255, 255, 255, .06);
    color: var(--deka-text-sec);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.deka-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}

.deka-card-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--deka-price);
}

.deka-card-cta {
    font-size: 12px;
    color: var(--deka-accent);
    font-weight: 600;
    transition: transform .2s;
}

.deka-card:hover .deka-card-cta {
    transform: translateX(4px);
}

/* ═══════════════════════════════
   LIST VIEW
   ═══════════════════════════════ */
.deka-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deka-list-item {
    display: grid;
    grid-template-columns: 240px 1fr auto;
    gap: 20px;
    align-items: center;
    background: var(--deka-bg-card);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: var(--deka-text);
    border: 1px solid rgba(255, 255, 255, .04);
    transition: all .25s ease;
    padding-right: 24px;
}

.deka-list-item:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .4);
    border-color: rgba(233, 69, 96, .15);
}

.deka-list-image {
    width: 240px;
    height: 160px;
    overflow: hidden;
    background: #111;
}

.deka-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.deka-list-item:hover .deka-list-image img {
    transform: scale(1.05);
}

.deka-list-info {
    padding: 16px 0;
}

.deka-list-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--deka-text);
}

.deka-list-specs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.deka-list-meta {
    display: flex;
    gap: 12px;
    color: var(--deka-text-sec);
    font-size: 12px;
}

.deka-list-stoc {
    color: var(--deka-text-sec);
    font-size: 11px;
    opacity: .6;
    margin-top: 6px;
    display: block;
}

.deka-list-price-col {
    text-align: right;
    padding: 16px 0;
}

.deka-list-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--deka-price);
    white-space: nowrap;
}

/* ═══════════════════════════════
   PAGINATION
   ═══════════════════════════════ */
.deka-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.deka-pagination ul {
    list-style: none;
    display: flex;
    gap: 6px;
    padding: 0;
    margin: 0;
}

.deka-pagination li {
    display: inline;
}

.deka-pagination a,
.deka-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--deka-bg-card);
    color: var(--deka-text);
    text-decoration: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s;
    border: 1px solid rgba(255, 255, 255, .06);
}

.deka-pagination a:hover {
    background: var(--deka-accent);
    color: #fff;
    border-color: var(--deka-accent);
}

.deka-pagination .current {
    background: var(--deka-accent);
    color: #fff;
    border-color: var(--deka-accent);
}

/* ═══════════════════════════════
   EMPTY STATE
   ═══════════════════════════════ */
.deka-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--deka-text-sec);
}

.deka-empty-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 16px;
    opacity: .3;
}

/* ═══════════════════════════════
   SINGLE VEHICLE PAGE
   ═══════════════════════════════ */
.deka-single-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.deka-single-main,
.deka-single-sidebar {
    min-width: 0;
}

/* Gallery */
.deka-gallery {
    margin-bottom: 28px;
}

.deka-gallery-main {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #111;
    aspect-ratio: 16/10;
}

.deka-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .3s;
}

.deka-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(8px);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deka-gallery-nav:hover {
    background: var(--deka-accent);
    transform: translateY(-50%) scale(1.1);
}

.deka-gallery-prev {
    left: 12px;
}

.deka-gallery-next {
    right: 12px;
}

.deka-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--deka-accent) transparent;
}

.deka-thumb {
    width: 72px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .2s;
    opacity: .6;
    flex-shrink: 0;
}

.deka-thumb:hover,
.deka-thumb.active {
    opacity: 1;
    border-color: var(--deka-accent);
}

.deka-gallery-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: var(--deka-bg-card);
    border-radius: 14px;
    font-size: 20px;
    color: var(--deka-text-sec);
}

/* Mobile header (hidden on desktop) */
.deka-mobile-header {
    display: none;
}

/* Quick Badges */
.deka-quick-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.deka-badge-item {
    background: var(--deka-bg-card);
    color: var(--deka-text-sec);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, .06);
}

.deka-badge-item.loc {
    background: var(--deka-accent);
    color: #fff;
    border-color: var(--deka-accent);
}

/* Sections */
.deka-section {
    margin-bottom: 28px;
}

.deka-section-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--deka-text);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--deka-accent);
    display: inline-block;
}

/* Specs Grid */
.deka-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(0, 0, 0, .05);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .05);
}

.deka-spec-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--deka-bg-card);
}

.deka-spec-row:nth-child(even) {
    background: rgba(0, 0, 0, .03);
}

.deka-spec-label {
    color: var(--deka-text-sec);
    font-size: 13px;
}

.deka-spec-value {
    color: var(--deka-text);
    font-weight: 600;
    font-size: 13px;
    text-align: right;
}

/* Equipment Grid */
.deka-equip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.deka-equip-item {
    color: var(--deka-text-sec);
    font-size: 13px;
    padding: 6px 0;
    transition: opacity 0.3s, height 0.3s;
}

.deka-equip-hidden {
    display: none;
}

.deka-equip-actions {
    margin-top: 16px;
    text-align: center;
}

.deka-btn-outline {
    background: transparent;
    color: var(--deka-accent);
    border: 1px solid var(--deka-accent);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.deka-btn-outline:hover {
    background: var(--deka-accent);
    color: #fff;
}

/* Additional info */
.deka-info-text {
    color: var(--deka-text-sec);
    font-size: 13px;
    line-height: 1.7;
    background: var(--deka-bg-card);
    padding: 16px;
    border-radius: 10px;
}

/* DWA Link */
.deka-dwa-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--deka-accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    background: var(--deka-bg-card);
    border-radius: 8px;
    border: 1px solid rgba(233, 69, 96, .2);
    transition: all .2s;
}

.deka-dwa-link:hover {
    background: var(--deka-accent);
    color: #fff;
}

/* ═══════════════════════════════
   SIDEBAR
   ═══════════════════════════════ */
.deka-single-sidebar {
    position: sticky;
    top: 32px;
    align-self: start;
}

/* Desktop header */
.deka-desktop-header {
    margin-bottom: 20px;
}

.deka-single-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.25;
    color: var(--deka-text);
}

.deka-single-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--deka-price);
    margin-bottom: 4px;
}

/* Seller Card */
.deka-seller-card {
    background: var(--deka-bg-card);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, .06);
}

.deka-seller-top {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}

.deka-seller-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--deka-accent);
}

.deka-seller-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.deka-seller-info {
    flex: 1;
}

.deka-seller-name {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--deka-text);
}

.deka-seller-pos {
    display: block;
    font-size: 12px;
    color: var(--deka-text-sec);
}

.deka-seller-loc {
    display: block;
    font-size: 12px;
    color: var(--deka-accent);
    margin-top: 2px;
}

.deka-seller-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.deka-seller-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s;
    text-align: center;
    justify-content: center;
}

.deka-seller-btn.phone {
    background: var(--deka-accent);
    color: #fff;
}

.deka-seller-btn.phone:hover {
    box-shadow: 0 4px 16px rgba(233, 69, 96, .4);
    transform: translateY(-1px);
}

.deka-seller-btn.whatsapp {
    background: #25d366;
    color: #fff;
}

.deka-seller-btn.whatsapp:hover {
    box-shadow: 0 4px 16px rgba(37, 211, 102, .4);
    transform: translateY(-1px);
}

.deka-seller-btn.email {
    background: rgba(255, 255, 255, .06);
    color: var(--deka-text);
    border: 1px solid rgba(255, 255, 255, .1);
}

.deka-seller-btn.email:hover {
    border-color: var(--deka-accent);
    color: var(--deka-accent);
}

/* ═══════════════════════════════
   CONTACT FORM
   ═══════════════════════════════ */
.deka-contact-form-wrap {
    background: var(--deka-bg-card);
    border-radius: 14px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .06);
}

.deka-form-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 18px;
    color: var(--deka-text);
}

/* Radio Group */
.deka-field {
    margin-bottom: 14px;
}

.deka-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--deka-text-sec);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.deka-radio-group {
    display: flex;
    gap: 8px;
}

.deka-radio {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
    font-size: 13px;
    color: var(--deka-text-sec);
}

.deka-radio input {
    display: none;
}

.deka-radio.active,
.deka-radio:has(input:checked) {
    background: rgba(233, 69, 96, .1);
    border-color: var(--deka-accent);
    color: var(--deka-accent);
    font-weight: 600;
}

.deka-contact-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--deka-text-sec);
    margin-bottom: 4px;
}

.deka-contact-form input[type="text"],
.deka-contact-form input[type="tel"],
.deka-contact-form input[type="email"],
.deka-contact-form textarea,
.deka-contact-form select {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    color: var(--deka-text);
    font-size: 13px;
    font-family: var(--deka-font);
    transition: all .25s;
}

.deka-contact-form input:focus,
.deka-contact-form textarea:focus {
    outline: none;
    border-color: var(--deka-accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, .12);
    background: rgba(255, 255, 255, .06);
}

.deka-contact-form textarea {
    resize: vertical;
    min-height: 70px;
}

.deka-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Checkboxes */
.deka-checkboxes {
    background: rgba(255, 255, 255, .03);
    border-radius: 10px;
    padding: 12px;
}

.deka-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--deka-text-sec);
}

.deka-check:last-child {
    margin-bottom: 0;
}

.deka-check input[type="checkbox"] {
    accent-color: var(--deka-accent);
    width: 16px;
    height: 16px;
}

/* Submit Button */
.deka-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--deka-accent), #c23152);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all .3s;
    font-family: var(--deka-font);
    position: relative;
    overflow: hidden;
}

.deka-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, .15));
    opacity: 0;
    transition: opacity .3s;
}

.deka-submit-btn:hover::before {
    opacity: 1;
}

.deka-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(233, 69, 96, .4);
}

.deka-submit-btn:active {
    transform: translateY(0);
}

/* Form Message */
.deka-form-message {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}

.deka-form-message.success {
    background: rgba(37, 211, 102, .1);
    color: #25d366;
    border: 1px solid rgba(37, 211, 102, .2);
}

.deka-form-message.error {
    background: rgba(233, 69, 96, .1);
    color: var(--deka-accent);
    border: 1px solid rgba(233, 69, 96, .2);
}

/* ═══════════════════════════════
   ANIMATIONS
   ═══════════════════════════════ */
@keyframes deka-fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.deka-card,
.deka-list-item {
    animation: deka-fadeIn .5s ease forwards;
    opacity: 0;
}

.deka-card:nth-child(1),
.deka-list-item:nth-child(1) {
    animation-delay: .05s;
}

.deka-card:nth-child(2),
.deka-list-item:nth-child(2) {
    animation-delay: .1s;
}

.deka-card:nth-child(3),
.deka-list-item:nth-child(3) {
    animation-delay: .15s;
}

.deka-card:nth-child(4),
.deka-list-item:nth-child(4) {
    animation-delay: .2s;
}

.deka-card:nth-child(5),
.deka-list-item:nth-child(5) {
    animation-delay: .25s;
}

.deka-card:nth-child(6),
.deka-list-item:nth-child(6) {
    animation-delay: .3s;
}

.deka-card:nth-child(n+7),
.deka-list-item:nth-child(n+7) {
    animation-delay: .35s;
}

/* ═══════════════════════════════
   RESPONSIVE
   ═══════════════════════════════ */
@media (max-width: 992px) {
    .deka-single-container {
        grid-template-columns: 1fr;
    }

    .deka-single-sidebar {
        position: static;
    }

    .deka-desktop-header {
        display: none;
    }

    .deka-mobile-header {
        display: block;
        margin-bottom: 16px;
    }

    .deka-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .deka-masini-wrapper,
    .deka-single-wrap {
        padding: 16px 12px;
    }

    .deka-list-item {
        grid-template-columns: 140px 1fr;
        padding-right: 14px;
    }

    .deka-list-price-col {
        grid-column: 1 / -1;
        text-align: left;
        padding: 0 14px 12px;
    }

    .deka-list-image {
        width: 140px;
        height: 110px;
    }

    .deka-specs-grid {
        grid-template-columns: 1fr;
    }

    .deka-equip-grid {
        grid-template-columns: 1fr;
    }

    .deka-field-row {
        grid-template-columns: 1fr;
    }

    .deka-filters-row {
        flex-direction: column;
    }

    .deka-filter-select,
    .deka-filter-input {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .deka-grid {
        grid-template-columns: 1fr;
    }

    .deka-list-item {
        grid-template-columns: 1fr;
    }

    .deka-list-image {
        width: 100%;
        height: 180px;
    }
}