.as-deck-builder-split-wrapper,
.as-deck-list-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", sans-serif;
    color: #1e293b;
    box-sizing: border-box;
}

.as-deck-builder-split-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 20px 0;
}

.as-db-left-panel {
    flex: 3;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.as-db-right-panel {
    flex: 2;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.as-db-top-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.as-db-cover-box {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.as-db-cover-placeholder {
    font-size: 1.4rem;
    color: #94a3b8;
}

.as-db-title-box {
    flex-grow: 1;
}

.as-db-title-input {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    border: 1px dashed transparent;
    background: transparent;
    padding: 2px 6px;
    border-radius: 4px;
    width: 200px;
}

.as-db-title-input:hover,
.as-db-title-input:focus {
    border-color: #2563eb;
    background: #ffffff;
}

.as-db-deck-meta-info {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 2px;
}

.as-db-price {
    color: #16a34a;
    font-weight: 700;
}

.as-db-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.as-db-btn, .as-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.as-db-btn-save {
    background-color: #dc2626;
    color: #ffffff !important;
}
.as-db-btn-save:hover {
    background-color: #b91c1c;
}

.as-db-btn-discard {
    background-color: #f1f5f9;
    color: #475569 !important;
    font-size: 1.1rem;
    padding: 6px 10px;
}
.as-db-btn-discard:hover {
    background-color: #fee2e2;
    color: #dc2626 !important;
}

.as-db-btn-secondary {
    background-color: #f1f5f9;
    color: #334155 !important;
    border: 1px solid #cbd5e1;
}

.as-db-btn-primary {
    background-color: #2563eb;
    color: #ffffff !important;
}

.as-db-btn-cart, .as-dl-btn-cart {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2);
}

.as-dl-btn-red {
    background-color: #b91c1c;
    color: #ffffff !important;
    width: 100%;
    margin-bottom: 6px;
    padding: 10px 14px;
}
.as-dl-btn-red:hover {
    background-color: #991b1b;
}

.as-db-icon-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 1rem;
    cursor: pointer;
}

.as-db-dropdown-wrap {
    position: relative;
    display: inline-block;
}

.as-db-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 99;
    min-width: 160px;
    padding: 6px 0;
    margin-top: 4px;
}

.as-db-dropdown-wrap:hover .as-db-dropdown-menu,
.as-db-dropdown-wrap.open .as-db-dropdown-menu {
    display: block;
}

.as-db-dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 8px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    color: #334155;
}

.as-db-dropdown-menu button:hover {
    background-color: #f1f5f9;
    color: #2563eb;
}

.as-db-canvas-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.as-db-view-toggles, .as-dl-view-group, .as-dl-currency-group {
    display: flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 2px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
}

.as-db-view-btn, .as-dl-view-btn, .as-dl-curr-btn {
    background: transparent;
    border: none;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
    color: #64748b;
}

.as-db-view-btn.active, .as-dl-view-btn.active, .as-dl-curr-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.as-db-canvas-view {
    min-height: 400px;
}

.as-db-canvas-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    border: 2px dashed #e2e8f0;
    border-radius: 8px;
}

.as-db-search-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 12px;
}

.as-db-search-tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.as-db-search-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.as-db-search-input-group {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.as-db-search-input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
}

.as-db-filter-controls {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 10px;
}

.as-db-filter-btn {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.85rem;
    cursor: pointer;
}

.as-db-quick-pills-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 12px;
}

.as-db-pill-group, .as-db-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.as-db-pill, .as-adv-pill {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.8rem;
    cursor: pointer;
}

.as-db-pill.active, .as-adv-pill.active {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.as-db-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    max-height: 520px;
    overflow-y: auto;
    padding: 4px;
}

.as-db-search-card-item {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 6px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}

.as-db-search-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.as-db-search-card-thumb {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 4px;
}

.as-db-search-card-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 4px 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.as-db-search-card-price {
    font-size: 0.75rem;
    color: #16a34a;
    font-weight: 700;
}

.as-db-modal, .as-dl-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.as-db-modal-overlay, .as-dl-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}

.as-db-modal-card-content, .as-db-modal-advanced-content, .as-dl-modal-image-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
}

.as-db-modal-card-content {
    width: 90%;
    max-width: 440px;
}

.as-db-modal-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.as-db-modal-qty-bar {
    display: flex;
    align-items: center;
    border: 2px solid #b91c1c;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 14px;
    margin-bottom: 14px;
    background: #ffffff;
}

.as-db-qty-bar-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    color: #0f172a;
    transition: background 0.15s;
}
.as-db-qty-bar-btn:hover {
    background-color: #fee2e2;
    color: #b91c1c;
}

.as-db-qty-bar-status {
    flex: 2;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    border-left: 1px solid #fee2e2;
    border-right: 1px solid #fee2e2;
    padding: 8px 0;
}

.as-db-modal-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

.as-db-modal-image-wrapper img {
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: 8px;
}

.as-modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}
.as-modal-nav-btn:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    color: #2563eb;
}
.as-modal-nav-prev {
    left: -10px;
}
.as-modal-nav-next {
    right: -10px;
}

.as-db-modal-details-body {
    text-align: center;
    margin-bottom: 12px;
}

.as-db-modal-category-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
}

.as-db-modal-desc-text {
    font-size: 0.82rem;
    color: #334155;
    line-height: 1.4;
    margin-bottom: 12px;
}

.as-db-modal-price-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.as-db-price-badge {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    color: #475569;
}

.as-db-modal-btn-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 0;
    text-align: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155 !important;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.as-db-modal-btn-link:hover {
    background: #ffffff;
    border-color: #2563eb;
    color: #2563eb !important;
}

.as-deck-list-wrapper {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.as-dl-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.as-dl-title {
    font-size: 1.5rem;
    margin: 0;
    color: #0f172a;
}

.as-dl-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0284c7;
    margin-left: 8px;
}

.as-dl-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.as-dl-select {
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
}

.as-dl-list-layout {
    display: flex;
    gap: 24px;
}

.as-dl-tables-column {
    flex: 2;
}

.as-dl-preview-column {
    flex: 1;
    min-width: 240px;
}

.as-dl-preview-box {
    position: sticky;
    top: 20px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.as-dl-preview-box img {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 12px;
}

.as-dl-cat-header {
    background-color: #b91c1c;
    color: #ffffff;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 6px 6px 0 0;
    margin-top: 14px;
}

.as-dl-row-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
    cursor: pointer;
}
.as-dl-row-item:hover {
    background-color: #eff6ff;
}

.as-dl-card-link {
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
}
.as-dl-card-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.as-dl-set-badge {
    background: #0f172a;
    color: #ffffff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.as-dl-visual-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
    padding: 10px 0;
}

.as-dl-grid-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.as-dl-grid-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.as-dl-grid-badge {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: #b91c1c;
    color: #ffffff;
    font-weight: 800;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.as-db-mobile-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #cbd5e1;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.as-db-mobile-tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
}

.as-db-mobile-tab-btn.active {
    color: #2563eb;
    border-top: 3px solid #2563eb;
    background: #f8fafc;
}

@media (max-width: 768px) {
    .as-deck-builder-split-wrapper {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 70px;
    }

    .as-db-left-panel,
    .as-db-right-panel {
        width: 100%;
        box-sizing: border-box;
    }

    .as-db-mobile-tab-bar {
        display: flex;
    }

    .as-db-left-panel.as-mobile-hidden,
    .as-db-right-panel.as-mobile-hidden {
        display: none !important;
    }

    .as-dl-list-layout {
        flex-direction: column;
    }

    .as-dl-preview-column {
        width: 100%;
    }

    .as-db-modal-card-content {
        width: 92%;
        padding: 14px;
        max-height: 85vh;
    }

    .as-db-search-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }

    .as-db-search-card-thumb {
        height: 100px;
    }
}

